register_middleware(
self,
middleware: AgentMiddleware[Any, Any] | type[AgentMiddleware[Any, Any]]
| Name | Type | Description |
|---|---|---|
middleware* | AgentMiddleware[Any, Any] | type[AgentMiddleware[Any, Any]] |
Install LangChain middleware on the agent.
A class is instantiated without arguments. Pass an instance when construction requires configuration.
Middleware class or instance.