Skip to main content

Crate agent_base

Crate agent_base 

Source

Re-exports§

pub use engine::AgentBuilder;
pub use engine::AgentRuntime;
pub use engine::AgentSession;
pub use engine::DefaultPipeline;
pub use engine::InMemorySessionStore;
pub use engine::QueueMode;
pub use engine::SessionStore;
pub use engine::ToolExecutionPipeline;
pub use engine::AllowAllApprovalHandler;
pub use engine::ApprovalHandler;
pub use engine::ConsecutiveFailureRecovery;
pub use engine::ContextCompaction;
pub use engine::ContextWindowManager;
pub use engine::DenyAllApprovalHandler;
pub use engine::Middleware;
pub use engine::NoopGuard;
pub use engine::PostLlmCtx;
pub use engine::PreLlmCtx;
pub use engine::ReactLoopGuard;
pub use engine::RetryOnError;
pub use engine::StopOnError;
pub use engine::ToolEnforcementConfig;
pub use engine::ToolEnforcementMiddleware;
pub use engine::ToolErrorAction;
pub use engine::ToolErrorRecovery;
pub use engine::TurnFactMiddleware;
pub use engine::TurnToolLimitMiddleware;
pub use engine::UserMessageCtx;
pub use engine::estimate_messages_tokens;
pub use engine::first_system_prompt;
pub use tool::AutoContinueTool;
pub use tool::DenyAllToolPolicy;
pub use tool::Tool;
pub use tool::ToolContext;
pub use tool::ToolDecision;
pub use tool::ToolPolicy;
pub use tool::ToolRegistry;
pub use tool::TypedTool;
pub use tool::UpdatePlanTool;
pub use types::RuntimeEvent;
pub use types::UserEvent;
pub use types::AgentError;
pub use types::AgentResult;
pub use types::ErrorKind;
pub use types::AgentConfig;
pub use types::Language;
pub use types::Message;
pub use types::RetryConfig;
pub use types::SafetyConfig;
pub use types::SessionConfig;
pub use types::TurnContext;
pub use llm_trait;

Modules§

engine
llm
LLM provider integration.
prelude
tool
types

Structs§

ActivationContext
Context passed to Tool::should_activate for Deferred tools.
ApprovalRequest
CheckpointData
GuardCtx
Guard context information — built by runtime, passed to guard.
PlanItem
A single step in a lightweight plan checklist.
ReasoningConfig
Reasoning/thinking configuration, unifying reasoning/thinking parameters across vendors.
SessionId
Unique identifier for an agent session.
ToolCallMessage
A tool call embedded in an assistant message.
ToolMetadata
Machine-readable metadata for a registered tool — origin, version, and runtime requirements in a stable shape consumers can inspect without parsing the LLM-facing definition JSON.
ToolResultData
UpdatePlanArgs
Arguments for the update_plan tool.
UsageInfo
Token usage information for an LLM call.

Enums§

ApprovalDecision
ChatMessage
A chat message in a conversation.
CheckpointStep
Content
Structured content returned by a tool, aligned with the MCP content array shape (no envelope, no orchestration/failure/truncation semantics).
FinishReason
Semantic finish reason, replacing scattered Option<String> matching.
GuardDecision
Guard decision — returned by guard, executed by base loop.
ImageAttachment
Image attachment for multimodal messages.
ImageDetail
Image detail level.
MessageRole
PlanStepStatus
Lightweight plan step status — display-only, no execution semantics.
ReasoningEffort
Reasoning intensity/depth enumeration.
ResponseFormat
Response format configuration.
RiskLevel
RunOutcome
The outcome of an Agent turn or run.
StreamChunk
Streaming response chunk.
ToolExposure
Visibility level of a tool to the LLM model.