How-toSelected

Deep Agents Context Management

Why we picked it

Developers building AI agents can implement this filesystem approach to manage context windows efficiently, avoiding token limits while preserving full conversation history.

Deep Agents uses filesystem-based context management to handle large tool results and long conversations.

Body

When tool results exceed size limits, they're written to /large_tool_results with a preview shown to the model.

For lengthy conversations, older messages get offloaded to /conversation_history before summarization.Agents can also proactively compact conversations using a compact_conversation tool.

Original · Harrison Chase

This is very similar to how we think about context management in Deep Agents: compaction should reduce what is sent to the model, not erase the underlying work history. In Deep Agents, the logic is: - every agent gets a filesystem to work with (can be real or virtual) - when a tool result is too large, we write the full result to the filesystem (/large_tool_results) and replace the model-visible message with a preview - when the conversation gets long, we offload older messages to the filesystem (/conversation_history) history first, then generate a summary - the agent can also decide to compact proactively via a compact_conversation tool, which uses the same offload + summarize logic Summarization middleware with all this logic: github.com/langchain-ai/d… OpenAI @OpenAI This is GPT-6 Astra. Anything you can do on a computer, Astra can do for you. Fast.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Deep Agents, context management, file systems.

Source attribution: curated from Harrison Chase (@hwchase17).