AgentMiddleware()Stream transformer factories registered by the middleware.
Each entry is a scope-aware factory invoked as factory(scope) so every
invocation receives a fresh instance. Factories are merged with the
transformers argument of create_agent
at graph compile time, after the ToolCallTransformer and before any
user-supplied entries.
Base middleware class for an agent.
Subclass this and implement any of the defined methods to customize agent behavior between steps in the main agent loop.