# Runtime The SDKs, CLI, MCP server and agent integrations for [Runtime](https://withruntime.com): sandboxes for AI agents. Each sandbox is a Firecracker microVM with its own Linux kernel, started from one call. ```bash npm install withruntime # TypeScript SDK, the `runtime` CLI and the MCP server pip install withruntime # Python SDK, sync and async ``` ```ts import { Sandbox } from "withruntime"; await using sbx = await Sandbox.create(); const result = await sbx.exec("python3 -c 'print(6 * 7)'"); console.log(result.exitCode, result.stdout); ``` ```python from withruntime import Sandbox with Sandbox.create() as sbx: result = sbx.exec("python3 -c 'print(6 * 7)'") print(result.exit_code, result.stdout) ``` The client reads `RUNTIME_API_KEY`, or the connection `npx withruntime login` saved on this machine. A new account starts on a free trial with no card. The [quickstart](https://withruntime.com/docs/start) takes it from there. ## MCP server The MCP server gives an agent every Runtime product as tools. It needs Node 22.12 or later and no API key. Claude Code: ```bash claude mcp add --scope user runtime -- npx -y withruntime mcp ``` Cursor, Cline, Windsurf and other clients that take this shape: ```json { "mcpServers": { "runtime": { "command": "npx", "args": ["-y", "withruntime", "mcp"] } } } ``` The first time, the server offers one tool, `runtime_connect`. The agent calls it and shows a link and a code; approve **Connect agent** in the browser, and every Runtime tool appears. A machine already connected with `npx withruntime login` skips this step. In CI, set `RUNTIME_API_KEY` instead. Clients that connect over HTTP use `https://api.withruntime.com/mcp` (MCP Streamable HTTP) and sign in through the browser. The server is in the official MCP Registry as `com.withruntime/runtime`. Details: [withruntime.com/docs/mcp](https://withruntime.com/docs/mcp). ## What is here | Path | What it is | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `packages/cloud-sdk` | The TypeScript SDK, the `runtime` CLI and the MCP server: [`withruntime`](https://www.npmjs.com/package/withruntime) on npm | | `sdks/python` | The Python SDK: [`withruntime`](https://pypi.org/project/withruntime/) on PyPI | | `sdks/python/integrations/langchain-withruntime` | LangChain and Deep Agents sandbox backend | | `sdks/go`, `sdks/java`, `sdks/ruby` | The Go, Java and Ruby SDKs | | `integrations/openai-agents`, `pydantic-ai`, `google-adk`, `smolagents` | OpenAI Agents SDK, Pydantic AI, Google ADK and smolagents integrations, each `-withruntime` on PyPI | | `integrations/claude-code`, `codex`, `cursor`, `gemini-cli`, `vscode`, `windsurf` | Skills, rules and MCP settings for coding agents | | `packages/cloud-guide/docs` | The guides served at [withruntime.com/docs](https://withruntime.com/docs), which the SDK tests check samples against | ## Documentation - [Start](https://withruntime.com/docs/start) - [TypeScript](https://withruntime.com/docs/sdks) and [Python](https://withruntime.com/docs/sdks) - [CLI](https://withruntime.com/docs/sdks) and [MCP](https://withruntime.com/docs/mcp) - [Frameworks](https://withruntime.com/integrations), and moving from [E2B](https://withruntime.com/compare/e2b-alternatives) or [Daytona](https://withruntime.com/compare/daytona-alternatives) - [Pricing](https://withruntime.com/docs/pricing) ## How Runtime compares Pages that answer what people ask when choosing a sandbox, each with the providers' published rates and the date they were read: - [Best sandbox for AI agents](https://withruntime.com/compare/best-sandbox-for-ai-agents) - Alternatives to [E2B](https://withruntime.com/compare/e2b-alternatives), [Daytona](https://withruntime.com/compare/daytona-alternatives), [Modal](https://withruntime.com/compare/modal-alternatives) and [Vercel Sandbox](https://withruntime.com/compare/vercel-sandbox-alternatives) - [E2B vs Daytona](https://withruntime.com/compare/e2b-vs-daytona), and [every comparison](https://withruntime.com/compare) - [The agent sandbox price index](https://withruntime.com/pricing/agent-sandbox-price-index): every provider's rates, also as CSV and JSON - [Sandbox cost calculator](https://withruntime.com/calculators/sandbox-cost-calculator) and [Runtime's pricing](https://withruntime.com/pricing) ## Tests `bun test` in `packages/cloud-sdk` and `python3 -m unittest discover -s tests` in `sdks/python` run here as they are. The suites that start Runtime's API server in-process, including all of the Go, Java and Ruby tests, run in Runtime's main repository before each release. ## Contributing Each release copies the SDKs here from Runtime's main repository, so each commit here is one copy, named after the versions in its source; a copy made before those versions reach npm and PyPI says so. Issues are welcome. A pull request is reviewed here and carried into the next release with its author credited. ## License Apache-2.0. See `LICENSE`.