Repository navigation
Replies: 3 comments
|
Deep Agents already has built-in context compression, so in most cases you don't need to manually truncate the conversation. It uses two main mechanisms: Large tool inputs/results are offloaded to the filesystem and replaced with references. In the current implementation, summarization typically triggers around 85% of the model's max_input_tokens. If a model call raises a ContextOverflowError, Deep Agents can also summarize the history and retry. For long-running workflows, subagents are also useful because they isolate detailed tool work and return only the final result to the parent agent. Docs: https://docs.langchain.com/oss/python/deepagents/context-engineering |
|
Deep Agents does not ship Claude Code’s exact auto-compact, but you can get the same shape in the SDK: summarize old turns + keep a filesystem scratchpad. Practical recipe
There isn’t a single |
|
Uh oh!
There was an error while loading. Please reload this page.
How to compress the context when exceeding the token limit in sdk,just like claude code
All reactions