The Evolution of Agentic Surfaces
As AI models have progressed from simple Q&A to autonomous task completion, the infrastructure required to support them has shifted from simple API calls to complex, long-running agentic loops. Initially, developers relied on the Messages API, which required them to manually build and maintain the 'agentic loop'—managing context, tool execution, and state. This led to significant 'production infrastructure' challenges, including session management, sandboxing, and observability, which distracted teams from their core product.
Anthropic introduced the Claude Agent SDK to package these harnesses, but it still left developers responsible for hosting and credential management. The latest iteration, Claude Managed Agents, provides a fully managed environment where Anthropic handles the infrastructure, allowing developers to focus solely on the agent's task, context, and domain knowledge.
Architectural Principles: Decoupling Brain and Hands
A core engineering decision in Managed Agents is the decoupling of the 'brain' (the agentic loop/model reasoning) from the 'hands' (the tool execution environment).
- Reliability: By separating these components, a failure in the sandbox (hands) does not crash the agent's reasoning process (brain). The system can simply spin up a new sandbox and retry.
- Performance: Decoupling eliminates the latency penalty of waiting for container initialization before the model begins reasoning, significantly improving 'time to first token.'
- Context Engineering: Traditional harnesses often suffer from 'context rot' where the model loses information as it discards tokens. Managed Agents uses a durable, persisted session log. If the model needs to recover lost context, the harness can re-read slices of the session log, ensuring the agent remains coherent over long-running tasks.
Core Primitives for Production
Managed Agents is built around three primary primitives that define the agent's lifecycle:
- Agent Definition: The configuration of the model, system prompts, and toolsets (e.g., MCP tools).
- Environment: The isolated container where the agent executes code, with restricted networking and host access to ensure security.
- Session: A durable, persisted resource that tracks every interaction, enabling observability and the ability to resume long-running tasks after failures.
Lessons from the Field
- Credential Security: To prevent models from seeing sensitive tokens, Anthropic introduced 'Vaults.' Credentials are kept separate from the agent's reasoning loop and are only decrypted at the moment of tool execution.
- Avoid 'Harness Anxiety': Harnesses often encode assumptions about model behavior (e.g., context resets). As models improve (e.g., moving from Sonnet 3.5 to Opus 4.5), these hard-coded fixes can become 'dead weight' that degrades performance. Build harnesses that are agile and easily updated as model capabilities evolve.
- Design for Asynchronicity: Modern agents are increasingly asynchronous. A production-ready harness must support parallel workflows and long-duration tasks (hours or days) rather than assuming a request-response cycle.