← все видео

Managing Agent Context with LangChain: Summarization Middleware Explained

LangChain · 2025-11-25 · 8м 30с · 5 900 просмотров · YouTube ↗

Топики: ai-agent-orchestration

Аудио ещё не скачано.

📝 Summary

Summary ещё не сгенерён.

📜 Transcript

Transcript ещё не сделан.

⚙️ Pipeline jobs

Нет job'ов в очереди.

📄 Описание YouTube

Показать
Long-running agents eventually hit context overload — leading to context poisoning, distraction, confusion, and degraded performance.

In this video, Christian from LangChain breaks down how Summarization Middleware helps you automatically manage and compress conversation history to keep your agents sharp, efficient, and reliable.

You’ll learn:
• Why long contexts silently fail over time
• Six strategies for fixing context overload (RAG, pruning, offloading, and more)
• How summarization fits into the ReAct agent loop
• How to configure triggers, keep conditions, and custom prompts
• A full live demo in Next.js, showing summaries appear as chat bubbles in real time

What Summarization Middleware gives you:
• Automatic summarization when token limits are approached
• Flexible triggers based on tokens, fractions, or message counts
• Control over how much recent context is preserved
• A separate, cheaper model for summarization to reduce cost

Perfect for:
• Coding agents
• Customer support assistants
• Multi-step workflows
• Any long-running conversational agent

📚 Docs: https://docs.langchain.com/oss/javascript/langchain/middleware/built-in#summarization
🧑‍💻 Example Code: https://github.com/christian-bromann/langchat