Building more effective AI agents
By Anthropic
Key Concepts
- Agent Training: Claude's proficiency in agent tasks stems from extensive practice during training, involving open-ended problems, multi-step processes, tool usage, and exploration.
- Reinforcement Learning (RL): A key training mechanism used for coding and search tasks, enabling Claude to learn objectives with limited guidance.
- Coding as a Fundamental Skill: Claude's strong coding abilities are seen as a foundational skill that enables it to perform a wide range of other tasks, including web search, planning, and artifact generation.
- Claude Code SDK: A framework for developers to build agents, providing a pre-built agent loop and tool execution capabilities, allowing customization for specific business logic.
- Claude MD Files & Skills: Mechanisms for providing Claude with contextual information about programming style, directory layouts (MD files), and broader resources like templates, code, images, and assets (Skills) to enhance its capabilities.
- Agent Loops vs. Workflows: Agent loops, where a model iterates and corrects its work, are now outperforming traditional workflows (sequential prompt chaining) for tasks requiring high quality.
- Workflows of Agents: An evolution where each step in a workflow is an agent loop, allowing for iterative refinement within each stage.
- Observability and Verification: Challenges in understanding and verifying the actions of complex agent systems.
- Multi-Agent Systems: Multiple agents (or Claudes) working concurrently, often with a parent agent delegating tasks to sub-agents that can operate in parallel.
- Sub-agents: Agents that perform specific tasks delegated by a parent agent, often used to manage complexity, parallelize work, or preserve main context.
- Tool Calling: The framework used for communication between agents and sub-agents, where sub-agents are treated as tools.
- Test-Time Compute: Utilizing multiple agents to work on a problem simultaneously to achieve a better final answer.
- Agent Overhead: The risk of overbuilt multi-agent systems spending too much time communicating and not enough time making progress, similar to communication overhead in large human organizations.
- Developer Best Practices: Starting simple, adding complexity only as needed, and thinking from the agent's perspective when designing tools and prompts.
- Tool/MCP Design: Tools or Model-Centric Processes (MCPs) should be designed to mirror the user interface (UI) rather than the API, presenting information holistically to the model.
- Computer Use: The ability for agents to directly interact with computer interfaces, opening up new domains like editing Google Docs directly.
Agent Training and Claude's Capabilities
Claude's effectiveness as an agent is attributed to its training regimen. During training, Claude was exposed to open-ended problems that required it to take multiple steps, utilize tools, and explore its environment before providing a final answer. This extensive practice, particularly through Reinforcement Learning (RL) on coding and search tasks, has equipped Claude with the ability to act as an agent with limited external guidance.
Coding as a Foundational Skill
While Claude is recognized for its strength in coding, this is not seen as a siloed skill. Instead, coding is considered a fundamental capability that unlocks a broad range of other functionalities. For instance, a coding agent can perform web searches via APIs, plan events by creating schedules, and generate various artifacts. The strategy is to "train on the hardest thing first," with the belief that mastering coding makes other tasks more manageable.
Example: Claude can write a Python script that, when executed, generates an Excel sheet. This demonstrates how coding can produce non-code-related artifacts. Another example is Claude generating SVG files for diagrams, and for complex, repetitive images, it can write code to generate the SVG more efficiently than direct creation. This highlights how code can accelerate tasks that would be tedious for humans, such as repetitive actions.
Developer Tools and Frameworks
Claude Code SDK
The Claude Code SDK is a significant tool for developers building agents. Previously, developers had to construct agent loops, tool execution, and file interactions from scratch. The SDK provides a pre-built, general-purpose agent loop that is optimized for code but adaptable for other uses. Developers can integrate their custom business logic and tools into this scaffold, saving time on reinventing core agent functionalities.
Customizability: The SDK allows developers to remove coding-specific components and insert their own prompts and tools, fitting them into the existing structure.
Diverse Applications: The SDK has been used for non-coding tasks, such as planning a date by performing web searches for activities and restaurants.
Claude MD Files and Skills
Claude MD files provide Claude with project-specific information, such as programming style and directory structures. Building on this, Skills represent a more advanced concept. Skills allow developers to provide Claude with any type of file as a resource, including PowerPoint templates, helper scripts, images, and assets. This goes beyond simple instructions, offering reusable components for the agent.
Analogy: The concept of Skills is likened to Neo in "The Matrix" receiving kung fu knowledge instantly. Providing Claude with a Skill, like "how to create spreadsheets," effectively makes it a "banker" capable of financial modeling.
Evolution of Agent Architectures
From Workflows to Agent Loops
The landscape of agent development has shifted from defined workflows (sequential prompt chaining) to agent loops. Claude's improved ability to respond to feedback and self-correct has made agent loops significantly outperform workflows in terms of absolute quality. Workflows remain suitable for low-latency, single-shot responses.
Workflows of Agents
A more recent development is the concept of "workflows of agents." In this model, each step within a traditional workflow is replaced by an agent loop. For instance, instead of a single SQL query attempt, an agent loop can iteratively refine the query until it's correct before proceeding to the next step. This addresses the fragility of traditional workflows where a failure in one step could cascade and break the entire process.
Observability and Verification Challenges
Observability in complex agent systems is a significant challenge. The advice given is to prioritize simplicity and start with the most basic solutions (e.g., single-shot prompts or the Claude Code SDK) before incrementally adding complexity, as increased complexity hinders observability.
Multi-Agent Systems
Definition and Distinction
Multi-agent systems differ from workflows of agents. In multi-agent systems, multiple agents operate concurrently. A parent agent can delegate tasks to several sub-agents that work in parallel.
Example: Anthropic's deep research search product uses a main orchestrator agent that creates multiple sub-agents to perform searches in parallel, leading to faster results for the user.
Sub-agents and Context Management
Sub-agents can be used to manage large token counts. If a sub-task requires processing tens of thousands of tokens (e.g., finding a specific class implementation), a sub-agent can handle this work, returning only the essential information to the main agent, thus protecting the main context.
Sub-agents as Tools
From Claude's perspective, sub-agents function as tools. Claude can pass prompts to these sub-agents, which then execute the work. A key area of research is training Claude to be a better manager, providing clear instructions and obtaining the necessary outputs from its sub-agents.
Managerial Challenges: Claude, like new human managers, can sometimes provide incomplete or unclear instructions to sub-agents, expecting them to have context they lack. Training has shown Claude becoming more verbose and detailed in its instructions to sub-agents.
Use Cases for Multi-Agent Systems
- Coding: Parallelizing or MapReducing tasks, splitting output creation among multiple sub-agents for efficiency.
- Test-Time Compute: Using multiple Claudes to work on a problem concurrently to achieve a superior final answer.
- Tool Management: Splitting a large number of tools (e.g., 100-200) among sub-agents, where each sub-agent manages a smaller, more manageable set of tools.
Failure Modes and Best Practices
Agent Overhead
A potential failure mode is overbuilding multi-agent systems, leading to excessive communication overhead between agents and reduced progress on the main task. This is analogous to communication overhead in large human organizations. The goal is to create effective "organizations of Claudes" with minimal overhead.
Developer Tips
- Start Simple: Begin with the simplest possible solution and add complexity only as needed.
- Empathize with the Agent: When designing tools and prompts, consider what Claude actually "sees" and ensure sufficient information is provided.
- Review Raw Logs: Regularly examine tool calls and logs to understand the agent's perspective.
- UI-Centric Tool Design: Design tools and MCPs to be one-to-one with the user interface (UI) rather than the API. This means presenting information holistically to the model, minimizing the number of tool calls required for a user-like experience. For example, instead of separate API calls for user ID to username and channel ID to channel name, a single tool could present all relevant information at once.
Future of Agents
Pervasiveness and Verifiability
Agents are expected to become more pervasive, starting in verifiable domains like software engineering. Coding agents have already significantly impacted workflows. A key future development is agents becoming better at verifying their own work, for example, by testing web applications they create and identifying their own bugs.
Computer Use and Domain Expansion
The ability for agents to perform "computer use" (direct interaction with interfaces) will open up new domains. For instance, an agent could directly edit a Google Doc, eliminating the need for copy-pasting. This allows Claude to be present and act wherever the user is.
Prediction: The future may see agents writing Google Docs and responding to comments, enhancing user experience through direct interface interaction.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

Why Does This Guy Appear In Kids Videos?
sphynx

TIC en las Organizaciones - Electiva Complementaria II Unisimon
Julieth Güell S

How to Tame Your Advice Monster | Michael Bungay Stanier | TED
TED

Margaret Heffernan: Why it's time to forget the pecking order at work
TED

The importance of psychological safety: Amy Edmondson
The King's Fund

What Is Psychological Safety?
Harvard Business Review

13-Conflict Management: Listening in Conflict
Deliberate Development