No history yet

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.

That is exactly where comes in. To help us kick off our journey, let's take a look at the custom learning path we will use to master this tool and get your product ideas to market faster.
Your path
Hands-on: Getting Started
Advanced Topics & Best Practices
Let's dive straight into our first subtopic: What are Claude Managed Agents? To understand them, we have to look at how we used to build agents. In a traditional setup, you use the standard Messages API. Your code sends a prompt to Claude, Claude replies asking to use a tool, your backend executes that tool, you format the result, and you send it back to Claude. With Managed Agents, you completely bypass this back-and-forth loop. Instead of manually orchestrating every single turn, you interact with a pre-built, cloud-hosted agent harness. You simply define the agent's goals, tools, and permissions once, and Anthropic's infrastructure runs the entire autonomous loop in the cloud until the job is done.

Continue to why we should use a managed service instead of building our own harness

Building your own agent harness might sound straightforward at first—just write a loop that calls an LLM, parses the tool requests, runs them, and feeds the results back. But once you move past a simple demo, you hit a massive wall of systems engineering challenges that can easily derail a solo developer.

The Hidden Infrastructure Iceberg

When you build a production-grade agent on your own, you aren't just writing LLM prompts. You have to build and maintain a massive, complex backend infrastructure. First, there is the problem of . If you give an autonomous agent the ability to execute arbitrary code or run bash commands on behalf of your users, you cannot just run that code directly on your primary servers. One bad loop or malicious injection could compromise your entire database. You have to spin up, manage, and tear down secure, isolated Docker containers for every single user session.
Second, you have to manage . Traditional LLM APIs are completely stateless. To keep an agent's train of thought alive over hours or days, you have to manually save the database state, preserve the file system changes the agent made, manage token-limit-friendly message histories, and handle network dropouts. It is a massive engineering headache.

An architectural comparison between a custom developer-built agent harness and the Claude Managed Agents Platform.

By offloading all of this systems-level scaffolding to Anthropic's hosted infrastructure, you can bypass months of platform engineering. You can go from a cool idea to a live, sellable product in days instead of months.

Continue to the key benefits and tradeoffs of using this managed service

The Tradeoffs: Speed vs. Control

When you are building a product to sell as a solopreneur, choosing Claude Managed Agents is fundamentally a trade of control for velocity. For most solo developers, this is a spectacular deal—but you need to understand exactly what you are giving up before you build your business on it.
Benefit / TradeoffCustom Self-Hosted HarnessClaude Managed Agents
Time to MarketWeeks or months of backend setupDays (using pre-built infrastructure)
Data Governance100% control over data flowData stored on Anthropic's cloud
Model FlexibilityCan swap to local or open-source modelsLocked into Anthropic's Claude ecosystem
Operational OverheadHigh (managing servers, sandboxes, state)Virtually zero (handled by Anthropic)
On the benefits side, your speed to production is unmatched. Instead of spending months configuring Docker runtimes and managing persistent databases, you call a single API. Anthropic handles the orchestration, state storage, and scaling. However, the key tradeoff is . Because Managed Agents are stateful, Anthropic must store session histories, modified files, and sandbox states on their servers. Consequently, Managed Agents are not currently eligible for Zero Data Retention or certain strict compliance standards. If you are building a tool for highly regulated industries like healthcare or finance, this cloud-hosted execution layer might be a dealbreaker for your target clients.

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

Now that we understand why a managed platform is so valuable, let's lift the hood and look at how it actually works. The system is built around four core architectural pillars: the Agent, the Environment, the Session, and Events.

The Four Pillars of Managed Agent Architecture

Think of the architecture like setting up a remote software contractor to do a job for you. You don't just tell them to 'write code'—you have to define who they are, give them a laptop, let them work, and listen to their updates. Here is how Anthropic maps those steps out in code:
  1. : 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.
  2. : 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.
  3. : 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.
  4. : 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.
This clean separation is why the architecture is so powerful. You can define a single Agent blueprint, but run it across hundreds of independent Sessions, each isolated inside its own secure, sandboxed Environment. Now that you know the high-level architecture, are you ready to see how we actually initialize one of these agents in code?

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

