Structs§
- Base
Chat Model Caller - Wraps a
ChatModelinto aModelCaller. - Context
Editing Middleware - Manages conversation context by trimming or filtering messages before each model invocation.
- Human
InThe Loop Middleware - Pauses tool execution to request human approval.
- Middleware
Chain - A chain of middlewares that executes them in order.
- Model
Call Limit Middleware - Limits the number of model invocations during a single agent run.
- Model
Fallback Middleware - Falls back to alternative models when the primary model fails.
- Model
Request - A model invocation request visible to middleware.
- Model
Response - A model invocation response visible to middleware.
- Rule
Based Analyzer - Rule-based security analyzer that maps tool names and argument patterns to risk levels.
- Security
Middleware - Middleware that assesses tool call risk and optionally requires confirmation.
- Summarization
Middleware - Automatically summarizes conversation history when it exceeds a token limit.
- Threshold
Confirmation Policy - Confirms tool calls that meet or exceed a risk threshold.
- Todo
List Middleware - Adds task-planning capability to an agent by injecting a todo list into the system prompt.
- Tool
Call Limit Middleware - Limits the number of tool invocations during a single agent run.
- Tool
Call Request - A single tool call request visible to middleware.
- Tool
Retry Middleware - Retries failed tool calls with configurable attempts and backoff.
Enums§
- Context
Strategy - Strategy for editing context before model calls.
- Risk
Level - Risk level for a tool call.
Traits§
- Agent
Middleware - Middleware that can intercept and modify agent lifecycle events.
- Approval
Callback - A callback that decides whether a tool call should proceed.
- Confirmation
Policy - Determines whether a tool call at a given risk level requires confirmation.
- Model
Caller - Trait representing the next step in the model call chain.
- Security
Analyzer - Assesses the risk level of a tool call.
- Security
Confirmation Callback - Callback for obtaining user confirmation before executing a risky tool call.
- Tool
Caller - Trait representing the next step in the tool call chain.