# Deep Agents

**URL:** https://forum.langchain.com/c/oss-product-help-lc-and-lg/deep-agents/18.md

[Latest](https://forum.langchain.com/latest.md) · [Categories](https://forum.langchain.com/categories.md) · [Tags](https://forum.langchain.com/tags.md)

---

## [About the Deep Agents category](https://forum.langchain.com/t/about-the-deep-agents-category/2728)

<div class="topic-metadata">

**Author:** [@amada-langchain](https://forum.langchain.com/u/amada-langchain)\
**Replies:** 0\
**Last updated:** [January 14, 2026, 10:50pm UTC](https://forum.langchain.com/t/about-the-deep-agents-category/2728 "2026-01-14T22:50:48Z")

</div>

Questions, issues, and/or discussions regarding Deep Agents.

---

## [DeepAgents summarization can produce an empty summary when a single tool result exceeds trimTokensToSummarize](https://forum.langchain.com/t/deepagents-summarization-can-produce-an-empty-summary-when-a-single-tool-result-exceeds-trimtokenstosummarize/4751)

<div class="topic-metadata">

**Author:** [@Abilash](https://forum.langchain.com/u/Abilash)\
**Replies:** 1\
**Last updated:** [October 31, 2026, 4:21pm UTC](https://forum.langchain.com/t/deepagents-summarization-can-produce-an-empty-summary-when-a-single-tool-result-exceeds-trimtokenstosummarize/4751 "2026-10-31T16:21:43Z")

</div>

Problem We’re seeing agent runs terminate with a summarization result such as: There's no prior conversation content in this thread to summarize. even though the thread contains substantial conversation history and mu…

---

## [Subagent delegation bypasses ToolCallLimitMiddleware, degenerate queries followed](https://forum.langchain.com/t/subagent-delegation-bypasses-toolcalllimitmiddleware-degenerate-queries-followed/4952)

<div class="topic-metadata">

**Author:** [@PluckyLemur20](https://forum.langchain.com/u/PluckyLemur20)\
**Replies:** 2\
**Last updated:** [October 29, 2026, 3:36pm UTC](https://forum.langchain.com/t/subagent-delegation-bypasses-toolcalllimitmiddleware-degenerate-queries-followed/4952 "2026-10-29T15:36:26Z")

</div>

I hit something worth flagging here, since it directly interacts with the ToolCallLimitMiddleware fix discussed above, and shows a real gap in where that protection actually applies. Setup: I have a create\_deep\_agent o…

---

## [How to implement Dynamic Runtime Subagents in DeepAgents + LangGraph](https://forum.langchain.com/t/how-to-implement-dynamic-runtime-subagents-in-deepagents-langgraph/4607)

<div class="topic-metadata">

**Author:** [@mrsknetwork](https://forum.langchain.com/u/mrsknetwork)\
**Replies:** 5\
**Last updated:** [October 7, 2026, 4:34pm UTC](https://forum.langchain.com/t/how-to-implement-dynamic-runtime-subagents-in-deepagents-langgraph/4607 "2026-10-07T16:34:52Z")

</div>

Hi everyone, I’m trying to understand the best way to implement dynamically generated subagents at runtime. My goal is slightly different from the standard DeepAgents subagent pattern. Instead of predefining all subage…

---

## [Does langchain provides classes for multimodal output models or for simplicity models with image only output like GPT-Image-2? Is the ChatOpenAI() going to work for GPT-Image-2 model?](https://forum.langchain.com/t/does-langchain-provides-classes-for-multimodal-output-models-or-for-simplicity-models-with-image-only-output-like-gpt-image-2-is-the-chatopenai-going-to-work-for-gpt-image-2-model/4698)

<div class="topic-metadata">

**Author:** [@shubhamkala06](https://forum.langchain.com/u/shubhamkala06)\
**Replies:** 4\
**Last updated:** [October 7, 2026, 6:35am UTC](https://forum.langchain.com/t/does-langchain-provides-classes-for-multimodal-output-models-or-for-simplicity-models-with-image-only-output-like-gpt-image-2-is-the-chatopenai-going-to-work-for-gpt-image-2-model/4698 "2026-10-07T06:35:35Z")

</div>

I have been trying to figure out that is it possible that a model response can be a image block or any other block other than the text block. So can a model response give an image block like this- { "type": "image…

---

## [Deep agent that scaffolds new LangChain/LangGraph agents on request — LocalShellBackend + langctl as tools?](https://forum.langchain.com/t/deep-agent-that-scaffolds-new-langchain-langgraph-agents-on-request-localshellbackend-langctl-as-tools/4436)

<div class="topic-metadata">

**Author:** [@Sami606713](https://forum.langchain.com/u/Sami606713)\
**Replies:** 4\
**Last updated:** [September 10, 2026, 7:24am UTC](https://forum.langchain.com/t/deep-agent-that-scaffolds-new-langchain-langgraph-agents-on-request-localshellbackend-langctl-as-tools/4436 "2026-09-10T07:24:29Z")

</div>

Problem I’m building a CLI (langctl) that scaffolds LangChain/LangGraph agent projects. I want to add a “builder” deep agent behind a chat UI that can take a request like “make me a research assistant” and actually pro…

---

## [Specialize read\_file for use within eval](https://forum.langchain.com/t/specialize-read-file-for-use-within-eval/4418)

<div class="topic-metadata">

**Author:** [@kgeis](https://forum.langchain.com/u/kgeis)\
**Replies:** 3\
**Last updated:** [August 24, 2026, 3:53pm UTC](https://forum.langchain.com/t/specialize-read-file-for-use-within-eval/4418 "2026-08-24T15:53:49Z")

</div>

I’m using programmatic tool calling inside the eval tool. I put a JSON file to my agent’s filesystem and I exposed the read\_file tool to the code interpreter. My problem is that read\_file adds line numbers at the beginni…

---

## [AGI architectural proposal: Dynamic Topic-Segmented memory (DTSM) for large language models evolving to AGI](https://forum.langchain.com/t/agi-architectural-proposal-dynamic-topic-segmented-memory-dtsm-for-large-language-models-evolving-to-agi/4365)

<div class="topic-metadata">

**Author:** [@RobertORourke](https://forum.langchain.com/u/RobertORourke)\
**Replies:** 0\
**Last updated:** [August 16, 2026, 8:23pm UTC](https://forum.langchain.com/t/agi-architectural-proposal-dynamic-topic-segmented-memory-dtsm-for-large-language-models-evolving-to-agi/4365 "2026-08-16T20:23:23Z")

</div>

Architectural Proposal: Dynamic Topic-Segmented Memory (DTSM) for Large Language Models Executive Summary Current Large Language Model (LLM) architectures struggle with long-form, multi-topic conversations. Standard co…

---

## [Deep Agents: Clarify Multimodal (Image) Context Management and Compression](https://forum.langchain.com/t/deep-agents-clarify-multimodal-image-context-management-and-compression/3485)

<div class="topic-metadata">

**Author:** [@m7mdhka](https://forum.langchain.com/u/m7mdhka)\
**Replies:** 3\
**Last updated:** [August 11, 2026, 9:28am UTC](https://forum.langchain.com/t/deep-agents-clarify-multimodal-image-context-management-and-compression/3485 "2026-08-11T09:28:34Z")

</div>

Currently, Deep Agents provide mechanisms like\`context.compact\`and summarization middleware to manage the textual conversation history within the context window. However, with the increasing use of multimodal LLMs and th…

---

## [Should AI agents have working hours like human employees?](https://forum.langchain.com/t/should-ai-agents-have-working-hours-like-human-employees/4123)

<div class="topic-metadata">

**Author:** [@Saiganesh](https://forum.langchain.com/u/Saiganesh)\
**Replies:** 1\
**Last updated:** [July 10, 2026, 3:44pm UTC](https://forum.langchain.com/t/should-ai-agents-have-working-hours-like-human-employees/4123 "2026-07-10T15:44:29Z")

</div>

We expect AI to be available 24/7, but should it always be? Imagine an AI executive assistant that intentionally batches notifications, delays non-urgent interruptions, and only escalates high-priority issues outside “w…

---

## [Loop prevention in Deep Agents with repeated tool calls](https://forum.langchain.com/t/loop-prevention-in-deep-agents-with-repeated-tool-calls/4034)

<div class="topic-metadata">

**Author:** [@Jewells](https://forum.langchain.com/u/Jewells)\
**Replies:** 1\
**Last updated:** [June 26, 2026, 10:27am UTC](https://forum.langchain.com/t/loop-prevention-in-deep-agents-with-repeated-tool-calls/4034 "2026-06-26T10:27:38Z")

</div>

Loop Prevention Middleware in Deep Agents I’m using a custom loop prevention middleware that tracks the tool parameters and responses. If the same tool is called multiple times with the same parameters and produces the s…

---

## [Is there any way to disable the system default tools such as ls , read\_files etc](https://forum.langchain.com/t/is-there-any-way-to-disable-the-system-default-tools-such-as-ls-read-files-etc/3709)

<div class="topic-metadata">

**Author:** [@mailme365](https://forum.langchain.com/u/mailme365)\
**Replies:** 9\
**Last updated:** [June 22, 2026, 4:01pm UTC](https://forum.langchain.com/t/is-there-any-way-to-disable-the-system-default-tools-such-as-ls-read-files-etc/3709 "2026-06-22T16:01:58Z")

</div>

We have been using deepagent SDK for a while, this is really an amazing framework that helps for agent/sub agent orchistration. However, all the primary agent and sub agent by deisgn to embed a bunch of file system tool…

---

## [Langchain model providing adapters](https://forum.langchain.com/t/langchain-model-providing-adapters/3978)

<div class="topic-metadata">

**Author:** [@daya\_2k](https://forum.langchain.com/u/daya_2k)\
**Replies:** 2\
**Last updated:** [June 22, 2026, 3:28pm UTC](https://forum.langchain.com/t/langchain-model-providing-adapters/3978 "2026-06-22T15:28:36Z")

</div>

Hi team, I have been using langchain since it has been released. We have bunch of adapters {ChatBedrock, ChatGoogleGenerativeAI..} to integrate an LLM for langchain powered AI app development. However, some firms are u…

---

## [Handling multi-turn conversations with sub-agents in a deep agent architecture](https://forum.langchain.com/t/handling-multi-turn-conversations-with-sub-agents-in-a-deep-agent-architecture/3964)

<div class="topic-metadata">

**Author:** [@SujayPrabhu](https://forum.langchain.com/u/SujayPrabhu)\
**Replies:** 1\
**Last updated:** [June 16, 2026, 10:37am UTC](https://forum.langchain.com/t/handling-multi-turn-conversations-with-sub-agents-in-a-deep-agent-architecture/3964 "2026-06-16T10:37:27Z")

</div>

Hello team, We currently have a global chat page where users interact with an agent. We’ve architected this as a deep agent with sub-agents, each responsible for a slightly different part of the workflow. For example, u…

---

## [Deep Agents - Event Streaming issue](https://forum.langchain.com/t/deep-agents-event-streaming-issue/3962)

<div class="topic-metadata">

**Author:** [@mudra-mjpro](https://forum.langchain.com/u/mudra-mjpro)\
**Replies:** 1\
**Last updated:** [June 16, 2026, 8:28am UTC](https://forum.langchain.com/t/deep-agents-event-streaming-issue/3962 "2026-06-16T08:28:26Z")

</div>

DeepAgents Projection Streams (stream.messages / stream.subagents) Return No Items Despite Raw Events Streaming I’m using DeepAgents 0.6.10 with event streaming(Event streaming - Docs by LangChain). Raw events are str…

---

## [How to build a custom subagent which by itself a langgraph graph which have its own schema?](https://forum.langchain.com/t/how-to-build-a-custom-subagent-which-by-itself-a-langgraph-graph-which-have-its-own-schema/3002)

<div class="topic-metadata">

**Author:** [@mohamedsheded](https://forum.langchain.com/u/mohamedsheded)\
**Replies:** 10\
**Last updated:** [June 10, 2026, 8:22am UTC](https://forum.langchain.com/t/how-to-build-a-custom-subagent-which-by-itself-a-langgraph-graph-which-have-its-own-schema/3002 "2026-06-10T08:22:04Z")

</div>

does it need to inhert from the Agentstate ? should it have at least a field in the schema the same as the main agent orchestrator can i utilize the ui in a way which the start is not a baseMessage type ?

---

## [BaseSandbox.write() fails if file already exists -- any way to overwrite?](https://forum.langchain.com/t/basesandbox-write-fails-if-file-already-exists-any-way-to-overwrite/3335)

<div class="topic-metadata">

**Author:** [@wsmoak](https://forum.langchain.com/u/wsmoak)\
**Replies:** 4\
**Last updated:** [May 28, 2026, 8:57pm UTC](https://forum.langchain.com/t/basesandbox-write-fails-if-file-already-exists-any-way-to-overwrite/3335 "2026-05-28T20:57:38Z")

</div>

I’m using BaseSandbox.write() (via a custom DevPodBackend subclass) and running into an issue where write() fails when the target file already exists. The preflight check in \_WRITE\_CHECK\_TEMPLATE (sandbox.py line 68) exp…

---

## [Removing some default middleware from deepagents](https://forum.langchain.com/t/removing-some-default-middleware-from-deepagents/3283)

<div class="topic-metadata">

**Author:** [@bassuniz](https://forum.langchain.com/u/bassuniz)\
**Replies:** 2\
**Last updated:** [May 28, 2026, 6:29pm UTC](https://forum.langchain.com/t/removing-some-default-middleware-from-deepagents/3283 "2026-05-28T18:29:31Z")

</div>

Is there a way to remove a default middleware from the agent (for example: TodoListMiddleware) ?

---

## [FileSystem middleware](https://forum.langchain.com/t/filesystem-middleware/3672)

<div class="topic-metadata">

**Author:** [@bassuniz](https://forum.langchain.com/u/bassuniz)\
**Replies:** 2\
**Last updated:** [May 7, 2026, 12:27pm UTC](https://forum.langchain.com/t/filesystem-middleware/3672 "2026-05-07T12:27:54Z")

</div>

I want to exclude file system middleware (system prompt file system prompt + registered tools) I know I can do this using profiles, but I want to do this for some subagent not all the agents that use the same provider …

---

## [Modal Inference](https://forum.langchain.com/t/modal-inference/3629)

<div class="topic-metadata">

**Author:** [@Btibert3](https://forum.langchain.com/u/Btibert3)\
**Replies:** 3\
**Last updated:** [May 2, 2026, 9:14pm UTC](https://forum.langchain.com/t/modal-inference/3629 "2026-05-02T21:14:51Z")

</div>

I am using modal to host an LLM that uses the OpenAI API spec. Has anyone had success configuring the deepagents CLI to use inference for model(s) hosted on modal? My latest attempt was a swing at using litellm as the …

---

## [CLI: Read pdf is failing with DeepAgents CLI](https://forum.langchain.com/t/cli-read-pdf-is-failing-with-deepagents-cli/3601)

<div class="topic-metadata">

**Author:** [@Btibert3](https://forum.langchain.com/u/Btibert3)\
**Replies:** 4\
**Last updated:** [April 27, 2026, 3:14pm UTC](https://forum.langchain.com/t/cli-read-pdf-is-failing-with-deepagents-cli/3601 "2026-04-27T15:14:49Z")

</div>

I am only starting to kick the tires of the deepagents CLI, so bear with me. I started by hooking into a local model via Ollama and then jumped to openAI 5.4. My prompt: \>help me summarize this submission @file.pdf T…

---

## [Where should I define the name and description for subagents?](https://forum.langchain.com/t/where-should-i-define-the-name-and-description-for-subagents/3553)

<div class="topic-metadata">

**Author:** [@wigging](https://forum.langchain.com/u/wigging)\
**Replies:** 3\
**Last updated:** [April 24, 2026, 11:26pm UTC](https://forum.langchain.com/t/where-should-i-define-the-name-and-description-for-subagents/3553 "2026-04-24T23:26:01Z")

</div>

I have a subagent as defined below where I provide a name for the agent. # agent\_weather.py from langchain.agents import create\_agent def get\_weather(city: str) -\> str: """Get weather for a given city.""" retu…

---

## [Cache disable in Deepagent](https://forum.langchain.com/t/cache-disable-in-deepagent/3444)

<div class="topic-metadata">

**Author:** [@AmitPZepto](https://forum.langchain.com/u/AmitPZepto)\
**Replies:** 4\
**Last updated:** [April 22, 2026, 9:18am UTC](https://forum.langchain.com/t/cache-disable-in-deepagent/3444 "2026-04-22T09:18:25Z")

</div>

How can i disable cache while using deepagents, i m using litllm for that deepagent auto add cache headers, but haiku model not support it {“error\_code”:“BAD\_REQUEST”,“message”:“{\\“message\\”:\\“cache\_control: Extra inpu…

---

## [tool isolation between Skills:](https://forum.langchain.com/t/tool-isolation-between-skills/3496)

<div class="topic-metadata">

**Author:** [@chenkejin](https://forum.langchain.com/u/chenkejin)\
**Replies:** 1\
**Last updated:** [April 20, 2026, 3:56pm UTC](https://forum.langchain.com/t/tool-isolation-between-skills/3496 "2026-04-20T15:56:52Z")

</div>

How can I detect when a DeepAgents Skill (loaded from MD files) finishes execution? I need to implement strict tool isolation between Skills: when one Skill is running, the agent can only use its allowed tools, and the t…

---

## [In-place model update on a compiled create\_agent and per-subagent model update for deep agents - is this possible?](https://forum.langchain.com/t/in-place-model-update-on-a-compiled-create-agent-and-per-subagent-model-update-for-deep-agents-is-this-possible/3449)

<div class="topic-metadata">

**Author:** [@NikhilKamathB](https://forum.langchain.com/u/NikhilKamathB)\
**Replies:** 1\
**Last updated:** [April 19, 2026, 9:39am UTC](https://forum.langchain.com/t/in-place-model-update-on-a-compiled-create-agent-and-per-subagent-model-update-for-deep-agents-is-this-possible/3449 "2026-04-19T09:39:34Z")

</div>

Updating a model in-place on a compiled create\_agent and per-subagent in deep agents? Setup: Long-running web-socket sessions. On session connect, I build a deep agent with a main agent and several subagents — each can u…

---

## [Is there anyway that I can remove grep, glob, write\_todos, task from deepagents?](https://forum.langchain.com/t/is-there-anyway-that-i-can-remove-grep-glob-write-todos-task-from-deepagents/3375)

<div class="topic-metadata">

**Author:** [@LucienShui](https://forum.langchain.com/u/LucienShui)\
**Replies:** 2\
**Last updated:** [April 13, 2026, 2:01am UTC](https://forum.langchain.com/t/is-there-anyway-that-i-can-remove-grep-glob-write-todos-task-from-deepagents/3375 "2026-04-13T02:01:27Z")

</div>

I’m working on integrating file system operations (e.g., ls, write\_file, edit\_file) with a Postgres database, alongside some custom tools like search\_by\_tags. However, I’m running into a problem: I can’t find a way to r…

---

## [DeepAgents CLI: Do subagents have to be defined in Python, or can they be defined via YAML?](https://forum.langchain.com/t/deepagents-cli-do-subagents-have-to-be-defined-in-python-or-can-they-be-defined-via-yaml/3277)

<div class="topic-metadata">

**Author:** [@Lee2026](https://forum.langchain.com/u/Lee2026)\
**Replies:** 4\
**Last updated:** [April 9, 2026, 9:08am UTC](https://forum.langchain.com/t/deepagents-cli-do-subagents-have-to-be-defined-in-python-or-can-they-be-defined-via-yaml/3277 "2026-04-09T09:08:36Z")

</div>

Hi , In DeepAgents CLI, do custom subagents have to be defined in Python (as dict/object configs passed via subagents), and any YAML files I’ve seen are just descriptive configuration sources? In other words, is YAML n…

---

## [How to implement the Router Pattern in Deep Agents? (Routing to multiple specialized Deep Agents with different structured outputs)](https://forum.langchain.com/t/how-to-implement-the-router-pattern-in-deep-agents-routing-to-multiple-specialized-deep-agents-with-different-structured-outputs/3336)

<div class="topic-metadata">

**Author:** [@OZOOOOOH](https://forum.langchain.com/u/OZOOOOOH)\
**Replies:** 4\
**Last updated:** [April 7, 2026, 1:07pm UTC](https://forum.langchain.com/t/how-to-implement-the-router-pattern-in-deep-agents-routing-to-multiple-specialized-deep-agents-with-different-structured-outputs/3336 "2026-04-07T13:07:03Z")

</div>

Hi everyone, I am currently building a multi-agent system using deepagents and I’m looking for some advice on the best architecture for routing. My Current Setup: I have created several Specialized Agents for differen…

---

## [Should we organize the file structure under the deepagentcli directory？](https://forum.langchain.com/t/should-we-organize-the-file-structure-under-the-deepagentcli-directory/3278)

<div class="topic-metadata">

**Author:** [@BANG404](https://forum.langchain.com/u/BANG404)\
**Replies:** 5\
**Last updated:** [March 31, 2026, 2:52am UTC](https://forum.langchain.com/t/should-we-organize-the-file-structure-under-the-deepagentcli-directory/3278 "2026-03-31T02:52:57Z")

</div>

Is the current structure too flattened?

---

## [Unexpected latency in minimal Deep Agent setup (create\_deep\_agent) + confusing @traceable runs](https://forum.langchain.com/t/unexpected-latency-in-minimal-deep-agent-setup-create-deep-agent-confusing-traceable-runs/3249)

<div class="topic-metadata">

**Author:** [@formertheorist](https://forum.langchain.com/u/formertheorist)\
**Replies:** 1\
**Last updated:** [March 26, 2026, 10:06am UTC](https://forum.langchain.com/t/unexpected-latency-in-minimal-deep-agent-setup-create-deep-agent-confusing-traceable-runs/3249 "2026-03-26T10:06:41Z")

</div>

Unexpected latency in minimal Deep Agent setup (create\_deep\_agent) + confusing @traceable runs Hi all, I’m debugging latency in a LangGraph/LangSmith setup and could use guidance. I’m building an assistant (chat\_agent) t…

[Next page](https://forum.langchain.com/c/oss-product-help-lc-and-lg/deep-agents/18.md?page=1)
