Expand description
lellm-agent — Agent 运行时。
提供完整的 Agent 运行时能力:工具系统、Agent Loop、 循环检测、重试策略、Fallback 降级等。
Re-exports§
pub use hook::AgentHook;pub use hook::AgentHookContext;pub use hook::AgentHookSnapshot;pub use hook::NoOpAgentHook;pub use hook::TracingAgentHook;pub use runtime::AgentBuilder;pub use runtime::AgentEvent;pub use runtime::AgentFlowNode;pub use runtime::AgentState;pub use runtime::AgentStream;pub use runtime::BackoffStrategy;pub use runtime::BatchExecutionResult;pub use runtime::CompactionResult;pub use runtime::CompositeCatalog;pub use runtime::ContextBudget;pub use runtime::ContextCompactor;pub use runtime::DefaultFallback;pub use runtime::FallbackAction;pub use runtime::FallbackContext;pub use runtime::FallbackStrategy;pub use runtime::LocalCompactor;pub use runtime::ParallelSafety;pub use runtime::ResolvedRound;pub use runtime::RetryPolicy;pub use runtime::StaticCatalog;pub use runtime::StopReason;pub use runtime::ToolArgs;pub use runtime::ToolCatalog;pub use runtime::ToolCategory;pub use runtime::ToolExecutor;pub use runtime::ToolRegistration;pub use runtime::ToolSnapshot;pub use runtime::ToolUseConfig;pub use runtime::ToolUseDeps;pub use runtime::ToolUseLoop;pub use runtime::ToolUseResult;pub use runtime::estimate_message;pub use runtime::estimate_tokens;pub use runtime::execute_batch_with;pub use runtime::initial_state;pub use schemars;pub use serde;
Modules§
Structs§
- Resolved
Model - 解析后的模型 — 从 Registry 中解析 RouteEntry 得到
- Tool
Error - 工具执行错误 — 携带错误分类与详细描述。
Enums§
- Tool
Error Kind - 工具执行错误的分类。
Traits§
- Into
Tool Error - 将已知错误类型转换为
ToolError。 - Into
Tool Result - 将工具函数返回值统一转换为
ToolResult。
Functions§
- create_
agent - 便捷创建 Agent — 生态包糖衣 API 原型。
- create_
agent_ full - 完整配置的便捷创建。
- create_
agent_ with_ system - 快速创建带系统提示的 Agent。
- create_
agent_ with_ tools - 快速创建带工具的 Agent。
Type Aliases§
- Tool
Result - 工具执行结果 —
serde_json::Value支持结构化数据。