1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! # adk-agent
//!
//! Agent implementations for ADK (LLM, Custom, Workflow agents).
//!
//! ## Overview
//!
//! This crate provides ready-to-use agent implementations:
//!
//! - [`LlmAgent`] - Core agent powered by LLM reasoning
//! - [`CustomAgent`] - Define custom logic without LLM
//! - [`SequentialAgent`] - Execute agents in sequence
//! - [`ParallelAgent`] - Execute agents concurrently, with optional [`SharedState`](adk_core::SharedState) coordination
//! - [`LoopAgent`] - Iterate until exit condition
//! - [`ConditionalAgent`] - Branch based on conditions
//!
//! ## What's New in 0.6.0
//!
//! - **`ParallelAgent::with_shared_state()`**: Opt-in builder method that creates a fresh
//! [`SharedState`](adk_core::SharedState) per `run()` invocation, enabling sub-agents to
//! exchange data via `set_shared`/`get_shared`/`wait_for_key` through the context chain.
//! - **`AgentToolContext` delegation**: Tools executed by `LlmAgent` now have access to
//! `shared_state()` via the context chain, enabling tool-level coordination in parallel workflows.
//! - **Tool confirmation**: `LlmAgentBuilder::require_tool_confirmation()` and
//! `require_tool_confirmation_for_all()` for human-in-the-loop tool authorization.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use adk_agent::LlmAgentBuilder;
//! use std::sync::Arc;
//!
//! // LLM Agent requires a model (from adk-model)
//! // let agent = LlmAgentBuilder::new("assistant")
//! // .description("Helpful AI assistant")
//! // .model(Arc::new(model))
//! // .build()?;
//! ```
//!
//! ## Workflow Agents
//!
//! Combine agents for complex workflows:
//!
//! ```rust,ignore
//! // Sequential: A -> B -> C
//! let seq = SequentialAgent::new("pipeline", vec![a, b, c]);
//!
//! // Parallel: A, B, C simultaneously
//! let par = ParallelAgent::new("team", vec![a, b, c]);
//!
//! // Loop: repeat until exit
//! let loop_agent = LoopAgent::new("iterator", vec![worker]).with_max_iterations(10);
//! ```
//!
//! ## Guardrails (optional)
//!
//! Enable the `guardrails` feature for input/output validation:
//!
//! ```rust,ignore
//! use adk_agent::{LlmAgentBuilder, guardrails::{GuardrailSet, ContentFilter, PiiRedactor}};
//!
//! let input_guardrails = GuardrailSet::new()
//! .with(ContentFilter::harmful_content())
//! .with(PiiRedactor::new());
//!
//! let agent = LlmAgentBuilder::new("assistant")
//! .input_guardrails(input_guardrails)
//! .build()?;
//! ```
pub use AfterToolCallbackFull;
pub use Agent;
pub use OnToolErrorCallback;
pub use LlmEventSummarizer;
pub use ;
pub use GuardrailSet;
pub use ;
pub use ;
pub use ;