Integrations
OpenAI Agents
Run agent code inside Isorun sandboxes from the OpenAI Agents SDK.
The isorun/openai-agents entry point gives you OpenAI Agents function tools
backed by a single shared Isorun sandbox: a Python code_interpreter and a
shell. Both run in one Firecracker microVM, so multi-turn state (cwd, env
vars, installed packages, files) persists across tool calls.
Install
npm install isorun @openai/agents zodExample agent
import { Agent, run } from '@openai/agents'
import { isorunTools } from 'isorun/openai-agents'
const { tools, close } = await isorunTools()
try {
const coder = new Agent({
name: 'coder',
instructions: 'You are a senior developer. Use the tools to write and run code that solves the task.',
tools,
})
const result = await run(coder, 'Compute 2**100 and explain the result.')
console.log(result.finalOutput)
} finally {
await close()
}isorunTools() returns { tools, close }. Pass tools to new Agent({ tools })
and call close() when the agent loop is done to destroy the sandbox.
What gets exposed
| Tool | What it does |
|---|---|
code_interpreter(code) | Runs Python in a Firecracker microVM with internet, pip, and a full Python environment. Returns stdout/stderr. |
shell(command) | Runs a shell command in the same sandbox. Returns stdout/stderr. |
Both tools share one sandbox, so state created by shell (git clone,
pip install) is visible to subsequent code_interpreter calls and vice versa.
Options
const { tools, close } = await isorunTools({
image: 'python:3.12-slim', // any OCI image; default python:3.12-slim
timeoutSec: 900, // idle auto-destroy, default 600
// apiKey defaults to ISORUN_API_KEY; pass `isorun: new Isorun()` to reuse a client
})Next steps
- LangChain for the same sandbox tools in LangChain.
- MCP server to drive sandboxes from Claude Desktop, Cursor, or Zed.
- TypeScript SDK, the client behind these tools.