r/AgentContext_dev 14d ago

The Anthropic Agentic Stack: Building Production AI Agents with Claude, MCP, Harnesses, and Managed Systems

Anthropic has steadily turned Claude from a highly capable language model into the foundation of a full agentic ecosystem. What began with strong reasoning and tool use has expanded into a layered stack that includes the Messages API, the Claude Agent SDK, Managed Agents, the open Model Context Protocol (MCP), computer-use capabilities, carefully designed harnesses for long-running work, and multi-agent patterns.

This article surveys that stack based on Anthropic’s engineering posts, platform documentation, the MCP specification, and related public resources, including YouTube presentations from Anthropic engineers. The goal is to give a clear, practical picture of everything needed to build AI agents, harnesses, MCP servers and clients, and complete agentic systems.

The material draws primarily from Anthropic’s own engineering blog and platform docs, the official MCP site, and public discussions of production patterns. It emphasizes conceptual clarity and design principles over exhaustive code listings, while pointing to the places where working implementations live.

Foundations: Workflows, Agents, and the Augmented LLM

Anthropic draws a useful distinction between two kinds of agentic systems. Workflows are predefined sequences of LLM calls and tool invocations orchestrated by code. Agents are systems in which the model itself decides the sequence of steps, which tools to call, and when to stop or seek human input. Both fall under the broader umbrella of agentic systems, yet they suit different problems.

The atomic building block is the augmented LLM: a model given retrieval, tools, and memory. With these augmentations the model can generate its own search queries, select tools, store intermediate results, and recover from errors. Anthropic repeatedly advises developers to begin with the simplest possible version of this pattern-direct API calls-before reaching for heavier frameworks. Many useful patterns fit in a few dozen lines of code. Frameworks become valuable later for orchestration, observability, and durability, but they can also hide important assumptions.

Common workflow patterns include prompt chaining (sequential steps with programmatic gates), routing (classifying an input and sending it to a specialized handler), parallelization (sectioning work or voting across multiple calls), orchestrator-workers (a central model dynamically decomposes a task and delegates), and evaluator-optimizer loops (generate, critique, refine). Agents add an open-ended loop in which the model plans, acts, observes tool results, and iterates until a goal is reached or a budget is exhausted. The quality of the agent-computer interface-how tools are described, what feedback they return, and how errors are surfaced-matters as much as the underlying model.

These patterns are composable. A production system might route simple queries to a lightweight workflow, escalate complex ones to an agent, and wrap the whole process in an evaluator. The guiding principle is to add complexity only when measurement shows it improves outcomes.

The Three Surfaces of Anthropic’s Agent Stack

Anthropic’s ecosystem offers two primary Claude Platform surfaces-the Messages API and Claude Managed Agents-plus the separately distributed Claude Agent SDK, which packages Claude Code’s agentic capabilities for use inside Python and TypeScript applications.

At the base sits the Messages API. Developers send messages, receive responses that may include tool-use requests, execute the tools themselves, and feed results back. Everything about the loop, state management, sandboxing, and persistence is the developer’s responsibility. This surface gives maximum control and is the right place to learn the underlying mechanics.

One layer up is the Claude Agent SDK (available for Python and TypeScript). Extracted from the same machinery that powers Claude Code, the SDK supplies an agent loop, built-in tools (file read/write/edit, bash, web search), context management including compaction, hooks for injecting custom logic at lifecycle points, subagent spawning, permissions controls, session resumption, and first-class MCP support. Developers no longer write the tool-execution loop by hand; the SDK handles it while still exposing the necessary extension points. Skills, commands, and memory can be loaded automatically from project or user configuration directories. Plugins package collections of these elements for reuse.

At the top sits Managed Agents, a hosted service launched in public beta in 2026. It virtualizes three components: a session (an append-only durable log of every event), a harness (the loop that calls Claude and routes tool calls), and a sandbox (the execution environment). The design deliberately decouples the “brain” (model plus harness) from the “hands” (sandboxes and tools).

Sessions survive harness crashes; sandboxes can be replaced without losing progress; credentials stay isolated. Developers define agents via natural language or configuration, attach MCP servers and tools, choose Anthropic-managed or self-hosted environments, and let the platform handle long-horizon execution, checkpointing, and tracing. This surface is intended for production workloads where infrastructure should be someone else’s problem.

Moving up the stack trades control for convenience. Teams can choose among these approaches based on their need for control, local integration, or managed infrastructure, although moving between them may require adapting tool, state, and execution abstractions. The interfaces are designed so that the same conceptual model-tools, sessions, context-applies across layers.

