LangChain introduces AgentMiddleware, a system for customizing agent harnesses by injecting logic at specific points in the agent loop. Middleware exposes hooks like before_agent, before_model, wrap_model_call, wrap_tool_call, after_model, and after_agent, enabling use cases such as PII redaction, dynamic tool selection,

6m read timeFrom blog.langchain.com
Post cover image
Table of contents
What are agent harnessesWhy you would want to customize your agent harnessesWhat is agent middleware?Examples of MiddlewareDeep Agents case studyWhy we’re betting on agent middleware

Sort: