## Compatibility
The whole hunk
from line 2, old and new numbered
/
lines
from line 2
22title: Get started with Claude Managed Agents
33url: https://platform.claude.com/docs/en/managed-agents/quickstart
44description: Create your first autonomous agent.
5featureMetadata:
6 topic:
7 title: Managed Agents
8 url: https://platform.claude.com/docs/en/managed-agents/overview
9 status: beta
10 betaHeader: managed-agents-2026-04-01
511---
612
7## Compatibility
8- Status: Beta
9- [Beta header](https://platform.claude.com/docs/en/api/beta-headers): `managed-agents-2026-04-01`
10
1113This guide walks you through creating an agent, setting up an environment, starting a session, and streaming agent responses.
1214
1315<Tip>
from line 182
180182 </File>
181183 </MultiFileExample>
182184
185 <ForLanguage tab="CLI">
186 [`ant apply`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply) prints the agent's ID and records it in `claude-lock.json`. You'll reference it in every session you create.
187 </ForLanguage>
188
183189 ```python Python
184190 from anthropic import Anthropic
185191
from line 338
332338
333339 puts "Agent ID: #{agent.id}, version: #{agent.version}"
334340 ```
341
342 <ForLanguage not="CLI">
343 Save the returned `agent.id`. You'll reference it in every session you create.
344 </ForLanguage>
335345 </CodeGroup>
336346
337347 The `agent_toolset_20260401` tool type enables the full set of pre-built agent tools (bash, file operations, web search, and more). See [Tools](https://platform.claude.com/docs/en/managed-agents/tools) for the complete list and per-tool configuration options.
338
339 Save the returned `agent.id` (the CLI's [`ant apply`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply) prints it and records it in `claude-lock.json`). You'll reference it in every session you create.
340348 </Step>
341349
342350 <Step title="Create an environment">
from line 390
382390 </File>
383391 </MultiFileExample>
384392
393 <ForLanguage tab="CLI">
394 `ant apply` prints the environment's ID and records it in `claude-lock.json`. You'll reference it in every session you create.
395
396 <Tip>
397 [`ant apply`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/apply) accepts more than one file, so you can create the agent and the environment with one command instead: `ant apply coding-assistant.md environment.yaml`.
398 </Tip>
399 </ForLanguage>
400
385401 ```python Python
386402 environment = client.beta.environments.create(
387403 name="quickstart-env",
from line 478
462478
463479 puts "Environment ID: #{environment.id}"
464480 ```
465 </CodeGroup>
466481
467 Save the returned `environment.id` (also in `claude-lock.json` if you used `ant apply`). You'll reference it in every session you create.
482 <ForLanguage not="CLI">
483 Save the returned `environment.id`. You'll reference it in every session you create.
484 </ForLanguage>
485 </CodeGroup>
468486
469487 <Tip>
470488 To run the sandbox on your own infrastructure instead of a cloud sandbox, see