Skip to main content

agent_base/
lib.rs

1pub mod engine;
2pub mod llm;
3pub mod skill;
4pub mod tool;
5pub mod types;
6
7// ---------------------------------------------------------------------------
8// Agent Runtime
9// ---------------------------------------------------------------------------
10pub use engine::{
11    AgentBuilder,
12    AgentRuntime,
13    AgentSession,
14    InMemorySessionStore,
15    SessionId,
16    SessionStore,
17};
18
19// ---------------------------------------------------------------------------
20// LLM Provider
21// ---------------------------------------------------------------------------
22pub use llm::{
23    AnthropicClient,
24    LlmCapabilities,
25    LlmClient,
26    LlmClientBuilder,
27    LlmProvider,
28    OpenAiClient,
29    StreamChunk,
30    UsageInfo,
31};
32
33// ---------------------------------------------------------------------------
34// Approval
35// ---------------------------------------------------------------------------
36pub use engine::{
37    AllowAllApprovalHandler,
38    ApprovalDecision,
39    ApprovalHandler,
40    ApprovalRequest,
41    DenyAllApprovalHandler,
42    Middleware,
43    PostLlmCtx,
44    PreLlmCtx,
45    UserMessageCtx,
46    ContextWindowManager,
47    RiskLevel,
48    RetryOnError,
49    StopOnError,
50    ToolErrorAction,
51    ToolErrorRecovery,
52};
53
54// ---------------------------------------------------------------------------
55// Tools
56// ---------------------------------------------------------------------------
57pub use tool::{
58    McpClient,
59    McpToolInfo,
60    McpToolRegistry,
61    SubAgentSessionPolicy,
62    SubAgentTool,
63    Tool,
64    ToolContext,
65    ToolControlFlow,
66    ToolOutput,
67    ToolPolicy,
68    ToolRegistry,
69    TypedTool,
70};
71
72// ---------------------------------------------------------------------------
73// Skill
74// ---------------------------------------------------------------------------
75pub use skill::{
76    FullDetailPrompter,
77    LazySkillPrompter,
78    Skill,
79    SkillPrompter,
80};
81
82// ---------------------------------------------------------------------------
83// Events
84// ---------------------------------------------------------------------------
85pub use types::AgentEvent;
86
87// ---------------------------------------------------------------------------
88// Errors
89// ---------------------------------------------------------------------------
90pub use types::{AgentError, AgentResult};
91
92// ---------------------------------------------------------------------------
93// Types
94// ---------------------------------------------------------------------------
95pub use types::{
96    AgentConfig,
97    ChatMessage,
98    CheckpointData,
99    CheckpointStep,
100    ImageAttachment,
101    ImageDetail,
102    Message,
103    MessageRole,
104    ResponseFormat,
105    RetryConfig,
106    RunOutcome,
107    ToolCallMessage,
108    ToolResultData,
109};