Examples

Claude Managed Agents examples

Use this page when you want examples that match the real managed runtime rather than generic agent demos.

Pattern Library

Start from patterns that already match the managed runtime.

These are the examples that align best with the official docs and the engineering post.

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.

Research plus synthesis

Use built-in web search and fetch when the agent needs live context before it writes a summary, recommendation, or plan.

Sandboxed data or script work

Use cloud containers for Python, Node.js, Go, or Rust workflows where the agent needs a real runtime rather than a pure text response.

Starter Shape

A minimal first implementation has three moving parts.

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"
  }'
Extension Paths

The first version does not have to be the final architecture.

These patterns let you keep the managed runtime while still growing into more advanced behavior.

Coordinator plus specialists

The coordinator can delegate work to parallel agents while the session keeps a shared filesystem and separate context-isolated threads.

Managed runtime plus app-owned tools

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 prototype to API handoff

Console can help you prototype configuration first, then copy the same agent and session primitives into your code once behavior looks right.

FAQ

A few example-stage decisions matter more than the prompt wording.

These questions usually come up once the first example moves from a notebook exercise to a real app.

Should I plan the first version around multiagent sessions?+

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.

When should I add custom tools instead of relying on the built-in toolset?+

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.

Related Pages

Keep moving with the page that matches the next decision.

These pages are the shortest path to the next question most teams hit.

Claude Managed Agents quickstart

Use this guide to build the first working Managed Agents session without mixing up agents, environments, sessions, and event streams.

Open page

Claude Managed Agents use cases

Use this page to decide whether your workload actually belongs in Managed Agents before you build around the hosted runtime.

Open page

Claude Managed Agents troubleshooting

Use this page when a session is failing, stuck, or acting unlike the runtime you thought you configured.

Open page
Stay Updated

Want updates as Managed Agents evolves?

Use the waitlist if you want the next update without checking the docs every week.

Waitlist

Want updates as Managed Agents evolves?

Get a short email when this guide adds new examples, API changes, or managed-agents implementation notes.

Submissions go directly to Formspree.