Claude Managed Agents is Anthropic's beta infrastructure for stateful, longer-horizon agents. It provides versioned agent definitions, cloud or self-hosted environments, durable sessions and events, tools, MCP connections, and cost ceilings.
The beta label matters. Endpoints, headers, model identifiers, SDK methods, and command-line examples can change. I removed the old copied API snippets from this article rather than turn a dated example into a deployment trap. Use the current Managed Agents quickstart as the executable source of truth.
The four concepts
Agent definition. The versioned configuration describing instructions, model selection, tools, and connected capabilities. Treat changes to it like code: review them, test them, and preserve the version used by a session.
Environment. The compute boundary where work runs. A cloud environment or a self-hosted environment determines installed software, network access, credentials, and data exposure. Isolation does not replace least privilege.
Session. A stateful execution of an agent. Sessions can preserve conversation and files across turns, which is useful for long work and important for retention policy. Know what persists, where, and for how long.
Events. The durable stream of user messages, agent output, tool calls, and lifecycle changes. Build monitoring from events instead of assuming a request succeeded because it was accepted.
A deployment sequence I trust
1. Start from current documentation
Confirm beta eligibility, authentication, SDK version, limits, and pricing in Anthropic's current documentation. Generate commands from that version. Do not reuse a model ID, beta header, or request body from an older article.
2. Define one narrow job
Pick a job with clear inputs and a reviewable artifact: inspect a repository and propose a patch, summarize an approved document set, or analyze a non-sensitive dataset. Avoid customer sends, payments, or account changes in the first deployment.
3. Create the least-privileged environment
Install only required packages. Limit outbound network access to necessary services. Keep credentials outside prompts and definitions. Use short-lived, scoped secrets where supported. If a tool can read one repository, do not grant the whole organization.
4. Configure tool permissions explicitly
Anthropic documents different defaults for agent tools and MCP tools, while custom tools run in the customer application and remain the developer's responsibility. Read the current permission policy documentation.
Do not assume a default is safe for your workload. Read-only inspection may be allowed automatically; shell execution, network writes, and third-party tools may require approval or a narrower policy.
5. Create a session and observe events
Send a harmless task. Record the definition version, environment, user request, tool calls, cost, result, and stop reason. Interrupt the session once to prove you can. Test a prohibited tool call and verify that it fails.
6. Add a hard ceiling and human escalation
Cost ceilings are a control, not a cost prediction. Set a conservative ceiling and bounded retry policy. Define what happens when the agent lacks permission, the environment fails, or the result is ambiguous. The correct outcome may be a request for human review.
What this infrastructure enables
Managed Agents can support coding workflows, document processing, data analysis, and MCP-connected operations. Those are capability categories, not guarantees about a particular company's deployment time or results.
The infrastructure reduces plumbing. You still own task design, evaluation, authorization, privacy, monitoring, incident response, and the external actions your application exposes.
Before production
Build an evaluation set with normal tasks, adversarial inputs, permission failures, tool errors, long outputs, and interruption cases. Test every definition version before promotion. Keep production credentials separate from development. Provide a way to pause new sessions and revoke environment access.
Managed Agents can make a stateful agent easier to operate. The safe starting point is not the most impressive demo. It is one bounded job whose inputs, tools, events, costs, and outcome you can explain from end to end.

