Module middleware

Source

Structs§

AnthropicPromptCachingMiddleware
Anthropic-specific prompt caching middleware. Marks system prompts for caching to reduce latency on subsequent requests with the same base prompt.
BaseSystemPromptMiddleware
DeepAgentPromptMiddleware
Deep Agent prompt middleware that injects comprehensive tool usage instructions and examples to force the LLM to actually call tools instead of just talking about them.
FilesystemMiddleware
HitlPolicy
HumanInLoopMiddleware
MiddlewareContext
Read/write state handle exposed to middleware implementations.
ModelRequest
Request sent to the underlying language model. Middlewares can augment the system prompt or mutate the pending message list before the model call.
PlanningMiddleware
SubAgentDescriptor
SubAgentMiddleware
SubAgentRegistration
SummarizationMiddleware
TaskRouterTool

Traits§

AgentMiddleware
Middleware hook that can register additional tools and mutate the model request prior to execution. Mirrors the Python AgentMiddleware contracts but keeps the interface async-first for future network calls.