I want to learn about Claude Managed Agents
Welcome! I am excited to help you master , Anthropic's fully managed execution layer for running autonomous AI agents at scale.
Before we build our curriculum and dive into the architecture, I would love to learn a little more about your background so we can make our time together as valuable as possible.
I am a solopreneur exploring what tools I can build and sell
It is great to meet you! As a solopreneur, your time is your most valuable asset. When you are building products to sell, you want to spend 100% of your energy on the actual user experience and features—not on wrestling with the complex, hidden infrastructure of AI orchestration.
Continue to why we should use a managed service instead of building our own harness
The Hidden Infrastructure Iceberg
An architectural comparison between a custom developer-built agent harness and the Claude Managed Agents Platform.
Continue to the key benefits and tradeoffs of using this managed service
The Tradeoffs: Speed vs. Control
| Benefit / Tradeoff | Custom Self-Hosted Harness | Claude Managed Agents |
|---|---|---|
| Time to Market | Weeks or months of backend setup | Days (using pre-built infrastructure) |
| Data Governance | 100% control over data flow | Data stored on Anthropic's cloud |
| Model Flexibility | Can swap to local or open-source models | Locked into Anthropic's Claude ecosystem |
| Operational Overhead | High (managing servers, sandboxes, state) | Virtually zero (handled by Anthropic) |
If your target market can accept cloud-hosted processing, the velocity advantage is massive. Next, let's look at the actual architecture under the hood: how Agents, Environments, and Sessions connect to make this happen.
Continue to the high-level architecture of Managed Agents
The Four Pillars of Managed Agent Architecture
- : The Contractor's Mind This is the static definition of who your agent is. It includes the underlying Claude model, the system prompt, and the specific tools or it has access to. You define this once, and it serves as the blueprint.
- : The Contractor's Laptop This is the isolated workspace where the agent actually runs. It is typically a secure, Anthropic-managed cloud sandbox (a secure container) pre-configured with the files, packages, and network access the agent needs to do its job. You can even choose to point this to a self-hosted sandbox on your own infrastructure.
- : The Contractor's Work Shift A Session is a single, active run of an Agent within an Environment to accomplish a specific task. If your Agent is a 'Data Analyst', a Session is started when you ask it to 'Analyze quarterly_sales.csv'. The Session keeps track of the persistent storage, files, and conversation history until the task is complete.
- : The Status Report Because Sessions can run autonomously for a long time, you don't just wait for a final answer. The Session streams Events back to your main application. These events show you exactly what the agent is doing in real-time: when it is thinking, when it is running a bash command, and when it is sending a message back to the user.
Continue to Hands-on: Getting Started with the API
Let's roll up our sleeves and look at how to actually build one. Since you are looking to build products to sell, understanding the API structure directly is the fastest way to get a prototype up and running.
The API and Headers
https://api.anthropic.com/v1/agents and must include the anthropic-beta: managed-agents-2026-04-01 along with your standard API key.Step 1: Creating Your Agent Blueprint
POST request to the /v1/agents endpoint. Let's look at how we would define a basic "Coding Assistant" agent using a shell command:curl https://api.anthropic.com/v1/agents \
-H "x-api-key: your-api-key" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d '{
"name": "Solopreneur Code Partner",
"model": "claude-3-5-sonnet-20241022",
"system": "You are an elite software developer. Write clean, modular code.",
"tools": [{
"type": "agent_toolset_20260401"
}]
}'
When you send this request, Anthropic's API will return a JSON object containing a unique agent_id. You will store this ID in your database because you will use it to spin up individual sessions whenever a user wants to interact with your agent.
Now that we have created our Agent blueprint, should we move on to how you actually configure the Environment (the sandbox) and start a real-time working Session?
What can I do to use Claude Managed Agents for regulated industry or where data privacy is very essential like finance, banking or healthcare.
The Solution: Self-Hosted Sandboxes
| Security Dimension | Fully Managed Cloud Sandbox | Hybrid Self-Hosted Sandbox |
|---|---|---|
| Data Storage | Stored on Anthropic servers | Stored on your private VPC |
| Network Controls | Configured via Anthropic API | Configured via your own firewall |
| Compliance (HIPAA) | Not eligible | Eligible (with private data hosting) |
| Setup Complexity | Zero (fully managed) | Moderate (requires infrastructure setup) |
By implementing a self-hosted sandbox, you can confidently sell to security-conscious enterprise clients, assuring them that their primary data assets never leave their secure network boundary.
Would you like to explore how to configure a self-hosted environment in code, or should we continue to the lifecycle of a working Session and event handling?
How do I configure a self-hosted sandbox?
Configuring a self-hosted sandbox is how you give your security-conscious clients absolute peace of mind. By shifting the execution out of Anthropic's cloud and onto your own servers, you keep sensitive data behind your own firewall while still using Claude as the 'brain' to drive the logic.
Step 2: Defining a Self-Hosted Environment
POST request to /v1/environments defining a self-hosted setup. We must point Anthropic's orchestrator to our own private webhooks or a secure, local where our runner is listening.curl https://api.anthropic.com/v1/environments \
-H "x-api-key: your-api-key" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d '{
"name": "Secure Enterprise Sandbox",
"type": "self_hosted",
"config": {
"runner_endpoint": "https://agent-runner.yourcompany.com/v1/execute",
"security_token": "your-rotation-token-here"
}
}'
runner_endpoint. Your infrastructure executes the command locally within your locked-down container and posts the results back to Claude.
This keeps your actual databases and code files completely shielded from the public internet.
Now that you know how to build both the Agent blueprint and configure a secure Environment, shall we continue to how you actually launch a real-time working Session and handle its streaming events?Make me a diagram comparing cloud sandboxes vs. self-hosted sandboxes
I would love to draw that out for you! Visualizing the difference between these two environments makes it immediately clear how the data boundaries shift to protect your clients.
A split-screen architectural comparison of a fully managed cloud sandbox versus a hybrid self-hosted sandbox execution environment.
Compare Claude Managed Agents with Agno.com
This is a brilliant comparison to make because both tools are trying to solve the "agent orchestration" problem, but they approach it from completely opposite philosophy and system design viewpoints.
The Core Difference: Platform vs. Framework
| Feature Dimension | Agno (Framework Model) | Claude Managed Agents (Platform Model) |
|---|---|---|
| Deployment Location | Your local machine, AWS, GCP, or private servers | Anthropic's managed cloud environment |
| Infrastructure Management | You manage Python environments, Docker, and servers | Anthropic manages sandboxes and resources |
| State & Memory | You write storage adapters to your databases (e.g., PostgreSQL) | Automatically saved and managed by Anthropic |
| Model Lock-In | Multi-model (works with OpenAI, Gemini, local models) | Exclusively tied to Claude models |