Framework integrations
Adapters for the agent frameworks that have a sandbox interface.
LangChain deepagents
pip install langchain-opsenfrom deepagents import create_deep_agent
from langchain_anthropic import ChatAnthropic
from langchain_opsen import OpsenSandbox
backend = OpsenSandbox(task_id="nightly-report", budget_usd=2.00)
agent = create_deep_agent(
model=ChatAnthropic(model="claude-sonnet-4-6"),
system_prompt="You are a Python coding assistant.",
backend=backend,
)
backend.cost() # machine + model + tools, one task idSubclasses BaseSandbox, so the filesystem tools
and async variants come from deepagents itself. Passes 79 of 86 checks in
their sandbox standard suite.
OpenAI Agents SDK
pip install openai-agents-opsenfrom agents import Runner, RunConfig
from agents.sandbox import SandboxAgent
from openai_agents_opsen import OpsenSandboxClient
result = await Runner.run(
agent,
"read the repo and summarise it",
run_config=RunConfig(sandbox={"client": OpsenSandboxClient(
task_id="code-review", budget_usd=2.00)}),
)VibeKit
npm install @vibe-kit/opsenimport { VibeKit } from "@vibe-kit/sdk";
import { createOpsenProvider } from "@vibe-kit/opsen";
const vibeKit = new VibeKit()
.withAgent({ type: "grok", provider: "xai",
apiKey: process.env.XAI_API_KEY! })
.withSandbox(createOpsenProvider({
apiKey: process.env.OPSEN_API_KEY!,
taskId: "code-review",
budgetUsd: 2.0,
}));Pydantic AI
pip install pydantic-ai-opsenfrom pydantic_ai import Agent
from pydantic_ai_opsen import OpsenSandbox
agent = Agent(
"anthropic:claude-sonnet-4-6",
capabilities=[OpsenSandbox(task_id="nightly-report",
budget_usd=2.00)],
)A capability, so it needs no upstream registration — you add it where you build the agent. It carries four tools: run a command, read, write, list.
Temporal
SandboxClientProvider("opsen", OpsenSandboxClient(
task_id="nightly-report", budget_usd=2.00))No Temporal-specific package: their integration takes any
BaseSandboxClient, and the Agents SDK adapter is one. See
Temporal.
agentsh
pip install agentsh-opsenfrom agentsh_secure_sandbox import secure_sandbox, SecureConfig
from agentsh_opsen import OpsenAdapter
sandbox = await secure_sandbox(
OpsenAdapter(task_id="review", budget_usd=2.00),
SecureConfig(install_strategy="running"))agentsh wraps a sandbox in runtime security and exposes it to Pydantic AI, LangChain, the OpenAI Agents SDK and deepagents. It needs its own daemon inside the sandbox, so this wants an image with agentsh preinstalled — the adapter is ready, that image is not.
TypeScript, directly
npm install @opsendev/opsenimport { Opsen } from "@opsendev/opsen";
const opsen = new Opsen({ apiKey: process.env.OPSEN_API_KEY });
const s = await opsen.createSession({ taskId: "x", budgetUsd: 1 });
const r = await s.exec("echo hello");
await s.kill();From your editor
opsen speaks MCP, so Claude Code, Cursor and VS Code can start runs without leaving them:
claude mcp add --transport http --scope user opsen \
https://opsen.dev/mcp \
--header "Authorization: Bearer YOUR_OPSEN_KEY"