Skip to main content

adk_rs/
lib.rs

1//! `adk-rs` — Rust port of the [Google Agent Development Kit](https://github.com/google/adk-python).
2//!
3//! This crate is a single, feature-gated front door over what was originally a
4//! workspace of 17 sub-crates. See the [README] for a guided tour.
5//!
6//! [README]: https://github.com/skundu42/adk-rs
7
8#![forbid(unsafe_code)]
9#![warn(missing_docs)]
10#![warn(rust_2018_idioms)]
11#![allow(clippy::module_name_repetitions)]
12
13pub mod agents;
14pub mod auth;
15pub mod core;
16pub mod error;
17pub mod genai_types;
18pub mod providers;
19pub mod runner;
20pub mod services;
21pub mod tools;
22pub mod transport_security;
23
24#[cfg(feature = "a2a")]
25pub mod a2a;
26
27#[cfg(feature = "code-exec")]
28pub mod code_exec;
29
30#[cfg(feature = "cli")]
31pub mod cli;
32#[cfg(feature = "eval")]
33pub mod eval;
34#[cfg(feature = "mcp")]
35pub mod mcp;
36#[cfg(feature = "server")]
37pub mod server;
38#[cfg(feature = "telemetry")]
39pub mod telemetry;
40
41// Convenience re-exports for the most common types.
42pub use agents::{BaseAgent, LlmAgent, LoopAgent, ParallelAgent, SequentialAgent};
43pub use error::{Error, Result};
44pub use runner::Runner;
45pub use tools::Tool;
46
47/// Items the `#[tool]` proc-macro emits absolute paths into. Hidden from docs;
48/// not a stable public API.
49#[doc(hidden)]
50#[cfg(feature = "macros")]
51pub mod __private {
52    pub use crate::core::{DynTool, ToolContext};
53    pub use crate::error::{Error, Result, ToolError};
54    pub use crate::genai_types::{FunctionDeclaration, Schema};
55    // Runtime crates the expansion depends on. Re-exported so downstream
56    // crates only need `adk-rs` in their Cargo.toml for `#[tool]` to compile.
57    pub use ::async_trait;
58    pub use ::schemars;
59    pub use ::serde_json;
60}
61
62#[cfg(feature = "macros")]
63pub use adk_rs_macros::tool;