How Deep Agents Keep Long-Running Agents’ Context Focused
Brief
LangChain outlines how Deep Agents manage context as tasks grow, keeping large or less relevant information out of the active window while preserving ways to retrieve it.
Five ways to manage context
- Offload tool results exceeding roughly 20,000 tokens to files; the agent sees a preview and can retrieve details later. Oversized user messages are handled similarly at a 50,000-token threshold.
- Summarize older messages when context usage reaches 85% by default; the original messages are saved so details can be recovered.
- Load skill instructions only when relevant, run noisy work in subagents, and store long-term memory in files that can be used with another model or provider.
Getting started
- Deep Agents is an open-source agent harness. The article gives
uv add deepagentsas the installation command.
Generated by AI from the original article. Check the source for full details.