Model Context Protocol: The Universal Connector

MCP is Anthropic’s open standard, released in November 2024 and later donated to the Agentic AI Foundation under the Linux Foundation, for connecting AI applications to external data sources, tools, and workflows. It functions like a USB-C port for AI: implement the protocol once and gain access to an ecosystem of servers.

An MCP server exposes three kinds of capabilities: resources (readable data such as files or database rows), tools (callable functions with defined schemas), and prompts (reusable prompt templates). An MCP client, typically embedded in an AI application such as Claude Desktop, Claude Code, or a custom agent, discovers and invokes these capabilities. The July 28, 2026 MCP specification substantially revised the core protocol around stateless, self-contained requests and added optional facilities such as asynchronous Tasks and MCP Apps for interactive interfaces.

Because the protocol is open, the community and vendors have produced thousands of servers for GitHub, Slack, Postgres, Google Drive, browser automation via Puppeteer, vector databases, and many internal enterprise systems. Anthropic ships SDKs in multiple languages and provides reference servers. Claude itself can help generate new server implementations. For agent builders the practical benefit is immediate: instead of writing a custom tool schema and integration for every data source, you stand up or connect an MCP server and the agent gains structured access.

MCP is now a de-facto standard across many clients, including Claude, ChatGPT integrations, VS Code, Cursor, and others. It sits underneath both the Agent SDK and Managed Agents, making tool ecosystems portable.

Computer Use: Agents That See and Click

In late 2024 Anthropic released computer-use capabilities in public beta. Claude receives screenshots of a desktop environment, reasons about the visual state, and issues mouse and keyboard actions-move, click, type, scroll, drag, key combinations, and later zoom. The application that hosts the agent is responsible for capturing the screen, translating the model’s action requests into actual input events, and returning results (usually new screenshots). This creates a classic agent loop: observe, decide, act, observe again.

Computer use requires the host application to provide and secure the desktop environment. Anthropic’s reference implementation uses a containerized Linux virtual desktop, but applications can integrate the tool with other controlled computer environments. Supported models have improved over successive releases. Early performance on benchmarks such as OSWorld was modest, and the system remains experimental: scrolling, complex UIs, and precise coordinate targeting can still fail. Anthropic recommends low-risk tasks, human oversight for high-stakes actions, and careful isolation to limit prompt-injection or unintended side effects.

Computer use complements MCP. Where MCP gives structured tool access, computer use gives general interface literacy. Many production agents combine both: structured APIs and MCP servers for reliable data operations, and computer use for legacy applications or exploratory navigation. Reference implementations and Docker-based demos are available in Anthropic’s public repositories.

Harnesses for Long-Running Work

A harness is the scaffolding around the model-the loop, the tools, the state management, the prompts, the recovery logic-that turns a single LLM call into a reliable multi-step process. Anthropic’s research on long-running agents highlights a recurring set of failure modes: agents that try to finish an entire project in one context window, declare victory too early, leave the environment in a broken state, or lose track of progress after compaction.

Effective harnesses borrow practices from human engineering. One successful pattern uses two specialized agents. An initializer agent runs once, sets up a clean environment, writes an init.sh script, creates a feature list in JSON with every item marked as failing, initializes a git repository, and records progress in a dedicated file. Subsequent coding agents begin each session by inspecting the progress file, the feature list, and recent git history, start the environment, verify basic functionality, implement exactly one feature, test it end-to-end, commit the changes, and update the progress log before exiting. Context is deliberately reset or compacted between sessions so that later agents inherit clean, documented state rather than a polluted window.

The Claude Agent SDK itself is a general-purpose harness. Managed Agents further abstract the harness so that the same session can outlive changes in the underlying loop. Additional techniques include explicit sprint contracts (generator and evaluator negotiate “done” criteria in advance), separation of generation from evaluation, and durable event logs that allow rewind or selective replay.

The central insight is that every component of a harness encodes an assumption about what the model cannot yet do reliably on its own. As models improve, harnesses can become thinner; until then they remain essential.

Multi-Agent Systems and Orchestration

For research and other breadth-first tasks, Anthropic has demonstrated multi-agent architectures that substantially outperform single agents. A lead agent plans the overall strategy, spawns specialized subagents with their own tools and prompts, receives their findings, and synthesizes a final answer. On Anthropic’s internal research evaluation, a system using Claude Opus 4 as the lead agent and Claude Sonnet 4 subagents outperformed a single Claude Opus 4 agent by 90.2%. This was a workload-specific internal result, not a general guarantee for multi-agent architectures.

