{
  "@context": "https://schema.org",
  "@id": "https://aggr.aymericbeaumet.com/items/philschmid-de/2025-10-12-agents-2-0-from-shallow-loops-to-deep-agents/#webpage",
  "@type": [
    "WebPage",
    "ArchiveComponent"
  ],
  "articleBody": "For the past year, building an AI agent usually meant one thing: setting up a while loop, take a user prompt, send it to an LLM, parse a tool call, execute the tool, send the result back, and repeat. This is what we call a Shallow Agent or Agent 1.0.\n\nThis architecture is fantastically simple for transactional tasks like \"What's the weather in Tokyo and what should I wear?\", but when asked to perform a task that requires 50 steps over three days, and they invariably get distracted, lose context, enter infinite loops, or hallucinates because the task requires too many steps for a single context window.\n\nWe are seeing an architectural shift towards [Deep Agents](https://blog.langchain.com/deep-agents/) or Agents 2.0. These systems do not just react in a loop. They combine [agentic patterns](https://www.philschmid.de/agentic-pattern) to plan, manage a [persistent memory/state](https://www.philschmid.de/memory-in-agents), and delegate work to specialized [sub-agents](https://www.philschmid.de/the-rise-of-subagents) to solve multi-step, complex problems.\n\n![overview](https://www.philschmid.de/static/blog/agents-2.0-deep-agents/overview.png)\n\n## Agents 1.0: The Limits of the \"Shallow\" Loop\n\nTo understand where we are going, we must understand where we are. Most agents today are \"shallow\". This means rely entirely on the LLM's context window (conversation history) as their state.\n\n1. **User Prompt:** \"Find the price of Apple stock and tell me if it's a good buy.\"\n2. **LLM Reason:** \"I need to use a search tool.\"\n3. **Tool Call:** `search(\"AAPL stock price\")`\n4. **Observation:** The tool returns data.\n5. **LLM Answer:** Generates a response based on the observation or calls another tool.\n6. **Repeat:** Loop until done.\n\nThis architecture is stateless and ephemeral. The agent's entire \"brain\" is within the context window. When a task becomes complex, e.g. \"Research 10 competitors, analyze their pricing models, build a comparison spreadsheet, and write a strategic summary\" it will fail due to:\n\n- **Context Overflow:** The history fills up with tool outputs (HTML, messy data), pushing instructions out of the context window.\n- **Loss of Goal:** Amidst the noise of intermediate steps, the agent forgets the original objective.\n- **No Recovery mechanism:** If it goes down a rabbit hole, it rarely has the foresight to stop, backtrack, and try a new approach.\n\nShallow agents are great at tasks that take 5-15 steps. They are terrible at tasks that take 500.\n\n## The Architecture of Agents 2.0 (Deep Agents)\n\nDeep Agents decouple planning from execution and manage memory external to the context window. The architecture consists of four pillars.\n\n### Pillar 1: Explicit Planning\n\nShallow agents plan implicitly via chain-of-thought (\"I should do X, then Y\"). Deep agents use tools to create and maintain an explicit plan, which can be To-Do list in a markdown document.\n\nBetween every step, the agent reviews and updates this plan, marking steps as pending, in\\_progress, or completed or add notes. If a step fails, it doesn't just retry blindly, it updates the plan to accommodate the failure. This keeps the agent focused on the high-level task.\n\n### Pillar 2: Hierarchical Delegation (Sub-Agents)\n\nComplex tasks require specialization. Shallow Agents tries to be a jack-of-all-trades in one prompt. Deep Agents utilize an Orchestrator → Sub-Agent pattern.\n\nThe Orchestrator delegates task(s) to [sub-agent(s)](https://www.philschmid.de/the-rise-of-subagents) each with a clean context. The [sub-agent](https://www.philschmid.de/the-rise-of-subagents) (e.g., a \"Researcher,\" a \"Coder,\" a \"Writer\") performs its tool call loops (searching, erroring, retrying), compiles the final answer, and returns *only* the synthesized answer to the Orchestrator.\n\n### Pillar 3: Persistent Memory\n\nTo prevent context window overflow, Deep Agents utilize external memory sources, like filesystem or vector databases as their source of truth. Frameworks like Claude Code and Manus give agents `read`/`write` access to them. An agent writes intermediate results (code, draft text, raw data). Subsequent agents reference file paths or queries to only retrieve what is necessary. This shifts the paradigm from \"remembering everything\" to \"knowing where to find information.\"\n\n### Pillar 4: Extreme Context Engineering\n\nSmarter models do not require less prompting, they require better context. You cannot get Agent 2.0 behavior with a prompt that says, \"You are a helpful AI.\". Deep Agents rely on highly detailed instructions sometimes thousands of tokens long. These define:\n\n- Identifying when to stop and plan before acting.\n- Protocols for when to spawn a sub-agent vs. doing work themselves.\n- Tool definitions and examples on how and when to use.\n- Standards for file naming and directory structures.\n- Strict formats for human-in-the-loop collaboration.\n\n## Visualizing a Deep Agent Flow\n\nHow do these pillars come together? Let's look at a sequence diagram for a Deep Agent handling a complex request: *\"Research Quantum Computing and write a summary to a file.\"*\n\n![sequence](https://www.philschmid.de/static/blog/agents-2.0-deep-agents/sequence.png)\n\n## Conclusion\n\nMoving from Shallow Agents to Deep Agents (Agent 1.0 to Agent 2.0) isn't just about connecting an LLM to more tools. It is a shift from reactive loops to proactive architecture. It is about better engineering around the model.\n\nImplementing explicit planning, hierarchical delegation via [sub-agents](https://www.philschmid.de/the-rise-of-subagents), and [persistent memory](https://www.philschmid.de/memory-in-agents), allow us to control the context and by controlling the context, we control the complexity, unlocking the ability to solve problems that take hours or days, not just seconds.\n\n## Acknowledgements\n\nThis overview was created with the help of deep and manual research. The term [**“Deep Agents”**](https://blog.langchain.com/deep-agents/) was notably popularized by the LangChain team to describe this architectural evolution.\n\n* * *\n\nThanks for reading! If you have any questions or feedback, please let me know on [Twitter](https://twitter.com/_philschmid) or [LinkedIn](https://www.linkedin.com/in/philipp-schmid-a6a2bb196/).\n",
  "authors": [],
  "captured_at": "2026-09-27T19:29:15.293681927+00:00",
  "category": "programming",
  "content_html": "<p>For the past year, building an AI agent usually meant one thing: setting up a while loop, take a user prompt, send it to an LLM, parse a tool call, execute the tool, send the result back, and repeat. This is what we call a Shallow Agent or Agent 1.0.</p>\n<p>This architecture is fantastically simple for transactional tasks like &quot;What's the weather in Tokyo and what should I wear?&quot;, but when asked to perform a task that requires 50 steps over three days, and they invariably get distracted, lose context, enter infinite loops, or hallucinates because the task requires too many steps for a single context window.</p>\n<p>We are seeing an architectural shift towards <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://blog.langchain.com/deep-agents/\">Deep Agents</a> or Agents 2.0. These systems do not just react in a loop. They combine <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/agentic-pattern\">agentic patterns</a> to plan, manage a <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/memory-in-agents\">persistent memory/state</a>, and delegate work to specialized <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/the-rise-of-subagents\">sub-agents</a> to solve multi-step, complex problems.</p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://www.philschmid.de/static/blog/agents-2.0-deep-agents/overview.png\" alt=\"overview\" loading=\"eager\" decoding=\"async\" fetchpriority=\"high\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<h2>Agents 1.0: The Limits of the &quot;Shallow&quot; Loop</h2>\n<p>To understand where we are going, we must understand where we are. Most agents today are &quot;shallow&quot;. This means rely entirely on the LLM's context window (conversation history) as their state.</p>\n<ol>\n<li><strong>User Prompt:</strong> &quot;Find the price of Apple stock and tell me if it's a good buy.&quot;</li>\n<li><strong>LLM Reason:</strong> &quot;I need to use a search tool.&quot;</li>\n<li><strong>Tool Call:</strong> <code>search(&quot;AAPL stock price&quot;)</code></li>\n<li><strong>Observation:</strong> The tool returns data.</li>\n<li><strong>LLM Answer:</strong> Generates a response based on the observation or calls another tool.</li>\n<li><strong>Repeat:</strong> Loop until done.</li>\n</ol>\n<p>This architecture is stateless and ephemeral. The agent's entire &quot;brain&quot; is within the context window. When a task becomes complex, e.g. &quot;Research 10 competitors, analyze their pricing models, build a comparison spreadsheet, and write a strategic summary&quot; it will fail due to:</p>\n<ul>\n<li><strong>Context Overflow:</strong> The history fills up with tool outputs (HTML, messy data), pushing instructions out of the context window.</li>\n<li><strong>Loss of Goal:</strong> Amidst the noise of intermediate steps, the agent forgets the original objective.</li>\n<li><strong>No Recovery mechanism:</strong> If it goes down a rabbit hole, it rarely has the foresight to stop, backtrack, and try a new approach.</li>\n</ul>\n<p>Shallow agents are great at tasks that take 5-15 steps. They are terrible at tasks that take 500.</p>\n<h2>The Architecture of Agents 2.0 (Deep Agents)</h2>\n<p>Deep Agents decouple planning from execution and manage memory external to the context window. The architecture consists of four pillars.</p>\n<h3>Pillar 1: Explicit Planning</h3>\n<p>Shallow agents plan implicitly via chain-of-thought (&quot;I should do X, then Y&quot;). Deep agents use tools to create and maintain an explicit plan, which can be To-Do list in a markdown document.</p>\n<p>Between every step, the agent reviews and updates this plan, marking steps as pending, in_progress, or completed or add notes. If a step fails, it doesn't just retry blindly, it updates the plan to accommodate the failure. This keeps the agent focused on the high-level task.</p>\n<h3>Pillar 2: Hierarchical Delegation (Sub-Agents)</h3>\n<p>Complex tasks require specialization. Shallow Agents tries to be a jack-of-all-trades in one prompt. Deep Agents utilize an Orchestrator → Sub-Agent pattern.</p>\n<p>The Orchestrator delegates task(s) to <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/the-rise-of-subagents\">sub-agent(s)</a> each with a clean context. The <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/the-rise-of-subagents\">sub-agent</a> (e.g., a &quot;Researcher,&quot; a &quot;Coder,&quot; a &quot;Writer&quot;) performs its tool call loops (searching, erroring, retrying), compiles the final answer, and returns <em>only</em> the synthesized answer to the Orchestrator.</p>\n<h3>Pillar 3: Persistent Memory</h3>\n<p>To prevent context window overflow, Deep Agents utilize external memory sources, like filesystem or vector databases as their source of truth. Frameworks like Claude Code and Manus give agents <code>read</code>/<code>write</code> access to them. An agent writes intermediate results (code, draft text, raw data). Subsequent agents reference file paths or queries to only retrieve what is necessary. This shifts the paradigm from &quot;remembering everything&quot; to &quot;knowing where to find information.&quot;</p>\n<h3>Pillar 4: Extreme Context Engineering</h3>\n<p>Smarter models do not require less prompting, they require better context. You cannot get Agent 2.0 behavior with a prompt that says, &quot;You are a helpful AI.&quot;. Deep Agents rely on highly detailed instructions sometimes thousands of tokens long. These define:</p>\n<ul>\n<li>Identifying when to stop and plan before acting.</li>\n<li>Protocols for when to spawn a sub-agent vs. doing work themselves.</li>\n<li>Tool definitions and examples on how and when to use.</li>\n<li>Standards for file naming and directory structures.</li>\n<li>Strict formats for human-in-the-loop collaboration.</li>\n</ul>\n<h2>Visualizing a Deep Agent Flow</h2>\n<p>How do these pillars come together? Let's look at a sequence diagram for a Deep Agent handling a complex request: <em>&quot;Research Quantum Computing and write a summary to a file.&quot;</em></p>\n<p><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://www.philschmid.de/static/blog/agents-2.0-deep-agents/sequence.png\" alt=\"sequence\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></p>\n<h2>Conclusion</h2>\n<p>Moving from Shallow Agents to Deep Agents (Agent 1.0 to Agent 2.0) isn't just about connecting an LLM to more tools. It is a shift from reactive loops to proactive architecture. It is about better engineering around the model.</p>\n<p>Implementing explicit planning, hierarchical delegation via <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/the-rise-of-subagents\">sub-agents</a>, and <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.philschmid.de/memory-in-agents\">persistent memory</a>, allow us to control the context and by controlling the context, we control the complexity, unlocking the ability to solve problems that take hours or days, not just seconds.</p>\n<h2>Acknowledgements</h2>\n<p>This overview was created with the help of deep and manual research. The term <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://blog.langchain.com/deep-agents/\"><strong>“Deep Agents”</strong></a> was notably popularized by the LangChain team to describe this architectural evolution.</p>\n<hr />\n<p>Thanks for reading! If you have any questions or feedback, please let me know on <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://twitter.com/_philschmid\">Twitter</a> or <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.linkedin.com/in/philipp-schmid-a6a2bb196/\">LinkedIn</a>.</p>\n",
  "content_markdown": "For the past year, building an AI agent usually meant one thing: setting up a while loop, take a user prompt, send it to an LLM, parse a tool call, execute the tool, send the result back, and repeat. This is what we call a Shallow Agent or Agent 1.0.\n\nThis architecture is fantastically simple for transactional tasks like \"What's the weather in Tokyo and what should I wear?\", but when asked to perform a task that requires 50 steps over three days, and they invariably get distracted, lose context, enter infinite loops, or hallucinates because the task requires too many steps for a single context window.\n\nWe are seeing an architectural shift towards [Deep Agents](https://blog.langchain.com/deep-agents/) or Agents 2.0. These systems do not just react in a loop. They combine [agentic patterns](https://www.philschmid.de/agentic-pattern) to plan, manage a [persistent memory/state](https://www.philschmid.de/memory-in-agents), and delegate work to specialized [sub-agents](https://www.philschmid.de/the-rise-of-subagents) to solve multi-step, complex problems.\n\n![overview](https://www.philschmid.de/static/blog/agents-2.0-deep-agents/overview.png)\n\n## Agents 1.0: The Limits of the \"Shallow\" Loop\n\nTo understand where we are going, we must understand where we are. Most agents today are \"shallow\". This means rely entirely on the LLM's context window (conversation history) as their state.\n\n1. **User Prompt:** \"Find the price of Apple stock and tell me if it's a good buy.\"\n2. **LLM Reason:** \"I need to use a search tool.\"\n3. **Tool Call:** `search(\"AAPL stock price\")`\n4. **Observation:** The tool returns data.\n5. **LLM Answer:** Generates a response based on the observation or calls another tool.\n6. **Repeat:** Loop until done.\n\nThis architecture is stateless and ephemeral. The agent's entire \"brain\" is within the context window. When a task becomes complex, e.g. \"Research 10 competitors, analyze their pricing models, build a comparison spreadsheet, and write a strategic summary\" it will fail due to:\n\n- **Context Overflow:** The history fills up with tool outputs (HTML, messy data), pushing instructions out of the context window.\n- **Loss of Goal:** Amidst the noise of intermediate steps, the agent forgets the original objective.\n- **No Recovery mechanism:** If it goes down a rabbit hole, it rarely has the foresight to stop, backtrack, and try a new approach.\n\nShallow agents are great at tasks that take 5-15 steps. They are terrible at tasks that take 500.\n\n## The Architecture of Agents 2.0 (Deep Agents)\n\nDeep Agents decouple planning from execution and manage memory external to the context window. The architecture consists of four pillars.\n\n### Pillar 1: Explicit Planning\n\nShallow agents plan implicitly via chain-of-thought (\"I should do X, then Y\"). Deep agents use tools to create and maintain an explicit plan, which can be To-Do list in a markdown document.\n\nBetween every step, the agent reviews and updates this plan, marking steps as pending, in\\_progress, or completed or add notes. If a step fails, it doesn't just retry blindly, it updates the plan to accommodate the failure. This keeps the agent focused on the high-level task.\n\n### Pillar 2: Hierarchical Delegation (Sub-Agents)\n\nComplex tasks require specialization. Shallow Agents tries to be a jack-of-all-trades in one prompt. Deep Agents utilize an Orchestrator → Sub-Agent pattern.\n\nThe Orchestrator delegates task(s) to [sub-agent(s)](https://www.philschmid.de/the-rise-of-subagents) each with a clean context. The [sub-agent](https://www.philschmid.de/the-rise-of-subagents) (e.g., a \"Researcher,\" a \"Coder,\" a \"Writer\") performs its tool call loops (searching, erroring, retrying), compiles the final answer, and returns *only* the synthesized answer to the Orchestrator.\n\n### Pillar 3: Persistent Memory\n\nTo prevent context window overflow, Deep Agents utilize external memory sources, like filesystem or vector databases as their source of truth. Frameworks like Claude Code and Manus give agents `read`/`write` access to them. An agent writes intermediate results (code, draft text, raw data). Subsequent agents reference file paths or queries to only retrieve what is necessary. This shifts the paradigm from \"remembering everything\" to \"knowing where to find information.\"\n\n### Pillar 4: Extreme Context Engineering\n\nSmarter models do not require less prompting, they require better context. You cannot get Agent 2.0 behavior with a prompt that says, \"You are a helpful AI.\". Deep Agents rely on highly detailed instructions sometimes thousands of tokens long. These define:\n\n- Identifying when to stop and plan before acting.\n- Protocols for when to spawn a sub-agent vs. doing work themselves.\n- Tool definitions and examples on how and when to use.\n- Standards for file naming and directory structures.\n- Strict formats for human-in-the-loop collaboration.\n\n## Visualizing a Deep Agent Flow\n\nHow do these pillars come together? Let's look at a sequence diagram for a Deep Agent handling a complex request: *\"Research Quantum Computing and write a summary to a file.\"*\n\n![sequence](https://www.philschmid.de/static/blog/agents-2.0-deep-agents/sequence.png)\n\n## Conclusion\n\nMoving from Shallow Agents to Deep Agents (Agent 1.0 to Agent 2.0) isn't just about connecting an LLM to more tools. It is a shift from reactive loops to proactive architecture. It is about better engineering around the model.\n\nImplementing explicit planning, hierarchical delegation via [sub-agents](https://www.philschmid.de/the-rise-of-subagents), and [persistent memory](https://www.philschmid.de/memory-in-agents), allow us to control the context and by controlling the context, we control the complexity, unlocking the ability to solve problems that take hours or days, not just seconds.\n\n## Acknowledgements\n\nThis overview was created with the help of deep and manual research. The term [**“Deep Agents”**](https://blog.langchain.com/deep-agents/) was notably popularized by the LangChain team to describe this architectural evolution.\n\n* * *\n\nThanks for reading! If you have any questions or feedback, please let me know on [Twitter](https://twitter.com/_philschmid) or [LinkedIn](https://www.linkedin.com/in/philipp-schmid-a6a2bb196/).\n",
  "dateCreated": "2026-09-27T19:29:15.293681927+00:00",
  "date_created": "2025-10-12T00:00:00+00:00",
  "date_modified": "2025-10-12T00:00:00+00:00",
  "date_published": "2025-10-12T00:00:00+00:00",
  "description": "An overview of the architectural shift from Shallow Agents (Agent 1.0) to Deep Agents (Agent 2.0) and how to build complex AI agents that can handle multi-step tasks over extended periods.",
  "external_url": "https://www.philschmid.de/agents-2.0-deep-agents",
  "git": {
    "commit": "ebb0941c5c06a2ab2377342d607535262a3e969e",
    "path": "items/philschmid-de/2025/10/2025-10-12-agents-2-0-from-shallow-loops-to-deep-agents.md",
    "permalink": "https://github.com/aymericbeaumet/aggr-instance/blob/ebb0941c5c06a2ab2377342d607535262a3e969e/items/philschmid-de/2025/10/2025-10-12-agents-2-0-from-shallow-loops-to-deep-agents.md"
  },
  "id": "urn:aggr:item:2cbed5041e3379ce2a9d1f1c7fbe04eb10d3db33",
  "isBasedOn": {
    "@id": "https://www.philschmid.de/agents-2.0-deep-agents"
  },
  "mainEntity": {
    "@id": "https://www.philschmid.de/agents-2.0-deep-agents",
    "@type": "CreativeWork",
    "archivedAt": {
      "@id": "https://aggr.aymericbeaumet.com/items/philschmid-de/2025-10-12-agents-2-0-from-shallow-loops-to-deep-agents/#webpage"
    },
    "dateModified": "2025-10-12T00:00:00+00:00",
    "datePublished": "2025-10-12T00:00:00+00:00",
    "headline": "Agents 2.0: From Shallow Loops to Deep Agents",
    "timeRequired": "PT4M",
    "url": "https://www.philschmid.de/agents-2.0-deep-agents",
    "wordCount": 878
  },
  "name": "Archived snapshot: Agents 2.0: From Shallow Loops to Deep Agents",
  "preview": null,
  "reading_minutes": 4,
  "replicated_at": null,
  "source": "philschmid-de",
  "source_name": "philschmid.de - RSS feed",
  "summary": "An overview of the architectural shift from Shallow Agents (Agent 1.0) to Deep Agents (Agent 2.0) and how to build complex AI agents that can handle multi-step tasks over extended periods.",
  "tags": [],
  "temporalCoverage": "2026-09-27T19:29:15.293681927+00:00",
  "title": "Agents 2.0: From Shallow Loops to Deep Agents",
  "url": "https://aggr.aymericbeaumet.com/items/philschmid-de/2025-10-12-agents-2-0-from-shallow-loops-to-deep-agents/",
  "word_count": 878
}