惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
博客园_首页
T
Tailwind CSS Blog
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
S
SegmentFault 最新的问题
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
Jina AI
Jina AI
WordPress大学
WordPress大学
U
Unit 42
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog

LangChain Forum - Topics tagged python-help

Llama-server process has terminated: invalid argument --load-mode with Ollama client 0.32.6 and langchain-ollama 1.1.0 Langchain Certified Agent Engineer Exam - Exam link not received and no response Null-drift: A bare-metal O(1) Memory Store for continuous LangGraph agents Clarification needed: Assistant config vs context and graph initialization Proposal: a small local helper for readable run traces via PR Proxy Authentication Required 407 What is the right way to dynamically create and run a graph? Re-Implement claude code's dynamic workflow using langchian & deepagents How to define a correct state for multi-agent system Response Format Groq Model Pydantic I hope to get some recommendations for practical skills Interrupt does not work correctly in LangGraph The Qwen3.6b model in fireworks through initchatmodel reporting hugely inflated tokens For parallel execution in Node, should i use the functional API? Potential Enhancement: Django-Managed PostgresSaver Pre-interrupt() code re-runs on resume — anti-pattern, or is there a sanctioned way to detect resume? Interrupt parallel branch execution Best practices for self-hosting LangGraph Server OSS without LangGraph keys Dynamically Enabling/Disabling Graphs in a LangGraph Server at Runtime LangGraph thread copy can take 12+ minutes: recommended production pattern? Will DeltaChannel be the default for AgentState.messages, or expected to stay opt-in? Proposal: additional docs for implementing custom DB checkpointers or a guide on generic base checkpointer Prompt_cache_retention: '24h' supported in langchain agents and where to provide it, inside invoke or while creating client? Could RAG pipelines realistically cause deployment timeouts, is Render suitable for first-time RAG deployments? How do I use langchain_postgres' init_vectorstore_table correctly? Proposal: Graph-wide default error handler for StateGraph (fallback for nodes without error_handler) Support timedelta for CachePolicy.ttl, consistent with TimeoutPolicy Anyone confirms this issue that deepagent ui streaming is disturb by update in deepagent or bug issue Best Stack for Building AI Applications Seeking help regarding the connection between Websocket and tool calls
How do ContextEditingMiddleware and SummarizationMiddlewa...
rushant001 · 2026-04-20 · via LangChain Forum - Topics tagged python-help
Hi everyone, I’m using ContextEditingMiddleware and SummarizationMiddleware together in create_agent , and I’d like to understand the exact execution semantics when they’re combined. The docs describe each one individually but don’t explain how they interact. My code: agent_executor = create_agent( model=self.llm_service.llm, tools=self.tools, system_prompt=system_prompt, middleware=[ # Layer 1: clean up old tool results (lightweight, no LLM call) ContextEditingMiddleware( edits=[ ClearToolUsesEdit( trigger=self.clear_trigger, keep=self.clear_tool_keep, ), ], ), # Layer 2: summarization (heavier, uses a cheap LLM) SummarizationMiddleware( model=LLMService(model_name=self.summary_model_name).llm, trigger=self.summary_trigger, keep=self.summary_keep, trim_tokens_to_summarize=self.summary_trim_tokens, ), ], ) Questions I’d love help with: Execution order — Which one runs first? Does the order in the middleware=[] list matter, or is it determined by hook type ( before_model vs wrap_model_call )? Data flow — Does one middleware’s output feed into the other? Does the cleanup affect what the summary LLM sees? Does the summary output become the input that cleanup operates on? Both triggered at once — If the conversation exceeds both thresholds in the same call: Do both run? Which result reaches the main LLM? Are the effects combined, or does one override the other? State vs request — I noticed SummarizationMiddleware uses before_model and ContextEditingMiddleware uses wrap_model_call . Does that mean summarization persistently modifies state["messages"] while context editing only modifies the per-call request? What are the multi-turn implications? Recommended pattern — Is the “cheap cleanup first, summarization as fallback” pattern (often suggested in community tutorials) actually supported by this combination, or does it require custom middleware? A concrete walkthrough showing the message list before and after each middleware runs — especially for the “both triggered” case — would be really helpful. Using langchain 1.2.15 . Thanks! 1 post - 1 participant Read full topic