library · inferred from evidence
SummarizationMiddleware
A prebuilt middleware for summarizing agent history to bound context.
- Diagnose: conversation history grows forever despite SummarizationMiddleware
Shows how to fix diagnose: conversation history grows forever despite SummarizationMiddleware. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
- Compose a middleware stack: PII redaction, summarization, human approval
The three prebuilt middlewares that cover most production agents: PIIMiddleware to keep sensitive data from the model, SummarizationMiddleware to bound history, HumanInTheLoopMiddleware to gate risky tool calls. Compose them in one list. No