Because Claude Managed Agents is currently in public beta, you must include a specific beta header in your API requests to unlock these endpoints. Whenever you send a request to the platform, you will use the base URL 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

The very first step is defining the Agent's identity. Remember, this is the static blueprint—the "contractor's mind." We do this by sending a 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"
    }]
  }'
In this request, we give our agent a name, select our model, and write a system prompt. Notice the tool type. Instead of writing custom code to let Claude read files or run bash commands, specifying this pre-built suite automatically grants Claude access to a secure terminal, file system tools, and web search inside its future sandbox.

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.

This is one of the most critical questions you will face, especially when pitching your products to enterprise clients in sectors like banking, healthcare, or government. Since Claude Managed Agents run completely in the cloud and store session history, modified files, and sandbox states server-side, they are not currently eligible for or HIPAA compliance. If a client tells you, "Our data cannot sit on Anthropic's servers," you need a strategy to bypass this roadblock.

The Solution: Self-Hosted Sandboxes

Fortunately, Anthropic designed the platform to decouple the "brain" from the "workspace." While the model's reasoning still flows through Anthropic's API, you can host the on your own private infrastructure. This ensures that sensitive data, proprietary code, and databases remain inside your own virtual private cloud (VPC), completely isolated from the public internet.
Security DimensionFully Managed Cloud SandboxHybrid Self-Hosted Sandbox
Data StorageStored on Anthropic serversStored on your private VPC
Network ControlsConfigured via Anthropic APIConfigured via your own firewall
Compliance (HIPAA)Not eligibleEligible (with private data hosting)
Setup ComplexityZero (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

To make this work, we configure a custom . Instead of letting Anthropic provision a default cloud container, we will send a 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"
    }
  }'
When Claude decides to run a file modification or shell command inside this self-hosted environment, Anthropic's platform doesn't execute it. Instead, it sends a secure, cryptographic request to your 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.

I have initialized a visual diagram that maps out this architecture side-by-side. Notice how in the self-hosted model, your client's actual files and database records stay locked inside your private VPC infrastructure, while only high-level instructions and reasoning flow back and forth to Anthropic's servers. Now that you have a solid grasp of how to keep your enterprise sessions highly secure, let's explore the final pillar of our architecture: the lifecycle of an active and how your application handles its real-time streaming to keep users updated.

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

The fundamental divide comes down to where the code actually runs and who manages the servers. , formerly known as Phidata, is an open-source development framework. It is a library of Python code that you install locally on your machine or deploy inside your own cloud cluster. It provides the programmatic wrappers to connect models to databases, vector stores, and APIs, but you are 100% responsible for provisionining the servers, securing the runtimes, and managing the active execution loops.
In contrast, Claude Managed Agents is a fully hosted infrastructure platform. Anthropic isn't just giving you a software library; they are providing the actual cloud runtime, the automated container orchestration, and the persistent session database. You don't have to spin up a single Docker container or manage a state database—Anthropic's servers execute the loop and persist the memory automatically.
Feature DimensionAgno (Framework Model)Claude Managed Agents (Platform Model)
Deployment LocationYour local machine, AWS, GCP, or private serversAnthropic's managed cloud environment
Infrastructure ManagementYou manage Python environments, Docker, and serversAnthropic manages sandboxes and resources
State & MemoryYou write storage adapters to your databases (e.g., PostgreSQL)Automatically saved and managed by Anthropic
Model Lock-InMulti-model (works with OpenAI, Gemini, local models)Exclusively tied to Claude models
For a solopreneur, the choice is clear-cut: if you want absolute model flexibility and zero cloud vendor lock-in, Agno is fantastic. But if your goal is to launch an autonomous, sandboxed tool to customers next week without writing systems infrastructure code, Managed Agents is the faster vehicle. Now that we have cleared up where the platform fits compared to open-source frameworks, are you ready to learn about the lifecycle of a working Session and how to stream its real-time Events?