What are Deep Agents?
Key Takeaways
The video discusses the concept of deep agents, which are agents that use LLMs to call tools in a loop, and provides examples of applications such as Claude Code and Manessa that have implemented this architecture. It also highlights the characteristics of deep agents, including planning tools, sub-agents, access to a file system, and detailed system prompts.
Full Transcript
Claude Code is a fantastic agent and has recently taken the developer community by storm and interestingly not just for coding related things but for other things in general writing books, writing reports, things like that. And part of the reason is that it is so good at general purpose and longer time horizon planning and and doing things deeply that it it can be extended to to all of these things. This isn't the first agent that has come out that has been able to do these deep work. So we have Manessa, a general purpose agent, open AI's deep research and now claude code and and and these are all examples of agents that can act on long time horizons on complex tasks and go deep into different kind of like rabbit holes but then bubble back up and and accomplish kind of like a highle goal. I would argue that these all have a few things in common. And I came up with the term deep agents to describe agents that have these characteristics. There are four characteristics that make up deep agents. They have a planning tool. They use sub agents. They have access to a file system. And they have a detailed system prompt. Let's break it down. Under the hood, deep agents use the same tool calling loop that a simple React style agent would use. They run in a loop. They make an LLM call and then based on that, they either stop or they go back and they take action on their environment. and they get some feedback. If you try doing this naively with uh LLM, they're really good at at doing one or two or even three or four tool calls, but they struggle with longer time horizon tasks, planning on those tasks, and then executing and and going deep into specific areas and subcomponents of that task. Deep agents, on the other hand, are able to do those longer time horizon, more complex tasks. And it's not that they're using a different algorithm. They're using the same algorithm. What's different is the four things I mentioned earlier, the prompt and the tools that has access to. Let's go through these one by one. First up, let's talk about a planning tool. This is an excerpt from Manis' system prompt where it talks about the planner module that it has. And so you can see that it has a planner module that's used for overall task planning. Task planning will be provided as events in the event stream. And then basically it it tells the agent in the system prompt to do everything in in in this plan. Claude code also has this to-do write tool which creates and manages structured tasks lists. So by prompting the agent to generate this this plan, it can then have this plan in its context as it executes upon the various steps. Now this tool that does the planning could actually be quite simple. So, Claude Code, for example, with this to-do write tool, it doesn't actually do anything. It's a noop tool. So, it basically isn't a chance for the model to come up with a to-do list and then it can quote unquote modify the to-do list, but it does that by just generating a new to-do list every time. So, it doesn't actually track this in a data structure or anything like that. Why does this work then? It works because it creates these messages that are in the model's context that show this to-do list that it's tracking. And so it helps it kind of like keep on track even if it's as simple as just putting this to-do list in the model's context. So the planning tool helps solve the issue that the agent isn't able to act cohesively over longer time horizon. Let's now talk about sub aents. This is a diagram from Anthropic's advanced research paper and you can see that they use a few different sub aents here. They have a citation sub aents and then a bunch of search sub aents that they can kick off in parallel. Manis also uses sub aents to accomplish its task. And so you can see that there are sub aents that can focus on browsing or information gathering while this higher level orchestrator the mainus brain coordinates all of them. This article from anthropic on the use of sub aents and clawed code summarizes a few of these key benefits. First is context preservation. So each sub aent operates in its own context. So basically when it does its own tool calling loop, those don't pollute the main agents context. So it can go off and it can do these rabbit holes and go really deep in these rabbit holes, but then those don't bubble back up to the main agent. And conversely, any work that the main agent might have done up to that point doesn't pollute the context of the sub aent. So it just has a specific dedicated f focus. You can give these sub aents specialized expertise. This usually comes in the form of system prompts or tools that they have. And so this can allow them to really focus on a particular area or take a point of view that might be different from that of the main agent. And and different opinions are good. They help arrive at kind of like a better result. These last two points really mostly relate to clawed code, but if you're designing a system that has a deep agent, they're probably applicable there as well. So a these sub aents can be reusable. So you can create one sub aent to use with one agent and then and then reuse it in another place. And likewise, these sub aents can have different permissions. This kind of gets to the specialized expertise, but is a little bit finer grain of a point. So one sub aent could have access to write files and the other one couldn't. And so you can actually scope down what what these sub aents can do in terms of yielding better results. I think the main thing to realize about sub aents is that they allow you to go deeper in specific areas by having this combination of context preservation and just really focusing on one thing and also this specialized expertise which guides that focus. Next, let's talk about file systems. So this is from a blog that Manis wrote on using the file system as a context. And so why does this work? So again, a key part of these agents is that as they do more things, more and more context is generated. And if you just keep on passing this in a loop to the LLM, that context will eventually degrade the LLM performance. So file systems are great because they let you offload some of this context to files, which the the agent can then see and access and read if it wants to, but it doesn't necessarily pollute. And this is again from the Manis blog post. But if we just look at this, we can see the difference in what is in the context of the LLM. So rather than just putting large observations directly in the context, we can see that we have short observations which reference the file system with document X or file Y. And these can then be read back in deliberately or written to if they want. One really interesting point here is that Anthropics models are fine-tuned to use a specific. Now, this tool doesn't actually run server side. And if you look in their docs, they show how to call this tool, as in to get the model to generate the payload for these tools. But then you actually have to implement and and and execute the tools yourself. And so these tools are for editing files. Um, so there's some built-in file editing tools into claw that it's really good at using. And so combining this file system idea with claude, you can actually get a system that where the model is fine-tuned to know how to write to and manage files. And that's really useful for managing the context. And then finally, I want to talk about system prompts. So this sounds really basic. Of course, agents have system prompts. I think one underappreciated thing is that these system prompts are often really long and really detailed. So there's a bunch of leaked system prompts, but this is actually from the deep research system prompt that Anthropic open source. And this is just part of it. It's way longer than this. And so you can see that these system prompts start to get to be hundreds or thousands of lines. I think a common misconception is that because the models are so good, you can write a pretty short system prompt. And that's not at all the case. You need to give it a bunch of context on how to use these tools like the to-do list tool and the planning tool and the uh file system tools and the sub aents. And you also need to give it information about the tasks that it's trying to do and how these should act. So again, obviously agents have system prompts, but I think the underappreciated thing here is that prompting absolutely still matters and all the best deep agents are spending a ton of time and writing hundreds if not thousands of lines into their system prompts. I wrote a blog on this that goes over a few of these concepts and links to more articles if you want to check it out here. I also made a Python package called deep agents which comes with some off-the-shelf scaffolding for these types of deep agents. Specifically, it comes with built-in things for those four different attributes. So, it comes with a built-in planning tool, a built-in file system tool, a built-in sub aent tool, and a built-in system. And then you just provide a few custom instructions and any additional tools that you wanted to have access to and you can pretty easily create deep agents for research or coding in far fewer lines than you could if you were writing it from scratch. So if you're building or you want to build deep agents, I would highly encourage you to check this out. If you're interested in using this package, I'll do a deep dive video on the code behind this in a future video. Thanks for watching.
Original Description
Using an LLM to call tools in a loop is the simplest form of an agent. This architecture, however, can yield agents that are “shallow” and fail to plan and act over longer, more complex tasks. Applications like “Deep Research”, “Manus”, and “Claude Code” have gotten around this limitation by implementing a combination of four things: a planning tool, sub agents, access to a file system, and a detailed prompt.
Deep Agents are agents that use these four things to execute on longer time horizon tasks.
Blog: https://blog.langchain.com/deep-agents/
GitHub: https://github.com/hwchase17/deepagents
Learn to build Deep Agents on LangChain Academy: https://academy.langchain.com/courses/deep-agents-with-langgraph/?utm_medium=social&utm_source=youtube&utm_campaign=q4-2025_youtube-academy-links_aw
Observe, evaluate, and deploy agents with LangSmith: https://smith.langchain.com/?utm_medium=social&utm_source=youtube&utm_campaign=q4-2025_youtube-links_aw
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from LangChain · LangChain · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Chat With Your Documents Using LangChain + JavaScript
LangChain
LangChain SQL Webinar
LangChain
LangChain "OpenAI functions" Webinar
LangChain
LangSmith Launch
LangChain
LangChain x Pinecone: Supercharging Llama-2 with RAG
LangChain
LangChain Expression Language
LangChain
Building LLM applications with LangChain with Lance
LangChain
Benchmarking Question/Answering Over CSV Data
LangChain
LangChain "RAG Evaluation" Webinar
LangChain
Fine-tuning in Your Voice Webinar
LangChain
Tabular Data Retrieval
LangChain
Building an LLM Application with Audio by AssemblyAI
LangChain
Superagent Deepdive Webinar
LangChain
Lessons from Deploying LLMs with LangSmith
LangChain
Shortwave Assistant Deepdive Webinar
LangChain
Cognitive Architectures for Language Agents
LangChain
Effectively Building with LLMs in the Browser with Jacob
LangChain
Data Privacy for LLMs
LangChain
"Theory of Mind" Webinar with Plastic Labs
LangChain
LangChain Templates
LangChain
Using Natural Language to Query Postgres with Jacob
LangChain
Building a Research Assistant from Scratch
LangChain
Benchmarking RAG over LangChain Docs
LangChain
Skeleton-of-Thought: Building a New Template from Scratch
LangChain
Benchmarking Methods for Semi-Structured RAG
LangChain
LangSmith Highlights: Getting Started
LangChain
LangSmith Highlights: Debugging
LangChain
LangSmith Highlights: Datasets
LangChain
LangSmith Highlights: Evaluation
LangChain
LangSmith Highlights: Human Annotation
LangChain
LangSmith Highlights: Monitoring
LangChain
LangSmith Highlights: Hub
LangChain
SQL Research Assistant
LangChain
Getting Started with Multi-Modal LLMs
LangChain
Build a Full Stack RAG App With TypeScript
LangChain
Auto-Prompt Builder (with Hosted LangServe)
LangChain
LangChain v0.1.0 Launch: Introduction
LangChain
LangChain v0.1.0 Launch: Observability
LangChain
LangChain v0.1.0 Launch: Integrations
LangChain
LangChain v0.1.0 Launch: Composability
LangChain
LangChain v0.1.0 Launch: Streaming
LangChain
LangChain v0.1.0 Launch: Output Parsing
LangChain
LangChain v0.1.0 Launch: Retrieval
LangChain
LangChain v0.1.0 Launch: Agents
LangChain
Build and Deploy a RAG app with Pinecone Serverless
LangChain
Hosted LangServe + LangChain Templates
LangChain
LangGraph: Intro
LangChain
LangGraph: Agent Executor
LangChain
LangGraph: Chat Agent Executor
LangChain
LangGraph: Human-in-the-Loop
LangChain
LangGraph: Dynamically Returning a Tool Output Directly
LangChain
LangGraph: Respond in a Specific Format
LangChain
LangGraph: Managing Agent Steps
LangChain
LangGraph: Force-Calling a Tool
LangChain
LangGraph: Multi-Agent Workflows
LangChain
Streaming Events: Introducing a new `stream_events` method
LangChain
Building a web RAG chatbot: using LangChain, Exa (prev. Metaphor), LangSmith, and Hosted Langserve
LangChain
OpenGPTs
LangChain
Open Source RAG with Nomic's New Embedding Model (and ChromaDB and Ollama)
LangChain
LangGraph: Persistence
LangChain
More on: LLM Engineering
View skill →Related Reads
📰
📰
📰
📰
🚀 Day 3 of 100 Days of GenAI for DevOps is LIVE!
Dev.to AI
Unlocking Open-Weight LLMs: A Developer's Guide to Seamless API Integration
Dev.to · NovaStack
We Built AI Using Wikipedia, But Wikipedia Is 40% Wrong
Medium · Machine Learning
LLM vs RAG Explained (EP2): How AI Actually Finds the Right Answers
Medium · Data Science
🎓
Tutor Explanation
DeepCamp AI