Table of Contents
ToggleHow We Build Effective Agents: Barry Zhang, Anthropic


Audio Podcast on ‘How We Build Effective Agents: Barry Zhang, Anthropic’
Building Effective Agents
Key Insights from Barry Zhang's Presentation
This document summarizes key insights from Barry Zhang's presentation, "How We Build Effective Agents," focusing on core ideas, practical advice, and future considerations for developing AI agents.
1. The Evolution of AI Systems: From Workflows to Agents
Zhang traces the evolution of AI applications, highlighting a progression from simple, single-call features to complex, autonomous agents:
- Simple Features (2-3 years ago): Began with basic tasks like summarization, classification, and extraction, which "felt like magic." These are now "table stakes."
- Workflows (Beginning of Agentic Systems): As products matured, "one model call often wasn't enough." This led to orchestrating multiple model calls in "predefined control flows," trading off cost and latency for better performance. Workflows are characterized by their explicit, mapped-out decision trees.
- Agents (Current Focus): Represent a more advanced stage where "unlike workflows, agents can decide their own trajectory and operate almost independently based on environment feedback." This increased agency leads to greater usefulness and capability, but also higher costs, latency, and "consequences of errors."
The next phase of agentic systems is still uncertain, potentially involving "single agents becoming a lot more general purpose and more capable" or "collaboration and delegation in multi-agent settings."
2. Core Idea 1: Don't Build Agents for Everything
Agents are not a universal solution; they are best suited for "complex and valuable tasks." Zhang provides a checklist to determine if an agent is appropriate:
- Complexity of Task: Agents "thrive in ambiguous problem spaces." If the entire decision tree can be easily mapped out, a workflow is more "cost-effective" and offers "a lot more control."
- Value of Task: The exploration inherent in agentic behavior "is going to cost you a lot of tokens." The task's value must justify this cost. For high-volume, low-budget scenarios (e.g., customer support with 10 cents/task), workflows for common scenarios are preferred.
- De-risking Critical Capabilities: Before full deployment, ensure the agent's core functionalities (e.g., writing good code, debugging, error recovery for a coding agent) are robust. Bottlenecks "will multiply your cost and latency," suggesting a need to "reduce the scope, simplify the task, and try again."
- Cost of Error and Error Discovery: High-stakes errors that are difficult to discover make it hard to trust an agent. Mitigation strategies include "limiting the scope," "read only access," or "more human in the loop," though these "limit how well you're able to scale your agent."
Example: Coding as a Great Agent Use Case:
Coding excels as an agent use case because:
- It's an "ambiguous and very complex task."
- "Good code has a lot of value."
- Current models (like Claude) are "great at many parts of the coding workflow."
- Outputs are "easily verifiable through unit test and CI."
3. Core Idea 2: Keep It Simple
Once a suitable use case is identified, the focus shifts to simplicity during development. Zhang defines agents as "models using tools in a loop," with three defining components:
- Environment: The system in which the agent operates.
- Tools: An interface for the agent to take action and receive feedback.
- System Prompt: Defines "the goals, the constraints, and the ideal behavior for the agent."
The model then "gets called in a loop." Zhang emphasizes that "any complexity up front is really going to kill iteration speed." Iterating on these three basic components offers "by far the highest ROI," with optimizations to come later. While the environment is use-case dependent, the key design decisions are the "set of tools you want to offer to the agent and what is the prompt that you want to instruct your agent to follow." Optimizations (e.g., caching for coding, parallelization for search, presenting progress to build user trust) come after the core behaviors are established.
4. Core Idea 3: Think Like Your Agents
A common pitfall for builders is to develop agents from their own perspective, leading to confusion when agents make "counterintuitive" mistakes. Zhang recommends "putting yourself in the agents context window."
- Limited Context: Despite sophisticated behavior, at each step, "what the model is doing is still just running inference on a very limited set of contexts." Everything the model knows is "explained in that 10 to 20k tokens." Limiting one's own understanding to this context helps determine if it's "sufficient and coherent."
- The "Computer Use Agent" Analogy: Zhang illustrates this by asking the audience to imagine being a computer use agent, receiving only a "static screenshot and a very poorly written description." The agent then "attempts a click without really seeing what's happening," which is equivalent to "closing our eyes for three to five seconds and using the computer in the dark." The outcome is uncertain, highlighting the "huge lethal phase."
- Practical Exercise: Zhang suggests trying "doing a full task from the agent's perspective" to reveal crucial missing context, such as screen resolution, recommended actions, or limitations, to avoid "unnecessary exploration."
Leveraging LLMs for Understanding:
Fortunately, "we are building systems that speak our language," allowing developers to "ask Claude to understand Claude." This can involve:
- Asking if system instructions are ambiguous or coherent.
- Testing tool descriptions to see if the agent understands tool usage.
- Analyzing the agent's entire trajectory with Claude to understand decision-making and identify areas for improvement. This should "not replace your own understanding of the context but you'll help you gain a much closer perspective on how the agent is seeing the world."
5. Personal Musings: Open Questions and Future Directions
Zhang concludes with three key areas for the future of AI engineering:
- Budget Awareness: A critical challenge is defining and enforcing budgets for agents in terms of "time, in terms of money, in terms of tokens." Unlike workflows, current agents lack a "great sense of control for the cost and latency," which limits production deployment.
- Self-Evolving Tools: Beyond using models to iterate on tool descriptions, the vision is for a "meta tool where agents can design and improve their own tool ergonomics." This would make agents "a lot more general purpose."
- Multi-Agent Collaboration: Zhang holds a "personal conviction that we will see a lot more multi-agent collaborations in production by the end of this year." Benefits include parallelization, separation of concerns, and protection of the main agent's context window. The major open question is "how do these agents actually communicate with each other" beyond rigid synchronous user-assistant turns, exploring "asynchronous communication and... more roles."
Key Takeaways
- Don't build agents for everything: Use them for complex, high-value tasks where ambiguity is present.
- Keep it simple: Focus on the core components (environment, tools, system prompt) during iteration, optimizing later.
- Think like your agents: Understand their limited context and perspective to bridge the gap between human and agent understanding, and use LLMs to gain insights into their reasoning.
Frequently Asked Questions: Building Effective Agents
What distinguishes "agents" from previous AI systems like "workflows"?
Agents, unlike simpler "workflows," possess the ability to decide their own trajectory and operate almost independently based on environmental feedback. Workflows, while orchestrating multiple model calls, follow predefined control flows. This increased autonomy in agents allows them to tackle more ambiguous and complex problems, moving beyond the "table stakes" features like summarization or classification that characterized earlier AI applications. However, this increased agency also comes with higher costs, latency, and greater consequences for errors.
When is it appropriate to build an agent, and when should you stick to simpler solutions?
Agents are best suited for tasks that are inherently complex and valuable. You should consider building an agent if:
- The problem space is ambiguous and cannot be easily mapped out into a simple decision tree.
- The value derived from the task justifies the higher token costs associated with agents' exploratory nature. For high-volume, low-budget tasks, workflows are generally more cost-effective.
- Critical capabilities can be de-risked, meaning there aren't significant bottlenecks that would multiply cost and latency (e.g., a coding agent must be able to write, debug, and recover from errors).
- The cost of error and the difficulty of discovering errors are manageable. For high-stakes or hard-to-discover errors, limiting the agent's scope or incorporating human oversight might be necessary, though this can hinder scalability.
Coding is presented as a prime example of a good agent use case due to its complexity, high value, and the verifiability of its output through unit tests and CI.
What are the core components of an effective agent, and why is simplicity crucial in their development?
According to the source, an agent is fundamentally "models using tools in a loop," defined by three core components:
- Environment: The system in which the agent operates.
- Tools: Interfaces that allow the agent to take action and receive feedback.
- System Prompt: Defines the agent's goals, constraints, and ideal behavior within the environment.
Simplicity is paramount because upfront complexity significantly hinders iteration speed. Focusing on iterating and optimizing these three basic components first yields the highest return on investment (ROI), with further optimizations coming later once the desired behaviors are established.
Why is it important to "think like your agent" during development and iteration?
Developers often make the mistake of developing agents from their own human perspective, leading to confusion when agents make unexpected errors. To bridge this gap, it's crucial to put yourself in the agent's context window. This means understanding that an agent's knowledge of the world is limited to a very small set of tokens (10-20k) in its context. By experiencing the task from the agent's constrained viewpoint (e.g., a computer use agent only seeing static screenshots with poor descriptions), it becomes clearer what information and context the agent truly needs to perform effectively (e.g., screen resolution, recommended actions, limitations). Tools like large language models can even be used to query the agent itself about ambiguities in instructions or tool usage, providing a closer perspective on its internal reasoning.
What are the main challenges and open questions for the future evolution of AI agents?
The source highlights three key areas for future development and research:
- Budget Awareness: Agents currently lack a clear sense of control over their cost and latency. Defining and enforcing budgets (in terms of time, money, or tokens) is crucial to enable more production-ready use cases.
- Self-Evolving Tools: The ability for agents to design and improve their own tool ergonomics (a "meta tool") would make them far more general-purpose, allowing them to adapt tools as needed for various use cases.
- Multi-Agent Collaboration: A significant conviction is that multi-agent collaborations will become prevalent in production soon. These systems offer parallelization and better separation of concerns. The main open question is how these agents will effectively communicate with each other, moving beyond rigid synchronous user-assistant interactions to embrace asynchronous communication and specialized roles.
How does the concept of "cost of error" influence agent design and deployment?
The "cost of error" is a critical factor in deciding whether to deploy an agent and how much autonomy to grant it. If errors are high-stakes (e.g., financial transactions, critical infrastructure) or difficult to detect and recover from, it becomes very challenging to trust an agent with significant independent action. In such cases, mitigation strategies like limiting the agent's scope (e.g., read-only access) or incorporating more human-in-the-loop oversight are necessary. However, these mitigations also restrict the agent's scalability and potential utility. Therefore, a balance must be struck between the agent's autonomy and the acceptable risk level for errors in a given use case.
What is the role of tools and the environment in an agent's operation?
The environment is the system or context within which the agent operates. It provides the state information and receives the agent's actions. Tools serve as the agent's interface to interact with this environment. They are the "hands" and "eyes" of the agent, allowing it to take specific actions (e.g., click, search, write code) and receive feedback from the environment (e.g., a new screenshot, search results, compilation errors). The design of these tools and the clarity of their descriptions are crucial for the agent's ability to understand how to effectively interact with its world and achieve its goals.
Why is starting with simple iterations on agent components more effective than front-loading complexity?
Beginning with a simple implementation of the three core components (environment, tools, system prompt) is advocated because any complexity introduced early on can significantly "kill iteration speed." When building agents, the path to desired behavior is often discovered through rapid experimentation and refinement. By keeping the initial setup minimal, developers can quickly test hypotheses, identify issues, and refine the agent's understanding and capabilities. Only once the basic behaviors are stable and understood should developers introduce optimizations like caching trajectories for cost reduction, parallelizing tool calls for latency, or improving user trust through progress presentation. This iterative approach ensures that development efforts are focused on high-ROI improvements rather than getting bogged down by unnecessary initial complexity.
Posts Gallery

Agentic AI for Enterprise Automation
Discover how Agentic AI revolutionizes enterprise automation, boosting efficiency and strategic decision-making.
Read More →
How Agentic AI Works: Intent to Execution
Unpack the intricate process of Agentic AI, from understanding user intent to executing complex tasks autonomously.
Read More →
Purpose & Use Cases of Agentic AI
Explore the diverse applications and strategic importance of Agentic AI across various industries and daily operations.
Read More →
What is Agentic AI?
A foundational article explaining the core concepts of Agentic AI, defining its components and its role in modern automation.
Read More →
Why Agentic AI?
Understand the compelling reasons and significant benefits that make Agentic AI a transformative technology for efficiency and innovation.
Read More →
AI Tools Spotlight
A comprehensive overview of cutting-edge AI tools that are shaping the future of automation and intelligent systems.
Read More →