# LLM Sandbox

LLM Sandbox is a Python library that runs LLM-generated code inside an isolated container so it cannot touch the host system, with support for several container backends and languages plus an MCP server for clients such as Claude Desktop.

LLM Sandbox is a lightweight Python library for running large-language-model-generated code in an isolated, sandboxed environment. Code executes in containers with no access to the host system, and users can define custom security policies, set CPU, memory and execution-time limits, and control network access for the sandboxed code.

It supports Docker, Kubernetes and Podman as container backends, and runs Python, JavaScript, Java, C++, Go and R with automatic dependency installation. It also ships a Model Context Protocol server so MCP clients such as Claude Desktop can run LLM-generated code through it, and includes runnable integration examples for eleven agent frameworks including the OpenAI Agents SDK, the Claude Agent SDK, LangChain and CrewAI.

Website: https://vndee.github.io/llm-sandbox/
