adk_agent/lib.rs
1//! # adk-agent
2//!
3//! Agent implementations for ADK (LLM, Custom, Workflow agents).
4//!
5//! ## Overview
6//!
7//! This crate provides ready-to-use agent implementations:
8//!
9//! - [`LlmAgent`] - Core agent powered by LLM reasoning
10//! - [`CustomAgent`] - Define custom logic without LLM
11//! - [`SequentialAgent`] - Execute agents in sequence
12//! - [`ParallelAgent`] - Execute agents concurrently
13//! - [`LoopAgent`] - Iterate until exit condition
14//! - [`ConditionalAgent`] - Branch based on conditions
15//!
16//! ## Quick Start
17//!
18//! ```rust,no_run
19//! use adk_agent::LlmAgentBuilder;
20//! use std::sync::Arc;
21//!
22//! // LLM Agent requires a model (from adk-model)
23//! // let agent = LlmAgentBuilder::new("assistant")
24//! // .description("Helpful AI assistant")
25//! // .model(Arc::new(model))
26//! // .build()?;
27//! ```
28//!
29//! ## Workflow Agents
30//!
31//! Combine agents for complex workflows:
32//!
33//! ```rust,ignore
34//! // Sequential: A -> B -> C
35//! let seq = SequentialAgent::new("pipeline", vec![a, b, c]);
36//!
37//! // Parallel: A, B, C simultaneously
38//! let par = ParallelAgent::new("team", vec![a, b, c]);
39//!
40//! // Loop: repeat until exit
41//! let loop_agent = LoopAgent::new("iterator", worker, 10);
42//! ```
43
44mod custom_agent;
45mod llm_agent;
46pub mod tool_call_markup;
47mod workflow;
48
49pub use adk_core::Agent;
50pub use custom_agent::{CustomAgent, CustomAgentBuilder};
51pub use llm_agent::{LlmAgent, LlmAgentBuilder};
52pub use tool_call_markup::{normalize_content, normalize_option_content};
53pub use workflow::{ConditionalAgent, LoopAgent, ParallelAgent, SequentialAgent};