Section Insights
Introduction to Building Agents
What are the challenges in building agents at Anthropic?
Tariq discusses the concept of capability overhang in AI models, emphasizing that models are grown rather than designed. He highlights the empirical nature of discovering model capabilities and the constraints that developers face.
- AI models are developed organically through data and feedback.
- Understanding model capabilities requires empirical discovery.
- The constraints in AI development often stem from human limitations.
Evolution of System Prompt Design
How has system prompt design changed with smarter models?
As models like Claude 5 have evolved, the approach to system prompts has shifted from providing extensive examples to offering minimal context, allowing models to exercise judgment without constraints.
- Smarter models require less context and fewer examples in prompts.
- Removing constraints can enhance model performance.
- Adapting prompt design is crucial as models improve.
Understanding Unknowns in Prompting
What skills are necessary for effective prompting of coding agents?
Tariq emphasizes the importance of understanding the capabilities of coding agents and how to prompt them effectively. He introduces the concept of 'finding your unknowns' to navigate the complexities of model interactions.
- Effective prompting requires understanding the model's capabilities.
- Navigating unknowns is a key challenge in working with advanced models.
- Improving prompting skills can enhance harness engineering.
Techniques for Effective Prompting
What strategies can improve interactions with AI models?
Tariq shares techniques such as providing references, implementation notes, and quizzes to enhance understanding and alignment with the model's outputs. Staying engaged with the model's process is crucial.
- Providing clear examples and references can improve model performance.
- Quizzes help reinforce understanding of changes made.
- Continuous engagement with the model is essential for effective prompting.
Action Strategies for Browser Agents
What are the considerations for taking action with browser agents?
Tariq discusses various strategies for how browser agents can take action, including human-like decision-making, DOM element interactions, and intercepting requests. He notes the complexity and trade-offs involved in these approaches.
- Different strategies exist for how agents can interact with web pages.
- Understanding the trade-offs of each approach is important.
- Optimal context management is crucial for effective agent performance.
Transcript
0:10 >> Hey everyone. Thank you for having me here. Yeah, my name is Tariq. I work on Cloud Code at the at Anthropic. I've been on Cloud Code for about a year and a half and I'm excited to talk to you today about my favorite topic. When when Paul called me up for this, I was like, can I talk about you building agents? He was like, yes, this is like exactly what people are doing. This I I like to call this unhobbling Cloud, right? And basically I want to talk about the difficulties and the process of building agents and harnesses and what that like sort of looks like here at Anthropic and and what we've seen with our customers as well. So I think the first thing I want to talk about is the concept of what we call capability overhang. Right? So I think that something that people often don't internalize enough is that the models are are grown, right? Not designed. And and so, you know, we don't sit down and be like, hey, we want a model that you know, is 95% on SWE bench or you know, like does this exact task in browser use for example. We you know, give a model a lot of data and feedback on tasks that we want it to be good at, but it's ultimately grown and organic in how it performs in these tasks are something that we have to discover empirically, right? And so I think a lot of times when people ask us at Anthropic about how we build harnesses, I think they think that there's like some sort of you know, we've got some sort of secret from the training where we're like, oh, we know that the model is really like excellent at this. Often times it's very empirical and and something that we discover.
1:50 And so the like thing to think about is that what constrains Cloud really is us, right? And and so like we grow this like sort of organic like you know, model and we give it the tools to operate in, but we have to sort of shape the harness and the tools it has exactly to the capabilities of the model. So, I'll I'll give you like a very simple kind of silly example, but it I think one that like is one that like I think is pretty illustrative. So, a couple months ago I think someone sort of went viral for saying like, "Oh, ChatGPT or like you know, generally chat models could not tell you which two Pokémon ended in AW." so, there are a thousand Pokémon and two of them, I think it's Croconaw and Drednaw, end in AW. So, obviously the models have you know, they know all the Pokémon.
2:51 There are about a thousand of them. but if you ask them, it will give you a kind of a nonsense answer if you ask a chat model. But let's say if you ask Claude code, it will figure it out immediately. and the way it does that is that it writes a script to fetch all the Pokémon and then does like a grep for AW, right? And then it'll be like, "Okay, here are the two Pokémon." So, this is kind of like a very simple example of like if you give the models like a code execution tool, they will then be able to do more, right, in this case.
3:26 And I think that like as the models get smarter and smarter, this example of capability overhang will like exist in more and more ways and fields. And so, we'll talk a little bit more about that and how that might apply to browsers, but I think that like the the main thing is like I'm sure that you understand this intuitively, but I would push you to say that like there are many other problems where you maybe you're having trouble with the models, and there is like some little nudge, you know, that might get them to a new set of capabilities, and we have to discover them.
4:01 And so, yeah, we call this capability overhang. And what I mean by this is that Claude gets smarter in in spiky ways, right? So, if Claude just got smarter in a smooth way, it would just sort of like, you know, remember every Pokémon, and then just like say them, right? But it gets smarter in spiky ways, where it gets better at code execution, and now it can like, you know, find the two Pokémon. So, an example of this sort of like, you know, capability, this change in capabilities is like our products recently, right? So, there was like Claude Chat, which was maybe a kind of a based on last year's models, where we have to give the model a bunch of context, and it can chat with you. then there's Claude Code, which, you know, the big change in Claude Code is that we gave it arms to act, right? And like to read from the world. So, specifically like the bash tool. And Claude Code can, you know, read and assemble its own context.
5:00 As part of this, you have to sort of rethink your harness as the models get smarter, right? we recently removed about 80% of the system prompt from Claude Code. and system prompt design is one of these things that also changes as the models get get smarter in kind of an unintuitive way. So, you know, back, you know, with chat models, the best practice was that you would have a small system prompt with few tools, but each tool would have a lot of examples, you know, like this is how you use this tool. and that was like kind of canonically how you use these models.
5:35 And then, as the models got smarter, they were able to do more things, and so we're like, "Oh, we're going to put more things in the system prompt. We're going to tell it to do more things. We're going to give more instructions, more tools, but still a bunch of examples for these tools. but most recently for the Claude 5 models, we found that they actually want much smaller context and no examples in their tools because it can tell what you mean by the tools just through like your description of them and the parameters and the examples tend to constrain it, you know? And so, the more like the as the models have gotten smarter, we've decided more on like getting rid of constraints and instead get it giving them judgment. So, for example, you know, we used to have a part of the system prompt where we felt that Claude would write write bad multi-line comments. And so, we're like, "Please never write multi-line comments, you know?"
6:30 but then as the models have gotten smarter, we realized that was no longer like a constraint in the same ways and we instead told it to match the comment style with the surrounding code. And this sort of like change meant sometimes it would write multi-line comments if that was appropriate or it would, you know, match your style. And in harness engineering, there often comes this like time where you have these constraints or these like maybe hacks that you put in for earlier models that the new models don't need. and it is honestly like a lot of work to to figure this out.
7:08 So, I'll give you some more examples of of how this has changed over time. So, one of the things that I've been really happy about introducing to Claude code was the ask you the question tool. So, sometimes when you're planning or you're going through maybe an ambiguous task, Claude will ask you some multiple-choice questions and you can select, you know, the answers. And so, I introduced this tool I think with Opus 4 and I remember it being such a pain to get Claude to call it. I had to tell it like four different times in the system prompt like, "Hey, remember if there's ambiguity, please use the ask you the question tool. And then in the like there is I give all these examples. It was really hard. And then in Opus 4.5, I realized it got quite good at calling the tool. And so it could chain these tools together. And so it could make sometimes up to like 20 or 30 of these calls together in what we would call like an interview. And so like Claude can now like interview you using the tool.
8:04 And that was like an emergent property in Opus 4.5 that Opus 4 could not do. And then more recently with the Claude 5 models, you know, I found them to be really really good at HTML. And so for complex plans, I don't even ask to ask you the question tool anymore. I ask it to make me an HTML artifact with questions inside of it that I can address. And then those questions can have diagrams and, you know, code snippets and things like that. And so this sort of like evolution from just last year of barely being able to call the structured tool to now being able to create this like full rich artifact that like helps you enter that helps you understand what's happening is like a an emergent property. So yeah, another example kind of related is that like Claude used to rely very heavily on markdown. Or like we needed to give it markdown plans to keep itself on track. You know, you'd have to like give a markdown plan.
8:58 we'd have plan mode and write down a markdown plan. And then somewhere along the lines we realized it didn't really need the plan for itself, but it but humans like reading the plan. And so we we kept it around. but then again most recently, we realized that humans were having a tough time reading like a thousand lines of markdown. And so now you can ask Claude for an HTML plan, which works which is at least a lot more readable than the markdown plans.
9:23 And so again this evolution of like what Claude needs. So I think the like the thing I really like to stress is that it's a lot closer to a biology than a physics, right? And in computer science, we're very used to things resembling like a physics or a math where they're like very deterministic rules and you always, you know, get one output for one input. LLMs are not like that at all, right? They're much more of a biology and so I I think that like it requires maybe a shift in how you think as well.
9:59 So, that is how I think a little bit about harness engineering and unhobbling Claude. I I think I can't overstress this point. So, I want to talk a little bit about how you prompt Claude in your work as well. So, there's like if you might be building harnesses and you might be you know, like creating these sort of general prompts, but then I'm sure many of you are using coding agents. And when you're talking to coding agents, there's the same sort of like skill that you need to build of like how can you understand capabilities of the coding agent and then you know, start prompting it better. And this skill I think is transferable. If you're good at harness engineering, you can be good at you'll be good at prompt engineering and prompt design and and vice versa. I think getting better at prompting will be good make you better at harness engineering.
10:49 So, I I call this process for Claude 5 models finding your unknowns. And the way I like to describe it is like the map is not the territory. So, if I give Claude a problem, right? Like if I give it a prompt, I'm giving it like a map of the problem being like, "Hey, I want you to do to make this feature change. this is sort of how things work right now." But this is kind of an abstract map. But Claude is, you know, navigating what I call like the territory, right? And so, that's like the real code base, the constraints within it. And so, they're like the goal to me is to map the map and territory more closely because like often times if you give it a big prompt Claude will run into unknowns where it's like it's running into something that is not in the map and has to decide what to do.
11:40 And this I think is the challenge of like this most recent generation of models where they run into unknowns very often and being able to like understand when a model might have an unknown and understand when you might want to clarify it is like the skill of these of prompting this like newest generation of models. yeah, it's like bottom neck my by my ability to find my unknowns is how I is how I think about prompting these models. They're basically able to implement almost anything I want these days.
12:12 So, I like to think about unknowns in this like matrix, right? So, I like to say like known unknowns, like what do I want? This is like what I put into my prompt, right? Known unknowns, like what haven't I figured out yet? You know, like I know that the design of this like schema is important but I don't know what exactly what it is. Then there's unknown unknowns, things where I'm like I know it but I I think it's so obvious to me that I didn't even include it in the prompt but Claude can't read my mind, right? and I need to like sort of extract these unknown knowns so that Claude can match how I'm thinking. And then finally it's like what haven't I considered at all, right? Like what do I not know about?
12:54 I think an example that I like to think a lot about is is design where I'm not a designer and so there are often times where like I will know it when I see it, you know, like if I see something I'll be like oh that's great. then I also have a lot of unknown unknowns where I'm like man, if I were a designer and I had the right language or if I had the way to describe, I don't know, even like the aesthetic of this conference, you know, if I was like trying to prompt Claude to make something that matches aesthetic, I I honestly don't know how to describe it.
13:24 Maybe I could show it references or something but I just like if I was a better designer, I would have the language to describe it. And so, I think a lot of, you know, prompting these models is like being able to articulate what you want, right? And like know when you don't know something. So, luckily, you know, you can use Claude to help find your unknowns. And this is I think like a really helpful way to think about prompting.
13:50 So, an example prompt, and we'll go over a bunch of these examples. I I think this is sort of the best way to to to build this intuition. So, an example prompt I like to give is a blind spot pass, right? So, I'm like, "Hey, I'm working on this new off provider, but I don't know anything about it. Can you do a blind spot pass to help me figure out my unknown unknowns?" Giving Claude this context to be like, "Hey, I don't know anything about this. Please help me."
14:16 versus like, "Hey, you know, I know a lot about this. Please just do the task, right?" is very, very helpful. And Claude, you know, you can imagine doesn't know enough about you to to make this assumption in and of itself, right? So, by default, people want to Claude to do work, and so Claude will try and just do work for you. And so, like giving it the context to be like, "Hey, this is, you know, like where I am in the problem." is really, really helpful.
14:47 another thing I love doing is brainstorming and prototyping with Claude. so, I, you know, like with designs, for example, I often just ask it to make me very different design directions. If I was more specific, like if I was a designer, I'd probably have much more specific language about specific approaches, right? And so, I think this is like maybe a weakness in my prompting, but still like helps Claude create different designs. And And maybe sometimes I'd ask it to drill into like what this design style is and other variations that like I might learn about. then there is interviews. We talked about this a little bit earlier, but I like to ask Claude to interview me when I am you know, when I have a lot of ambiguity or if there are things that I like I want something in my head, but I just haven't put in the prompt. Interviewing is a great way to pull these out.
15:38 Then references. So, giving Claude examples of, you know, what you want. This could be for example an API like spec, right? From an a different library. Another like really good prompt I like to say is implementation notes. So, when Claude runs into something in an implementation, there often going to be slight ambiguities. And this is like I'd say the dominant thing that happens. Like when I read the eval transcripts of Claude in pretty much any eval, it finds the edge case and then makes like a judgment call one way or the other. So, I think that like if you were to like supervise Claude's transcript and just like have it surface that judgment call and answer it, it would pass like almost every eval we have right now. In your own work, right? If you you can imagine that Claude will also come up with these these these judgment calls and if you can get it to surface that, you can like more closely align your work with what you want.
16:40 And then quizzes at the end I think are really valuable way of understanding what happened. And so, this was like a popular thing at Anthropic like after you make a bunch of changes, you quiz yourself on what happened and make sure you pass it passes to to know that you like understand the change very thoroughly. Yeah, I I I think the most important part of working with Fable and this prompting is like is staying in the loop. And so, that was like a bunch of, you know, example prompts to help you understand like some patterns there of like understanding what the model needs like some examples of how you can help it and help it give and give it context. But, you know, we're here to talk about browser agents, and so I wanted to give you an example of like how I might just like think through the problem of building a browser agent, right? You know, when you first think about this, you're like, "Oh, you just like get it to click on the button." You know what I mean? Like that's all you need to do. But there's a lot more to it, right? There's a lot of different design decisions that go into building a browser agent.
17:44 And I don't think any of us have really figured out the like the optimal way yet. So, there are a few big choices when designing a browser agent, and this mostly applies to other agents as well, but like how do you store context, right? How do you take action? And then like what other harness features might you have? Like things like compaction or memory or sub-agents. There's a like long list of sort of sub-agent or of harness features you might build. So, let's go into how do you store context, right? This is like really important because like how much of a browser is stateful, right? Like do you could you just know what needs to get done just based on the current screenshot? Or do you need to give it more context, right?
18:34 and if so, what does that context look like, right? So, for example, you can imagine when I give Claude a task, do you just take a screenshot every time it does an action? And then like just show it all of those screenshots, right? there are also little animations and things like that. Like how do you capture that? Is that important or not? This is like one of an example of what you could do is like you could store all the screenshots, right? You could also put the entire HTML page in the DOM or some like parsed version of HTML.
19:03 Sometimes people do like the accessibility tree and things like that. But again, like which how many iterations of it do you show like the previous pages or not, right? This becomes like pretty complicated, but like one of the things about Claude is that it is really good at visualizing what something would look like from HTML if you give it the right formats. And so, we've gotten a lot better. And so, I think there's this trade-off of like, yes, screenshots are good, but they're like imprecise.
19:35 Like the DOM is code, right? But then you have to give it the relevant code. And how good it is at reading the code is something that like has evolved over time. You can also imagine that you might diff screenshots in the DOM or the DOM and be like, "Hey, like between the last two actions, this is what changed." And maybe that's the context that you share in between, right? So, you're like, "Here's a task, here's a screenshot, here are the different actions that you store." Another example is like you annotate the the DOM with or the screenshot with bounding boxes. I think this is what a lot of browser use agents have done in the past. Unclear to me whether this is needed anymore, you know? but what you do is like you take a screenshot, you like look at the, you know, the most important elements and you draw boxes around them. You can imagine that all of this is like these are tools that you give Claude, but you might step back and be like, "Well, what if we gave Claude tools to decide itself?" Right? So, instead of, you know, giving it every screenshot, you give it like the ability to fetch screenshots or the ability to like load previous DOM states, right?
20:46 This is like maybe a more, we call it like AGI-pulled approach, where Claude can sort of decide in its own like wave like what to do, right? and another like maybe example is to continuously compact each time. And so, you can for example, like do a task, have a click, and then run compact, which it sort of like summarizes what happened into a step for the next agent, right? And all of these have a ton of different trade-offs, and it's not really clear to me exactly how you should do this right now. But I think there is like a huge amount of dimensionality. I'm probably not even capturing all of it because another, you know, thing that we probably don't have time to get into is prompt caching. So Claude wants to sort of have like a continuous conversation and editing previous context is costly. So there are many ways to store context, and I would bet that most browser agents are doing maybe something like not optimal right now.
21:46 But then how do you take action is the other one, right? So do you take action maybe like a human, right? Where you're like, "Hey, I've given it a bunch of screenshots. Now just like choose the the coordinates, right?" And then click on it, right? You can do that. You can do Do you do it like a computer where you like look at the DOM and you're like, "Hey, tell me which DOM element to click on." And you click on that DOM element, right? Or you like type into this element. Do you do it like a coding agent, right? Ultimately browsers are just sending requests back and forth, right? And so do you start like intercepting the XHR request and reading the data out of it and then mocking the request and sending them out, and you don't even like worry about the web page. You're just like, "Oh, a web page is just a black box for turning like input requests into output requests, right?" This is like like how a coding agent might think about a web page. You can think of it like a bash agent, right? You could be like, "Hey, Puppeteer is like a bash tool. Like let's call, you know, Puppeteer and just like everything is a CLI, right?" It's like a very common way of thinking about agents that I don't think is maybe like as true now as it used to be, right? Or you can create like, yeah, for example, a custom scripting language.
23:00 You could turn everything into code execution and be like, "Hey, these are some like additional functions you can call and some of these functions might also might also like have things like managing context or fetching context. So, there are many different ways in which you might take action in a browser agent. And again, I I don't know if we've figured out the best way. I I think that there is like a lot of the agents right now, I think are probably like over-constrained in how they do it. But like what other harness features could it have, right? So, sub-agents are an example where like do you want to give Claude the ability to for example, spin off some research first, right? So, maybe you're like, "Okay, the the user is asking me to you know, like search for all the invoices in my inbox and then put it in a Google spreadsheet or something." And so, those are kind of like well-parsed our sub-agent task where you're like, "Hey, let's spin up a sub-agent to go search the inbox and you need like a tab for that." That's like one possibility.
24:09 You need compaction to support long-running agents. Like if the context gets very long, how do you need to compact it? For coding agents, we need compaction. Do you need this for browser agents or can you also ask the user sometimes, right? Like how to how to compact or when to compact? And again, compaction is just like summarization of the transcript. There are many things you can do. You can like remove the previous tool calls, you can remove some of the tool outputs and things like that.
24:35 And there are many ways you can do compaction. And finally, memory. Do you need memory, right? Like if Claude is doing a task, like do you does it need to remember something and keep it for next time, right? So, this is also a form of context management. In Claude, we have a memory tools where we tell it to like remember relevant facts and preferences and then we load that in previously, but you know, you might reasonably have this.
25:01 So, I think like this is I think just an overview I think of like maybe the complexity in building harnesses and I'm sure many of you are running into this and going over it and you know, I'm sorry that I don't have like the the answers here exactly, but I would just say that there's so much creativity in how you give Claude these like ways to act, you know, and like by my guess is that we could Claude could be doing a lot more with browsers if we get like really creative with with the harness engineering. So, I would like if I didn't have a day job, I would love to be spending time on on on figuring this out. So, yeah, that is my talk on on hobbling Claude. Hopefully, I've given you some food to think about like how to adapt to this like newest wave of models and you know, think about adjusting how you prompt and how you build harnesses.
25:53 Thank you everyone.
Summary
- **Capability Overhang**: Models grow organically, leading to unexpected capabilities that must be discovered empirically.
- **Harness Engineering**: Adapting tools and prompts as models evolve is crucial for maximizing their potential.
- **Emergent Properties**: New features in models can lead to significant improvements in their functionality, such as Claude's ability to generate HTML artifacts or conduct interviews.
- **Prompting Techniques**: Effective prompting involves understanding known and unknown variables, allowing for better communication of tasks to the model.
- **Context Management**: Storing and managing context effectively is vital for browser agents, with various strategies for optimizing how context is captured and utilized.
- **Action Mechanisms**: Different approaches exist for how agents can take actions, whether through human-like interactions or more automated, code-based methods.
- **Sub-agents and Memory**: The potential for creating sub-agents and incorporating memory features can enhance the capabilities of AI agents in complex tasks.
- **Creativity in Harness Design**: There is significant room for innovation in how AI agents are designed and utilized, particularly in browser contexts.
Questions Answered
What are the challenges in building agents at Anthropic?
Tariq discusses the concept of capability overhang in AI models, emphasizing that models are grown rather than designed. He highlights the empirical nature of discovering model capabilities and the constraints that developers face.
How has system prompt design changed with smarter models?
As models like Claude 5 have evolved, the approach to system prompts has shifted from providing extensive examples to offering minimal context, allowing models to exercise judgment without constraints.
What skills are necessary for effective prompting of coding agents?
Tariq emphasizes the importance of understanding the capabilities of coding agents and how to prompt them effectively. He introduces the concept of 'finding your unknowns' to navigate the complexities of model interactions.
What strategies can improve interactions with AI models?
Tariq shares techniques such as providing references, implementation notes, and quizzes to enhance understanding and alignment with the model's outputs. Staying engaged with the model's process is crucial.
What are the considerations for taking action with browser agents?
Tariq discusses various strategies for how browser agents can take action, including human-like decision-making, DOM element interactions, and intercepting requests. He notes the complexity and trade-offs involved in these approaches.