技巧精选

Deep Agents 上下文管理方法

This is very similar to how we think about context management in Deep Agents: compaction should redu...

精选理由

Deep Agents 分享了上下文管理的创新方法,通过文件系统处理大结果和长对话,避免信息丢失。

Deep Agents 采用文件系统管理上下文,当工具结果过大时写入文件系统并替换为预览。对话过长时,将旧消息卸载到文件系统并生成摘要。代理可通过 compact_conversation 工具主动压缩对话。相关逻辑已在 GitHub 上开源。

原文 · Harrison Chase

This is very similar to how we think about context management in Deep Agents: compaction should redu...

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. Your browser does not support the video tag. 🔗 View on Twitter 🔗 View Quoted Tweet 💬 11 🔄 0 ❤️ 44 👀 3859 📊 14 ⚡