Skip to main content

lc_agents/
lib.rs

1// lc-agents/src/lib.rs
2//! Agent system for building autonomous LLM applications.
3//!
4//! Provides core abstractions and implementations for agents.
5//!
6//! # Core Concepts
7//!
8//! - **Agent**: Responsible for planning, deciding what action to execute next.
9//! - **AgentExecutor**: Responsible for execution loop (plan -> act -> observe).
10//! - **Tool**: Callable tools that agents can invoke.
11//!
12//! # Execution Flow
13//!
14//! ```text
15//! Input question
16//!     |
17//! Agent.plan() -> AgentAction or AgentFinish
18//!     |
19//! If Action: execute tool -> get observation
20//!     |
21//! Add to intermediate_steps
22//!     |
23//! Loop until AgentFinish returned
24//! ```
25
26pub mod adaptive_rag;
27pub mod base;
28pub mod builder;
29pub mod crag;
30pub mod deep_research;
31pub mod function_calling;
32pub mod handoffs;
33pub mod plan_execute;
34pub mod react;
35pub mod streaming;
36pub mod types;
37
38pub use adaptive_rag::{AdaptiveRAG, AdaptiveRAGError, AdaptiveRAGResult, RagDecision};
39pub use base::{AgentError, AgentExecutor, BaseAgent};
40pub use builder::AgentBuilder;
41pub use crag::{CRAGError, CRAGResult, CorrectiveRAGAgent};
42pub use deep_research::{Citation, DeepResearchAgent, ResearchError, ResearchReport};
43pub use function_calling::FunctionCallingAgent;
44pub use handoffs::HandoffManager;
45pub use plan_execute::{PlanExecuteAgent, PlanExecuteError};
46pub use react::ReActAgent;
47pub use streaming::StreamingFunctionCallingAgent;
48pub use types::{AgentAction, AgentFinish, AgentOutput, AgentStep, ToolInput};