DocumentationAccount

Integrations

Keep your agent. Give it a sandbox.

Choose your framework. Connect through MCP or a tool function.

Keep your framework's model and agent loop; give it a tool that runs in a Runtime sandbox. The application creates the sandbox, binds the tool to it, and stops it when the work ends. The model chooses the command, never the sandbox or the tenant.

These examples cover execution tools, not automatic replacement of a framework’s built-in local shell or filesystem. Disable conflicting local tools when needed. Inspect exit codes as well as API success.

Vercel AI SDK

Execution tool integration
TypeScriptimport { jsonSchema, tool } from "ai";import type { Sandbox } from "withruntime";export function runtimeTool(sandbox: Sandbox) {  return tool({    description:      "Run a shell command in the application's Runtime sandbox and get exitCode, stdout and stderr.",    inputSchema: jsonSchema<{ command: string }>({      type: "object",      additionalProperties: false,      properties: { command: { type: "string", description: "Runs under bash -c." } },      required: ["command"],    }),    execute: ({ command }) => sandbox.exec(command),  });}

Pass { runtime: runtimeTool(sbx) } as the call's tools.

Remote execution

Check the output and the program’s exit code.

File round trip

Write a file, read it back and compare the bytes.

Cleanup

Stop the sandbox and confirm shutdown.

Use Runtime's MCP server instead

Coding agents can connect to Runtime's own tools, which cover files, processes and every other product: see MCP. OpenAI's Responses API and Anthropic's Messages API can also call a hosted MCP server; the provider must be able to reach https://api.withruntime.com/mcp.

What was verified

These samples are typechecked against the current SDK on every build. On 22 September 2026 the same four integrations, written for SDK 0.1.0, passed a model-driven workflow through the public API and real sandboxes: write input, compute, handle a nonzero exit, read the output back, confirm shutdown. Those were bounded single-workflow checks, not universal framework compatibility or performance guarantees.

Official references checked 18 September 2026: Vercel tools, OpenAI tools, OpenAI MCP, Claude Agent SDK custom tools, LangChain tools.

Was this page right?