Expand description
Agent system for building autonomous LLM applications.
Provides core abstractions and implementations for agents.
§Core Concepts
- Agent: Responsible for planning, deciding what action to execute next.
- AgentExecutor: Responsible for execution loop (plan -> act -> observe).
- Tool: Callable tools that agents can invoke.
§Execution Flow
Input question
|
Agent.plan() -> AgentAction or AgentFinish
|
If Action: execute tool -> get observation
|
Add to intermediate_steps
|
Loop until AgentFinish returnedRe-exports§
pub use adapter::AgentRunnable;pub use adaptive_rag::AdaptiveRAG;pub use adaptive_rag::AdaptiveRAGError;pub use adaptive_rag::AdaptiveRAGResult;pub use adaptive_rag::RagDecision;pub use base::AgentError;pub use base::AgentExecutor;pub use base::BaseAgent;pub use builder::AgentBuilder;pub use crag::CRAGError;pub use crag::CRAGResult;pub use crag::CorrectiveRAGAgent;pub use deep_research::Citation;pub use deep_research::DeepResearchAgent;pub use deep_research::ResearchError;pub use deep_research::ResearchReport;pub use function_calling::FunctionCallingAgent;pub use handoffs::HandoffManager;pub use plan_execute::PlanExecuteAgent;pub use plan_execute::PlanExecuteError;pub use react::ReActAgent;pub use streaming::StreamingFunctionCallingAgent;pub use types::AgentAction;pub use types::AgentFinish;pub use types::AgentOutput;pub use types::AgentStep;pub use types::ToolInput;
Modules§
- adapter
- AgentRunnable adapter - bridges AgentExecutor to the Runnable trait.
- adaptive_
rag - Adaptive RAG implementation.
- base
- Agent base traits and executor implementation.
- builder
- AgentBuilder — 3 行代码创建 Agent
- crag
- Corrective RAG (CRAG) Agent.
- deep_
research - Deep Research Agent: multi-round research with sub-topic decomposition, parallel search, and comprehensive report synthesis with citations.
- function_
calling - handoffs
- Handoffs 多 Agent 交接
- plan_
execute - Plan-Execute Agent:规划-执行-重规划
- react
- ReAct Agent 实现
- streaming
- Streaming Tool Calls - 流式工具调用
- types
- Agent related type definitions