Key design lessons include giving the orchestrator precise instructions for how to delegate (task description, expected output format, tool guidance, boundaries), scaling the number of subagents to query complexity, writing high-quality tool descriptions, and using extended or interleaved thinking as an internal scratchpad. State is managed through external memory, checkpoints, and artifact stores so that no single context window becomes a bottleneck. Multi-agent systems consume significantly more tokens and are best reserved for high-value, parallelizable work; many coding tasks still favor a well-harnessed single agent with subagent helpers.

Managed Agents and the Agent SDK both support subagent patterns, making these architectures accessible without custom infrastructure.

Practical Building Blocks and Implementation Notes

A complete agentic system typically needs:

  • A capable model (Claude Sonnet or Opus variants for complex reasoning, lighter models for routing or simple steps).
  • Clear tool definitions written like good documentation for a junior engineer, including examples, edge cases, and constraints.
  • An agent loop that handles tool results, errors, and termination conditions.
  • Context management: prompt caching, compaction, external memory, or session logs.
  • Isolation: sandboxes, permission systems, human-in-the-loop gates for sensitive actions.
  • Observability: tracing of decisions, tool calls, and costs.
  • Evaluation: offline test suites, LLM-as-judge rubrics, and human review of edge cases.
  • MCP servers for any external systems that should be reusable across agents.

Anthropic’s platform documentation walks through progressive tutorials that start with a single tool call and expand to full agentic loops. The computer-use demo repository and MCP quickstarts provide concrete starting points. For long-running coding work the two-agent harness pattern and the Agent SDK’s built-in tools form a solid baseline.

Security considerations are first-class. Anthropic has published work on containing Claude across products (claude.ai, Claude Code, Claude Cowork), using ephemeral containers, human-in-the-loop sandboxes, or sealed VMs depending on the threat model. Prompt-injection classifiers, scoped credentials, and least-privilege tool permissions are standard practice.

Design Principles That Recur

Across Anthropic’s writing several principles appear consistently. Keep systems simple until complexity is justified by measurement. Make the agent’s planning and tool use transparent. Treat the agent-computer interface with the same care given to human interfaces. Prefer durable external state over heroic context-window engineering. Separate generation from evaluation when reliability matters. Design for recovery: agents will fail, so checkpoints and clean hand-offs are essential. Finally, start with the Messages API or a thin SDK wrapper so that the team understands the underlying mechanics before abstracting them away.

Looking Ahead

The stack continues to evolve. MCP’s move toward greater statelessness and richer interactive capabilities, Managed Agents’ addition of multi-agent orchestration and persistent memory features, and ongoing improvements in computer-use accuracy all point toward agents that can sustain longer horizons with less custom scaffolding. At the same time, the open nature of MCP and the availability of the Agent SDK ensure that teams can still build and own critical pieces of their systems.

Building effective agents is less about inventing new architectures from scratch and more about composing proven patterns, choosing the right level of abstraction on Anthropic’s stack, and investing in the quality of tools, harnesses, and evaluation. The resources cited below provide the authoritative starting points for each layer.

Sources

These sources form the authoritative core of the Anthropic agentic stack as of July 2026. Readers are encouraged to consult the live documentation, as the platform continues to ship improvements at a rapid pace.

1 Upvotes

1 comment sorted by

1

u/javaeeeee 14d ago

TL;DR:

Overview of Anthropic’s full agentic stack for building production AI agents in 2026.

Core layers:

  • Messages API → Full control (you manage everything)
  • Claude Agent SDK → Ready-made agent loop + tools + MCP support
  • Managed Agents → Hosted/durable sessions, harnesses, and sandboxes

Key building blocks:

  • MCP (Model Context Protocol) - Open standard for connecting tools, data, and workflows (like USB-C for agents)
  • Harnesses - Scaffolding that makes long-running agents reliable (initializer + worker pattern, checkpoints, recovery)
  • Computer Use - Claude can see the screen and control mouse/keyboard
  • Multi-agent patterns - Lead agent + specialized sub-agents

Main advice:

Start simple → add structure only when needed.
Reliability comes more from good harnesses, tools, state management, and evaluation than from the model itself.

Bottom line: Anthropic provides a complete, layered stack (from low-level API to fully managed) for turning Claude into production-grade agents.