Claude Managed Agents
Self-hosted sandbox runtime for Anthropic Claude Managed Agents. One microVM per session, isolated for the lifetime of the session.
Claude Managed Agents let you run Anthropic-orchestrated agents inside your own sandbox infrastructure. The Isorun SDK ships a self-hosted adapter that provisions one Isorun microVM per Anthropic session and binds every work item in that session to the same VM.
What you get
- One sandbox per Anthropic session. Successive turns in the same session share filesystem and process state.
- Per-sandbox isolation. Sessions never see each other's data, every session is its own microVM with its own kernel.
- Hibernate-on-idle. Server-side TTL reclaims unused sandboxes without you tracking them.
- Zero orchestration plumbing. A single
runOrchestrator()call polls Anthropic's work queue, allocates sandboxes, runs work items to completion, and reaps on shutdown.
Install
npm install isorun @anthropic-ai/sdk@anthropic-ai/sdk is an optional peer dependency of the SDK, only
needed by this entry point.
Configure
Get an environment ID and key from the Anthropic Console → Managed Agents → Self-hosted environment.
export ISORUN_API_KEY=isorun_live_...
export ANTHROPIC_ENVIRONMENT_ID=env_...
export ANTHROPIC_ENVIRONMENT_KEY=sk-ant-oat01-...Run the orchestrator
import { Isorun } from 'isorun'
import { runOrchestrator } from 'isorun/claude-agents/orchestrator'
await runOrchestrator({
isorun: new Isorun(),
environmentId: process.env.ANTHROPIC_ENVIRONMENT_ID!,
environmentKey: process.env.ANTHROPIC_ENVIRONMENT_KEY!,
image: 'docker.io/isorun/claude-agents:0.4.3',
vcpus: 2,
memMiB: 4096,
})runOrchestrator() runs until you abort it. It will:
- Poll Anthropic's environment work queue.
- For each new work item, allocate (or re-use) an Isorun sandbox for the session.
- Stream the work item into the sandbox via a runner inside the VM.
- Post results back to Anthropic.
- Refresh the sandbox's auto-destroy timer between turns; let the server reap idle sandboxes when the TTL fires.
Custom image
docker.io/isorun/claude-agents:0.4.3 ships:
- Node 22 +
@anthropic-ai/sdkpre-installed at/opt/isorun-claude-runner bash,unzip,tar,git,curl, plus standard build tools/mnt/sessionas the runner's working directory; the agent's final output files go under/mnt/session/outputs
Bring your own image if you need extra tooling. Any OCI image works,
just install Node 22 and @anthropic-ai/sdk and copy the runner from
the published one. See src/claude-agents/Dockerfile.base in
isorun-sdk for a starting point.
Session → sandbox binding rules
Override the default allocation per session by setting metadata on the Anthropic session before it starts:
| Metadata key | Effect |
|---|---|
isorun.image | Use a different image for this session |
isorun.sandbox_id | Attach to a pre-existing sandbox (BYOS) |
When isorun.sandbox_id is set, the orchestrator never destroys that sandbox. You own its lifecycle, including cleanup.
Shutdown
runOrchestrator() honours an AbortSignal:
const ac = new AbortController()
process.on('SIGTERM', () => ac.abort())
await runOrchestrator({
isorun: new Isorun(),
environmentId: process.env.ANTHROPIC_ENVIRONMENT_ID!,
environmentKey: process.env.ANTHROPIC_ENVIRONMENT_KEY!,
image: 'docker.io/isorun/claude-agents:0.4.3',
vcpus: 2,
memMiB: 4096,
signal: ac.signal,
})Drains in-flight work items, stops polling, and exits. Sandboxes allocated by the orchestrator are not destroyed on shutdown, the server-side TTL reaps them.
Next steps
- TypeScript SDK, the
Isorunclient the orchestrator wraps. - Any OCI image, build a custom agent image.
- Lifecycle and hibernation, the TTL and idle-reclaim model.