- Harness Agents that have already been productionized in AgentScope 2.0 can be used directly as the Brain runtime. The hosting kernel provides stable inference and Harness capabilities, while the filesystem, workspace, and tool execution are fully isolated inside a Sandbox environment.
- The platform layer handles tenants, permissions, versioning, events, and execution-plane selection. The Control Plane (Agent, Environment, Memory, Vault, Deployment) and the Data Plane (Session, Events, SSE) organize these capabilities into a multi-tenant, auditable, operable managed product.
If you have seen our previously released open-source Agent Builder, you can think of Managed Agents as its productized upgrade: the underlying runtime and the main code paths remain the same; what changes are the resource model, API contract, execution-plane boundary, and multi-tenant governance.
Managed Agents Background
The market already has similar Managed Agents products from Bailian, Claude Code, LangChain, and others. Essentially, I do not believe Managed Agents products are fundamentally different in form from previous low-code agent platforms. They all provide a hosted platform that contains “Agent definition & execution” capabilities. The difference in product expression is that, in the Harness era, Managed Agents emphasize the following two points:- No longer make business developers assemble Harness. Traditional platforms often split memory maintenance, context compaction, state recovery, tool permissions, and subtask cleanup into a large number of configuration items. Managed Agents absorbs these common engineering capabilities into a unified Harness, so developers mainly define business-related Skills, Tools, Subagents, and permission policies. The platform guarantees consistency and upgradability of mechanisms, but the final task quality still depends on the model, system prompt, Skill quality, tool return values, and business evaluation.
- Let customers control the boundary of tool execution and data return. For enterprise users, the real value of an agent comes from connecting it to enterprise data assets, and shell, file I/O, MCP, and business tools are exactly the entry points for data flow. Therefore, the system deliberately splits Brain (reasoning & orchestration) and Hands (tool execution): Brain is responsible for the next round of reasoning, state recovery, and context management; Hands is responsible for actually touching files, networks, and business systems. Hands can run in a platform-managed Cloud Sandbox, or in a Self-hosted Worker inside the customer VPC.
HarnessAgent handles long tasks, context overflow, state recovery, and task delegation, and Managed Agents then adds multi-tenant resources, Environment, and a stable data-plane contract.
With Managed Agents, Anthropic has several progressively advanced solutions between individual and enterprise users:
- Claude Code CLI targets individuals or single-machine development workflows, where the Agent is directly combined with the local workspace, terminal, and session records.
- Claude Agent SDK exposes Session, event stream, and tool interaction as APIs, suitable for embedding in enterprise applications; identity, tenant, and resource isolation are still the responsibility of the integrator.
- Managed Agents further turns Agent, Environment, Session, and the execution plane into managed resources, with the platform handling versioning, permissions, and runtime governance.
Why AgentScope 2.0 Is a Good Foundation for Managed Agents
AgentScope 2.0’s model abstraction, tools and MCP, messages and events, state storage, remote filesystem / distributed BaseStore, and pluggable sandbox all reserve extension points for out-of-process persistence and multi-replica deployment. This means Managed Agents do not have to implement session recovery, tool-result persistence, and cross-request context continuation from scratch. Data-plane replicas must share the AgentStateStore and Workspace backend and correctly handle turn leases and node failover. Among them, Workspace is the logical directory used by an Agent, while Filesystem and Sandbox are the physical backends that host it. The two are decoupled by AbstractFileSystem: the same set of file tools can point to a local directory, a distributed BaseStore, or an E2B sandbox. Because the logical workspace is separated from the physical execution plane, the Agent definition can switch isolation policies without changing the business prompt. Specifically, HarnessAgent assembles the engineering defaults required for long-running execution on top of ReActAgent through Hooks, for example:- Workspace-driven persona and knowledge:
AGENTS.md/MEMORY.md/KNOWLEDGE.mdand similar files are injected into the system prompt; - Session persistence: agent state is restored by
sessionId, so the conversation can continue after a process restart; - Compaction and overflow handling: Harness enables compaction and tool-result eviction by default, and allows the business to override thresholds or explicitly disable them;
- Skills / Subagents: workspace skills, task delegation (task, etc.) are available out of the box;
- Unified filesystem abstraction: local, remote KV, and cloud sandbox (E2B, etc.) all go through the same tool semantics, so Managed Agents can switch the execution plane by Environment type without changing the Agent business definition.
AgentStateStore and a recoverable Workspace backend; the latter is a product resource with a stable ID, event sequence, and persistent state. Only by distinguishing these two can true horizontal scaling be achieved: when a node fails, Java objects can be discarded, but the conversation and long-term memory must be recovered from shared state; whether the workspace is continuous depends on BaseStore, sandbox snapshots, or customer-side persistence, which a Local directory does not guarantee.
Moving from a single enterprise agent application to Managed Agents, the key is not rewriting the inference kernel, but elevating runtime capabilities into stable platform resources. The phrase “add a layer of platform APIs” is not just adding a few Controllers; real productization also requires tenant ACL, Agent version snapshots, Session state machine, append-only events, turn leases, HITL tickets, Environment keys, Worker queues, shared coordination storage, and archive audit. Harness lets the platform avoid rewriting the agent loop, but these distributed responsibilities are still independent engineering systems.
Thus, the complete form of Managed Agents is: a SaaS Control Plane responsible for resource governance, AgentScope 2.0 providing the runtime kernel, and FC Sandbox / E2B or customer Workers carrying Hands under different trust boundaries.
Enterprise Managed Agents Platform in Detail
Overall Deployment Architecture
Core Component Diagram
- Control Plane
- Data Plane
Core Data Flow
The client sends a task request to the Managed Data Plane (Brain) through the (session/event) interface. The Brain restores the Agent from shared state and then executes the entire reasoning and orchestration flow. If there are tool calls in the middle, the Brain routes the tool-call request to the Worker according to the Environment configuration (which may be a managed sandbox environment, a user-managed sandbox environment, etc.).Create an Agent and Run It
First, complete the minimal initialization: log in to Managed Agents, create a reusable Workspace Copilot Agent, and then demonstrate Local, Cloud Sandbox, and Self-hosted Worker modes. This makes it intuitive to see “the Agent definition stays the same, only the Hands location changes.” The following assumes Managed Agents is running onhttp://localhost:8080 and that a model key (such as DASHSCOPE_API_KEY) has been configured.
0. Log in
An existing Session does not support switching the worker execution environment halfway; to change the trust boundary, create a new Session, so the same event history does not cross different execution semantics.
Worker in Local Mode
Local mode is best for development and debugging. Session, Harness inference, model requests, and tool execution are all initiated by the Managed cluster, and files and shell directly land in the local environment visible to the Brain process.type=local: the filesystem and (if enabled) shell are completed inside the host namespace of the managed cluster, there is no independent Hands queue, and no cloud sandbox is called. Suitable for development debugging and trusted internal networks.
Worker in Cloud Sandbox Mode
Cloud Sandbox keeps the hosted Brain but moves files and shell into an isolated sandbox. Harness inference, model requests, and the initiator of tool calls still sit in the Managed cluster; actual command execution and file I/O happen in the FC Sandbox / E2B-compatible environment.E2bFilesystemSpec; when isolationScope=SESSION, different Sessions do not share working directories by default. If you choose snapshot or TAR persistence modes, the recovery policy must also be considered together with AgentStateStore: restoring the model context without restoring files, or vice versa, creates inconsistency where “the Agent remembers it was done, but the workspace does not exist.” Production systems must design the two as a single recovery unit.
Worker in Self-hosted Mode
Self-hosted moves Hands further into the customer environment. The Brain still completes Harness inference in the Managed cluster, but tool tasks enter a queue and are actively polled outbound by the customer-side Worker, which manages the local workspace or sandbox and returns results to the Brain. Throughout the process, the Brain does not need to enter the customer network.tool_use, the event is persisted and the turn enters pending/queued, and the user-side Worker holds the Environment Key to outbound poll → manage the local workspace and execute, or connect to the customer’s own sandbox → return a user.tool_result to resume. This is exactly the opposite of Cloud Sandbox, where “the Brain actively calls the sandbox API”: the execution initiative is on the user side; whether and how to manage the sandbox is also decided by the customer-side implementation.
The target scenario for Self-hosted is to keep databases, code repositories, and release systems inside the customer boundary, but the current reference Worker supports built-in shell / FS tools out of the box. Databases, custom business tools, and intranet MCP still require future Worker extension SPI, or need to be wrapped by users outside the Worker. For tools already integrated with the Worker protocol, the Brain can see the schema, call arguments, and final returned results, but does not need to directly connect to the customer VPC; the Worker only needs to actively initiate HTTPS requests to the platform, and can desensitize results, apply size limits, and audit before returning them.
A More Complex Agent Team Orchestration Example
Define Multiple Agents
The following uses an AgentDev scenario to show a three-role team. The input is a Java library release planning task:- Repo Surgeon gives checklists from the code-quality perspective and only has workspace read and search capabilities.
- Ops Publisher generates a ticket draft from the release-process perspective; in this demo it only generates a text draft, while external MCP integration is explained separately as an optional configuration.
- Team Lead summarizes risks and the acceptance checklist. Team Lead should avoid directly touching business data as much as possible and only be responsible for delegation and summarization.
/api/multiagent/run get stuck at the human-confirmation stage:
enableTools exposes only explicitly allowed tools, and the URL and tool names must be replaced with real values:
"skills": [{"type": "workspace", "name": "release-notes"}] after confirming the Workspace has the corresponding content installed. Currently mcp_toolset.defaultConfig.permissionPolicy does not enter ToolConfirmationMiddleware, so high-risk MCP write operations still require identity, approval, and idempotency controls on the MCP gateway side, and cannot rely solely on always_ask in the Agent body. Then create the Repo Surgeon, which has read-only access to the code workspace:
"skills": [{"type": "workspace", "name": "code-review"}]. Finally create Team Lead. It keeps delegation and result-collection tools, and records the first two members through a real MultiagentSpec; the current execution entry does not automatically start members based solely on this field, and actual execution is still initiated by the Harness delegation or platform fan-out below.
MultiagentSpec is type + agents[]; member references contain type, id, and optional version. wait_async_results is used to block waiting for a generic async inbox; sessions_pending_completions is used to enumerate child Session results that have completed but not yet been consumed. They serve different async patterns, so Team Lead enables both, but the system prompt should make clear when to use which.
Orchestrate Together
The system provides two different multi-Agent execution methods:- Harness native delegation: Team Lead dynamically breaks down tasks using
sessions_spawn/ Subagent tools during reasoning, with explicit delegation and result-recovery relationships between parent and child tasks. - Platform fan-out:
/api/multiagent/runcreates Managed Sessions for multiple Agents and sends the same message to them sequentially or in parallel, suitable for independent analysis, batch processing, and voting.
A Deeper Look at How It Works
The previous sections introduced Brain and Hands coordination from the user perspective and demonstrated a multi-agent orchestration scenario through an Agent Team example. The following further breaks down the Control Plane, Data Plane, and Worker, explaining what state each layer stores, what fault responsibilities it bears, and what role AgentScope 2.0 plays. In one sentence: the Control Plane manages “definitions and permissions,” the Data Plane manages “run it and record it,” and the Worker manages “on whose machine to act”; AgentScope 2.0’sHarnessAgent + filesystem/sandbox abstraction is the kernel of the Data Plane and Hands, and the SaaS API builds platform-level semantics without re-implementing the inference loop.
Control Plane
The Control Plane is responsible for “what is allowed to run and who can use it.” It manages static Agent definitions and their versions, as well as reusable resources such as Model, Skills, MCP, Tools, Environment, Memory, Vault, and Resources. Resources can belong to an individual user and be isolated by owner / ACL, or be globally prebuilt by the platform, such as public Skills, MCP catalogs, and built-in toolsets. These resources can be understood in three relationships: “define, reference, and mount.” Model, Tools, MCP, and Skills enter the Agent version definition; Environment exists independently and is referenced by Session; Memory Store, Vault, and Files/Resources are mounted when the Session is created. Globally prebuilt resources provide platform defaults, while user resources carry owner / share ACL. This avoids copying public Skills into every Agent, while also preventing different tenants from seeing each other’s data through shared directories. The Control Plane also undertakes change governance. Agent updates create new versions, and old Sessions can continue to record and recover currently supported historical fields; Environment keys can be rotated; resources can be archived rather than physically deleted immediately; high-risk built-in tool permissions are recorded with versions. For production platforms, these capabilities are often more critical than “whether a new model can be called,” because they determine whether rollback, canary, and incident accountability are feasible. Environment and Session are easy to confuse, but they belong to different layers. This article uses the following boundary:- Environment belongs to the Control Plane: it is an “execution-plane template” (
local/sandbox/remote/self_hosted+ config + environment key), can be referenced by multiple Sessions, carries archive and sharing, and itself does not produce conversation events. - Session belongs to the Data Plane: it is a running instance of Agent × Environment, with a state machine and event log; creation parameters reference the
agentId/environmentIdfrom the Control Plane, but lifecycle APIs (events / stream / interrupt) are the core of the Data Plane.
- Creating a session → Data Plane (expanded in the next section)
- Defining an Environment → Control Plane (
POST /api/environments, rotate key, archive)
Data Plane
The Data Plane is responsible for “making a Session that records an Agent version actually run, and fully recording the process.” It hosts model calls, the ReAct loop, Harness hooks, turn leases, the Session state machine, event persistence and SSE push, and handles interrupt, HITL, and externalized tool-result resumption. These operations are not ordinary CRUD add-ons; they revolve around the state machine: creating a Session records the Agent version and Environment reference,user.message pushes the state from idle to running, tool confirmation restores requires_action to running, interrupt attempts to cancel the current turn, archive terminates subsequent use but keeps audit history, and delete clears the session and events. Clients should drive the UI by events rather than polling whether some internal thread is still alive.
The Data Plane consists of peer SaaS replicas; a request may arrive at any instance. A replica first finds the version definition in the Control Plane by agentId, then computes a build key from Agent version, Environment, and mount information: if there is a cache hit, reuse HarnessAgent; otherwise rebuild. Each turn locates the session state through a RuntimeContext containing userId and sessionId, so “stateless replicas” here means not holding irreplaceable authoritative state, not recreating Java objects for every request.
RuntimeContext can be understood as the “identity and resource locator” for a run, rather than stuffing all state into a Map. userId determines the multi-tenant namespace and ACL, sessionId locates the recoverable short-term brain state; Environment determines the filesystem/sandbox implementation; Memory Store and Vault are resolved into filesystem routes and credentials during the build phase. Harness depends only on these stable abstractions, so when the same request hits another replica, a semantically equivalent runtime environment can be reassembled.
The Data Plane actually hosts four layers of state with different lifecycles:
These four layers cannot be summarized as “save conversation history.” For example, Session events can prove the model once requested to write a file, but cannot replace the file itself; AgentStateStore can recover context, but does not automatically recover side effects of external databases. The recovery flow must recover each layer separately, and then re-associate them through event ID, tool call ID, and resource references.
When Harness inference needs to call a tool, the specific execution is decided by Environment. Cloud Sandbox directly reuses Harness’s filesystem / sandbox abstraction, with the Brain initiating E2B-compatible calls; Self-hosted replaces tools with schema-only definitions, suspends the turn after
agent.tool_use, and returns results through the work queue and Worker protocol.
AgentScope 2.0’s role here is very clear: provide HarnessAgent and the FS/Sandbox abstraction, ensuring “effect defaults” and “replaceable execution plane”; Managed Agents is responsible for leases, event contracts, multi-tenancy, and ACL, rather than wrapping another private ReAct.
Worker
Worker focuses on how tools get from the Brain to the real execution environment. The system has two paths, distinguished by who initiates the tool call and who manages the sandbox lifecycle. In fully managed mode, the Brain is responsible for creating and reclaiming the Sandbox, and also actively initiates file or shell calls through the E2B-compatible API provided by AgentScope. The backend can be supported by compatible services such as FC Sandbox, with the tool process and working directory inside the sandbox instance. The platform holds the full handle, so it can uniformly set timeout, isolation scope, and persistence policies. In Self-hosted mode, after the Brain receives a tool call from the model, it does not connect to the customer VPC, but persistsagent.tool_use and creates a work item. The customer-side Worker actively polls the queue, executes the tool in its own host or sandbox, and returns the result through user.tool_result, allowing the Brain to resume the next round of reasoning.
Their failure-recovery responsibilities also differ. In fully managed mode, the Brain knows the sandbox handle and can uniformly set timeout, snapshot, and reclaim policies; in Self-hosted mode, the Brain only knows the work state and tool result, and the customer Worker must be responsible for whether the local sandbox is still alive, whether duplicate tasks are safe, and whether results need to be desensitized. The platform provides the protocol and state machine, but cannot define the idempotency semantics of business tools for the customer.
The Work state machine is queued → starting → active → stopping → stopped.
When deploying an independent Worker, both Brain and customer-side processes need to be configured. The following gives the minimal startup method and production checklist.