Code-heavy tasks with files and shell access
Use a session to inspect a repo, write files, run tests, and leave a durable event trail your app can inspect later.
Use this page when you want examples that match the real managed runtime rather than generic agent demos.
Last updated
2026-04-12
These are the examples that align best with the official docs and the engineering post.
Use a session to inspect a repo, write files, run tests, and leave a durable event trail your app can inspect later.
Use built-in web search and fetch when the agent needs live context before it writes a summary, recommendation, or plan.
Use cloud containers for Python, Node.js, Go, or Rust workflows where the agent needs a real runtime rather than a pure text response.
If you only need a working skeleton for experimentation, keep the first version this small.
bash
This is a compact paraphrase of the quickstart flow. It keeps the same sequence but trims it down to the steps a real implementation needs first.
# 1) Create an agent
ant beta:agents create \
--name "Research Assistant" \
--model claude-sonnet-4-6 \
--system "You investigate, summarize, and write clear reports." \
--tool '{type: agent_toolset_20260401}'
# 2) Create an environment
ant beta:environments create \
--name "research-env" \
--config '{type: cloud, networking: {type: unrestricted}}'
# 3) Start a session
curl https://api.anthropic.com/v1/sessions \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "content-type: application/json" \
-d '{
"agent": "agent_...",
"environment_id": "env_...",
"title": "Research session"
}'These patterns let you keep the managed runtime while still growing into more advanced behavior.
The coordinator can delegate work to parallel agents while the session keeps a shared filesystem and separate context-isolated threads.
You can expose custom tools when the built-in toolset is not enough, but your app still executes those tools outside the hosted runtime.
Console can help you prototype configuration first, then copy the same agent and session primitives into your code once behavior looks right.
These questions usually come up once the first example moves from a notebook exercise to a real app.
Only if you have access. Anthropic documents multiagent as a research preview, so you should not design the first production version around it unless your account already has it enabled.
Use custom tools when the hosted container needs to call back into your own systems. Managed Agents supports user-defined tools, but your application executes them and sends results back.
These pages are the shortest path to the next question most teams hit.
Use this guide to build the first working Managed Agents session without mixing up agents, environments, sessions, and event streams.
Open pageUse this page to decide whether your workload actually belongs in Managed Agents before you build around the hosted runtime.
Open pageUse this page when a session is failing, stuck, or acting unlike the runtime you thought you configured.
Open pageUse the waitlist if you want the next update without checking the docs every week.
Waitlist
Get a short email when this guide adds new examples, API changes, or managed-agents implementation notes.