adk_rust/lib.rs
1//! # Agent Development Kit (ADK) for Rust
2//!
3//! [](https://crates.io/crates/adk-rust)
4//! [](https://docs.rs/adk-rust)
5//! [](https://github.com/zavora-ai/adk-rust/blob/main/LICENSE)
6//!
7//! A flexible and modular framework for developing and deploying AI agents in Rust.
8//! ADK-Rust is model-agnostic and deployment-agnostic: this umbrella crate re-exports the
9//! ADK-Rust crates behind feature flags grouped into four tiers.
10//!
11//! ## Quick Start
12//!
13//! Create your first AI agent in minutes:
14//!
15//! ```no_run
16//! use adk_rust::prelude::*;
17//! use adk_rust::Launcher;
18//! use std::sync::Arc;
19//!
20//! #[tokio::main]
21//! async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
22//! let api_key = std::env::var("GOOGLE_API_KEY")?;
23//! let model = GeminiModel::new(&api_key, "gemini-3.8-flash")?;
24//!
25//! let agent = LlmAgentBuilder::new("assistant")
26//! .description("A helpful AI assistant")
27//! .instruction("You are a friendly assistant. Answer questions concisely.")
28//! .model(Arc::new(model))
29//! .build()?;
30//!
31//! // Run in interactive console mode
32//! Launcher::new(Arc::new(agent)).run().await?;
33//! Ok(())
34//! }
35//! ```
36//!
37//! ## Installation
38//!
39//! Add to your `Cargo.toml`:
40//!
41//! ```toml
42//! [dependencies]
43//! adk-rust = "3.0.0"
44//! tokio = { version = "1.40", features = ["full"] }
45//! dotenvy = "0.15" # For loading .env files
46//! ```
47//!
48//! ### Feature Presets
49//!
50//! ```toml
51//! # Minimal (default) — agents, Gemini, runner, sessions (fastest build)
52//! adk-rust = "3.0.0"
53//!
54//! # Standard — minimal + OpenAI, Anthropic (and the adk-anthropic client), skills, graph,
55//! # auth, server, eval, guardrail, plugin, artifacts, tools, memory, telemetry, computer-use
56//! adk-rust = { version = "3.0.0", features = ["standard"] }
57//!
58//! # Enterprise — standard + realtime, browser, rag, payments, awp, and autonomy: the
59//! # harness, its kernel, durable and background runs, approvals and signed audit
60//! adk-rust = { version = "3.0.0", features = ["enterprise"] }
61//!
62//! # Full — enterprise + audio, code, sandbox, code-tools, the AWP website, vision, and the
63//! # graph-functional, graph-node-cache, graph-delta, graph-time-travel, and graph-yaml capabilities
64//! adk-rust = { version = "3.0.0", features = ["full"] }
65//!
66//! # Custom — pick exactly what you need
67//! adk-rust = { version = "3.0.0", default-features = false, features = [
68//! "agents", "gemini", "tools", "sessions", "openai", "openrouter"
69//! ] }
70//! ```
71//!
72//! ## Autonomous Agents
73//!
74//! 3.0 builds agents that work on their own inside limits you set: goals that iterate until a
75//! check passes and park on a decision; wake-ups on a schedule, a file change, a webhook or a
76//! queue message; one governed tool path with tool policies, approvals across runs, run
77//! budgets, spend caps, a kill switch and a signed audit log; and durable runs that resume
78//! after a crash.
79//!
80//! | Module | Feature | What it holds |
81//! |--------|---------|---------------|
82//! | `harness` | `harness` (in `enterprise` and `full`) | The governed harness agent: modes, standing approvals, a sandboxed shell, plans and durable goals |
83//! | `kernel` | `harness-kernel` (in `enterprise` and `full`) | The agent kernel `adk-rust up` runs: processes, wake sources, the event bus and the control plane |
84//! | `surface` | `surface` (in no tier) | The surface engine and the web home, over a harness or a kernel |
85//! | `vision` | `vision` (in `full`); `vision-local` adds the on-device backends | Local-first perception: regions in source pixels, verified weights, the egress gate, cloud describers and `sam-3.1`; with `harness`, the vision pack |
86//!
87//! [Build an autonomous agent](https://github.com/zavora-ai/adk-rust/blob/main/docs/official_docs/autonomy/index.md)
88//! takes one agent from a scaffold to running on its own.
89//!
90//! ## Agent Types
91//!
92//! ADK-Rust provides several agent types for different use cases:
93//!
94//! ### LlmAgent - AI-Powered Reasoning
95//!
96//! The core agent type that uses Large Language Models for intelligent
97//! reasoning. `GoogleSearchTool` below requires the `tools` feature (included in
98//! `standard` and above); the agent itself needs only the default tier:
99//!
100//! ```no_run
101//! # #[cfg(feature = "tools")]
102//! # async fn example() -> adk_rust::Result<()> {
103//! use adk_rust::prelude::*;
104//! use std::sync::Arc;
105//!
106//! let api_key = std::env::var("GOOGLE_API_KEY").map_err(|e| AdkError::config(e.to_string()))?;
107//! let model = GeminiModel::new(&api_key, "gemini-3.8-flash")?;
108//!
109//! let agent = LlmAgentBuilder::new("researcher")
110//! .description("Research assistant with web search")
111//! .instruction("Search for information and provide detailed summaries.")
112//! .model(Arc::new(model))
113//! .tool(Arc::new(GoogleSearchTool::new())) // Add tools
114//! .build()?;
115//! # Ok(())
116//! # }
117//! ```
118//!
119//! ### Workflow Agents - Deterministic Pipelines
120//!
121//! For predictable, multi-step workflows:
122//!
123//! ```no_run
124//! use adk_rust::prelude::*;
125//! use std::sync::Arc;
126//!
127//! # async fn example() -> Result<()> {
128//! # let researcher: Arc<dyn Agent> = todo!();
129//! # let writer: Arc<dyn Agent> = todo!();
130//! # let reviewer: Arc<dyn Agent> = todo!();
131//! // Sequential: Execute agents in order
132//! let pipeline = SequentialAgent::new(
133//! "content_pipeline",
134//! vec![researcher, writer, reviewer]
135//! );
136//!
137//! // Parallel: Execute agents concurrently
138//! # let analyst1: Arc<dyn Agent> = todo!();
139//! # let analyst2: Arc<dyn Agent> = todo!();
140//! let parallel = ParallelAgent::new(
141//! "multi_analysis",
142//! vec![analyst1, analyst2]
143//! );
144//!
145//! // Loop: Iterate until condition met
146//! # let refiner: Arc<dyn Agent> = todo!();
147//! let loop_agent = LoopAgent::new("iterative_refiner", vec![refiner])
148//! .with_max_iterations(5);
149//! # Ok(())
150//! # }
151//! ```
152//!
153//! ### Multi-Agent Systems
154//!
155//! Build hierarchical agent systems with automatic delegation:
156//!
157//! ```no_run
158//! use adk_rust::prelude::*;
159//! use std::sync::Arc;
160//!
161//! # async fn example() -> Result<()> {
162//! # let model: Arc<dyn Llm> = todo!();
163//! # let code_agent: Arc<dyn Agent> = todo!();
164//! # let test_agent: Arc<dyn Agent> = todo!();
165//! let coordinator = LlmAgentBuilder::new("coordinator")
166//! .description("Development team coordinator")
167//! .instruction("Delegate coding tasks to specialists.")
168//! .model(model)
169//! .sub_agent(code_agent) // Delegate to sub-agents
170//! .sub_agent(test_agent)
171//! .build()?;
172//! # Ok(())
173//! # }
174//! ```
175//!
176//! ## Tools
177//!
178//! Give your agents capabilities beyond conversation. The tool types below
179//! require the `tools` feature (included in `standard` and above):
180//!
181//! ### Function Tools - Custom Operations
182//!
183//! Convert any async function into a tool:
184//!
185//! ```no_run
186//! # #[cfg(feature = "tools")]
187//! # fn example() -> adk_rust::Result<()> {
188//! use adk_rust::prelude::*;
189//! use adk_rust::serde_json::{json, Value};
190//! use std::sync::Arc;
191//!
192//! async fn get_weather(_ctx: Arc<dyn ToolContext>, args: Value) -> Result<Value> {
193//! let city = args["city"].as_str().unwrap_or("Unknown");
194//! // Your weather API call here
195//! Ok(json!({
196//! "temperature": 72.0,
197//! "conditions": "Sunny",
198//! "city": city
199//! }))
200//! }
201//!
202//! let weather_tool = FunctionTool::new(
203//! "get_weather",
204//! "Get current weather for a city",
205//! get_weather,
206//! );
207//! # Ok(())
208//! # }
209//! ```
210//!
211//! ### Built-in Tools
212//!
213//! Ready-to-use tools included with ADK:
214//!
215//! - `GoogleSearchTool` - Web search via Google
216//! - `ExitLoopTool` - Control loop termination
217//! - `LoadArtifactsTool` - Access stored artifacts
218//!
219//! ### MCP Tools - External Integrations
220//!
221//! Connect to Model Context Protocol servers using the `rmcp` crate:
222//!
223//! ```ignore
224//! use adk_rust::prelude::*;
225//! use adk_rust::tool::McpToolset;
226//! use rmcp::{ServiceExt, transport::TokioChildProcess};
227//! use tokio::process::Command;
228//!
229//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
230//! // Connect to an MCP server (e.g., filesystem, database)
231//! let client = ().serve(TokioChildProcess::new(
232//! Command::new("npx")
233//! .arg("-y")
234//! .arg("@modelcontextprotocol/server-filesystem")
235//! .arg("/path/to/dir")
236//! )?).await?;
237//!
238//! let mcp_tools = McpToolset::new(client);
239//!
240//! // Add all MCP tools to your agent
241//! # let builder: LlmAgentBuilder = todo!();
242//! let agent = builder.toolset(Arc::new(mcp_tools)).build()?;
243//! # Ok(())
244//! # }
245//! ```
246//!
247//! ## Sessions & State
248//!
249//! Manage conversation context and working memory:
250//!
251//! ```no_run
252//! use adk_rust::prelude::*;
253//! use adk_rust::session::{SessionService, CreateRequest};
254//! use adk_rust::serde_json::json;
255//! use std::collections::HashMap;
256//!
257//! # async fn example() -> Result<()> {
258//! let session_service = InMemorySessionService::new();
259//!
260//! // Create a session
261//! let session = session_service.create(CreateRequest {
262//! app_name: "my_app".to_string(),
263//! user_id: "user_123".to_string(),
264//! session_id: None,
265//! state: HashMap::new(),
266//! }).await?;
267//!
268//! // Read state (State trait provides read access)
269//! let state = session.state();
270//! let config = state.get("app:config"); // Returns Option<Value>
271//! # Ok(())
272//! # }
273//! ```
274//!
275//! ## Callbacks
276//!
277//! Intercept and customize agent behavior:
278//!
279//! ```no_run
280//! use adk_rust::prelude::*;
281//! use std::sync::Arc;
282//!
283//! # async fn example() -> Result<()> {
284//! # let model: Arc<dyn Llm> = todo!();
285//! let agent = LlmAgentBuilder::new("monitored_agent")
286//! .model(model)
287//! // Modify or inspect model responses
288//! .after_model_callback(Box::new(|_ctx, response| {
289//! Box::pin(async move {
290//! println!("Model responded");
291//! Ok(Some(response)) // Return modified response or None to keep original
292//! })
293//! }))
294//! // Track tool usage
295//! .before_tool_callback(Box::new(|_ctx| {
296//! Box::pin(async move {
297//! println!("Tool about to be called");
298//! Ok(None) // Continue execution
299//! })
300//! }))
301//! .build()?;
302//! # Ok(())
303//! # }
304//! ```
305//!
306//! ## Artifacts
307//!
308//! Store and retrieve binary data (images, files, etc.). Requires the
309//! `artifacts` feature (included in `standard` and above):
310//!
311//! ```no_run
312//! # #[cfg(feature = "artifacts")]
313//! # async fn example() -> adk_rust::Result<()> {
314//! use adk_rust::prelude::*;
315//! use adk_rust::artifact::{ArtifactService, SaveRequest, LoadRequest};
316//!
317//! let artifact_service = InMemoryArtifactService::new();
318//!
319//! // Save an artifact
320//! let response = artifact_service.save(SaveRequest {
321//! app_name: "my_app".to_string(),
322//! user_id: "user_123".to_string(),
323//! session_id: "session_456".to_string(),
324//! file_name: "sales_chart.png".to_string(),
325//! part: Part::Text { text: "chart data".to_string() },
326//! version: None,
327//! }).await?;
328//!
329//! // Load an artifact
330//! let loaded = artifact_service.load(LoadRequest {
331//! app_name: "my_app".to_string(),
332//! user_id: "user_123".to_string(),
333//! session_id: "session_456".to_string(),
334//! file_name: "sales_chart.png".to_string(),
335//! version: None,
336//! }).await?;
337//! # Ok(())
338//! # }
339//! ```
340//!
341//! ## Deployment Options
342//!
343//! ### Console Mode (Interactive CLI)
344//!
345//! ```no_run
346//! use adk_rust::prelude::*;
347//! use adk_rust::Launcher;
348//! use std::sync::Arc;
349//!
350//! # async fn example() -> Result<()> {
351//! # let agent: Arc<dyn Agent> = todo!();
352//! // Interactive chat in terminal
353//! Launcher::new(agent).run().await?;
354//! # Ok(())
355//! # }
356//! ```
357//!
358//! ### Server Mode (REST API)
359//!
360//! With the `cli` feature, [`Launcher`] is `adk_cli::Launcher`, which also serves the agent
361//! over HTTP on `127.0.0.1`:
362//!
363//! ```bash
364//! cargo run -- serve --port 8080
365//! ```
366//!
367//! The server exposes `GET /api/health`, the session endpoints under `/api/sessions` and
368//! `/api/apps/{app}/users/{user}/sessions`, `POST /api/run/{app}/{user}/{session}` (SSE),
369//! and `POST /api/run_sse`. See `adk-server` for the full list. The web home of `adk-surface`
370//! (feature `surface`) is served by the harness launcher, or mounted on a server you build
371//! (spec 3.3 §5.1).
372//!
373//! ### Agent-to-Agent (A2A) Protocol
374//!
375//! Expose your agent for inter-agent communication. Requires the `server`
376//! feature (included in `standard` and above):
377//!
378//! ```no_run
379//! # #[cfg(feature = "server")]
380//! # async fn example() -> adk_rust::Result<()> {
381//! use adk_rust::server::{create_app_with_a2a, ServerConfig};
382//! use adk_rust::AgentLoader;
383//!
384//! # let agent_loader: std::sync::Arc<dyn AgentLoader> = todo!();
385//! # let session_service: std::sync::Arc<dyn adk_rust::session::SessionService> = todo!();
386//! // Create server with A2A protocol support
387//! let config = ServerConfig::new(agent_loader, session_service);
388//! let app = create_app_with_a2a(config, Some("http://localhost:8080"));
389//!
390//! // Run the server (requires axum dependency)
391//! // let listener = tokio::net::TcpListener::bind("127.0.0.1:8080").await?;
392//! // axum::serve(listener, app).await?;
393//! # Ok(())
394//! # }
395//! ```
396//!
397//! ## Observability
398//!
399//! Built-in OpenTelemetry support for production monitoring. Requires the
400//! `telemetry` feature (included in `standard` and above); OTLP export adds
401//! `telemetry-otlp`:
402//!
403//! ```no_run
404//! # #[cfg(feature = "telemetry")]
405//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
406//! use adk_rust::telemetry::init_telemetry;
407//!
408//! // Basic telemetry with console logging
409//! init_telemetry("my-agent-service")?;
410//!
411//! // With `features = ["telemetry-otlp"]`, export spans to a collector instead:
412//! // adk_rust::telemetry::init_with_otlp("my-agent-service", "http://localhost:4317")?;
413//!
414//! // All agent operations now emit traces and metrics
415//! # Ok(())
416//! # }
417//! ```
418//!
419//! ## Architecture
420//!
421//! ADK-Rust uses a layered architecture for modularity:
422//!
423//! ```text
424//! ┌─────────────────────────────────────────────────────────────┐
425//! │ Application Layer │
426//! │ Launcher • REST Server • A2A │
427//! ├─────────────────────────────────────────────────────────────┤
428//! │ Runner Layer │
429//! │ Agent Execution • Event Streaming │
430//! ├─────────────────────────────────────────────────────────────┤
431//! │ Agent Layer │
432//! │ LlmAgent • CustomAgent • Sequential • Parallel • Loop │
433//! ├─────────────────────────────────────────────────────────────┤
434//! │ Service Layer │
435//! │ Models • Tools • Sessions • Artifacts • Memory │
436//! └─────────────────────────────────────────────────────────────┘
437//! ```
438//!
439//! ## Feature Flags
440//!
441//! | Feature | Description | Preset |
442//! |---------|-------------|--------|
443//! | `agents` | Agent implementations | minimal (default) |
444//! | `models` | Model integrations | minimal (default) |
445//! | `gemini` | Gemini model support | minimal (default) |
446//! | `runner` | Execution runtime | minimal (default) |
447//! | `sessions` | Session management | minimal (default) |
448//! | `openai` | OpenAI model support | standard |
449//! | `anthropic` / `anthropic-client` | Anthropic model support / the `adk-anthropic` client | standard |
450//! | `tools` | Tool system | standard |
451//! | `skills` | Skill discovery | standard |
452//! | `artifacts` | Artifact storage | standard |
453//! | `memory` | Semantic memory | standard |
454//! | `telemetry` | OpenTelemetry | standard |
455//! | `guardrail` | Input/output validation | standard |
456//! | `auth` | Access control | standard |
457//! | `plugin` | Plugin system | standard |
458//! | `server` | HTTP server + A2A | standard |
459//! | `graph` | Graph workflows | standard |
460//! | `eval` | Agent evaluation | standard |
461//! | `computer-use` | Governed desktop-automation orchestration | standard |
462//! | `realtime` | Voice/audio streaming | enterprise |
463//! | `browser` | Browser automation | enterprise |
464//! | `rag` | RAG pipeline | enterprise |
465//! | `payments` | Agentic commerce (ACP/AP2) | enterprise |
466//! | `awp` | Agentic Web Protocol | enterprise |
467//! | `autonomy` | An agent that runs unattended: the harness and its kernel, durable and background runs, cron and webhook wake-ups, the approvals service, SQLite stores, signed audit | enterprise |
468//! | `code`, `sandbox`, `code-tools` | Code execution and sandboxed execution | full |
469//! | `audio` | Audio processing | full |
470//! | `graph-functional`, `graph-node-cache`, `graph-delta`, `graph-time-travel`, `graph-yaml` | Graph capabilities | full |
471//! | `harness` | The governed, durable harness agent (`adk-harness`) | enterprise |
472//! | `harness-kernel` | The agent kernel, the harness's always-on form (`adk-kernel`) | enterprise |
473//! | `website` | The AWP website product (`adk-website`, `adk-site`) | full |
474//! | `vision` | Local-first perception (`adk-vision`): regions, manifests, the egress gate, cloud describers, `sam-3.1`, the image privacy guardrail | full |
475//! | `vision-local` | `vision` + the on-device backends: RF-DETR, EfficientSAM, SAM 2.1, SigLIP 2, PP-OCRv6, PaddleOCR-VL-1.6 | opt-in |
476//! | `surface` | Agent surfaces: the engine and the web home (`adk-surface`) | opt-in |
477//! | `harness-browser`, `harness-computer-use`, `harness-payments`, `harness-voice`, `harness-managed` | Harness packs | opt-in |
478//! | `cli` | CLI launcher with serve mode | opt-in |
479//! | `managed-runtime` | Managed agent runtime (`adk-managed`) | opt-in |
480//! | `enterprise-client` | Enterprise client SDK (`adk-enterprise`) | opt-in |
481//! | `gemini-agent-platform` | Every Gemini Enterprise Agent Platform integration except realtime transports and host-side deploy tooling | opt-in |
482//! | `gemini-agent-platform-full` | `gemini-agent-platform` + Vertex AI Live API (realtime stack) | opt-in |
483//! | `gcp-deploy` | Agent Engine deployment client (host-side; not part of `gemini-agent-platform`) | opt-in |
484//!
485//! Production backends (`postgres-session`, `redis-memory`, ...), additional providers,
486//! and specialist integrations are opt-in features as well; `Cargo.toml` lists every one.
487//!
488//! ## Examples
489//!
490//! The [adk-playground](https://github.com/zavora-ai/adk-playground) repository holds the
491//! teaching examples. This repository's
492//! [examples directory](https://github.com/zavora-ai/adk-rust/tree/main/examples) holds the
493//! standalone scenario and release-validation crates that CI runs.
494//!
495//! ## Related Crates
496//!
497//! ADK-Rust is composed of modular crates that can be used independently:
498//!
499//! - [`adk-core`](https://docs.rs/adk-core) - Core traits and types
500//! - [`adk-agent`](https://docs.rs/adk-agent) - Agent implementations
501//! - [`adk-model`](https://docs.rs/adk-model) - LLM integrations
502//! - [`adk-tool`](https://docs.rs/adk-tool) - Tool system
503//! - [`adk-session`](https://docs.rs/adk-session) - Session management
504//! - [`adk-artifact`](https://docs.rs/adk-artifact) - Artifact storage
505//! - [`adk-runner`](https://docs.rs/adk-runner) - Execution runtime
506//! - [`adk-server`](https://docs.rs/adk-server) - HTTP server
507//! - [`adk-telemetry`](https://docs.rs/adk-telemetry) - Observability
508
509#![warn(missing_docs)]
510#![cfg_attr(docsrs, feature(doc_cfg))]
511
512// ============================================================================
513// Core (always available)
514// ============================================================================
515
516/// Core traits and types.
517///
518/// Always available regardless of feature flags. Includes:
519/// - [`Agent`] - The fundamental trait for all agents
520/// - [`Tool`] / [`Toolset`] - For extending agents with capabilities
521/// - [`Session`] / [`State`] - For managing conversation context
522/// - [`Event`] - For streaming agent responses
523/// - [`AdkError`] / [`Result`] - Unified error handling
524pub use adk_core::*;
525
526// Re-export common dependencies for convenience
527pub use anyhow;
528pub use async_trait::async_trait;
529pub use futures;
530pub use serde;
531pub use serde_json;
532pub use tokio;
533
534// ============================================================================
535// Component Modules (feature-gated)
536// ============================================================================
537
538/// Agent implementations (LLM, Custom, Workflow agents).
539///
540/// Provides the core agent types:
541/// - [`LlmAgent`](agent::LlmAgent) - AI-powered agent using LLMs
542/// - [`CustomAgent`](agent::CustomAgent) - Implement custom agent logic
543/// - [`SequentialAgent`](agent::SequentialAgent) - Execute agents in sequence
544/// - [`ParallelAgent`](agent::ParallelAgent) - Execute agents concurrently
545/// - [`LoopAgent`](agent::LoopAgent) - Iterative execution until condition met
546///
547/// Available with feature: `agents`
548#[cfg(feature = "agents")]
549#[cfg_attr(docsrs, doc(cfg(feature = "agents")))]
550pub mod agent {
551 pub use adk_agent::*;
552}
553
554/// Model integrations (Gemini, etc.).
555///
556/// Provides LLM implementations:
557/// - [`GeminiModel`](model::GeminiModel) - Google's Gemini models
558///
559/// ADK is model-agnostic - implement the [`Llm`] trait for other providers.
560///
561/// Available with feature: `models`
562#[cfg(feature = "models")]
563#[cfg_attr(docsrs, doc(cfg(feature = "models")))]
564pub mod model {
565 pub use adk_model::*;
566}
567
568/// Tool system and built-in tools.
569///
570/// Give agents capabilities beyond conversation:
571/// - `FunctionTool` - Wrap async functions as tools
572/// - `GoogleSearchTool` - Web search
573/// - `ExitLoopTool` - Control loop agents
574/// - `McpToolset` - MCP server integration with the `mcp` feature
575/// - `CodeTool` / `PythonCodeTool` / `JavaScriptCodeTool` / `MontyPythonCodeTool` -
576/// Code execution with the `code-tools` feature (included in `full`); the
577/// embedded live paths need `code-embedded-js` / `code-embedded-python`
578///
579/// Available with feature: `tools`
580#[cfg(feature = "tools")]
581#[cfg_attr(docsrs, doc(cfg(feature = "tools")))]
582pub mod tool {
583 pub use adk_tool::*;
584}
585
586/// AgentSkills parsing, indexing, and runtime injection helpers.
587///
588/// Provides:
589/// - Skill file discovery from `.skills/`
590/// - Frontmatter validation (`name`, `description`)
591/// - Lexical skill selection
592/// - Runner plugin helper for skill injection
593///
594/// Available with feature: `skills`
595#[cfg(feature = "skills")]
596#[cfg_attr(docsrs, doc(cfg(feature = "skills")))]
597pub mod skill {
598 pub use adk_skill::*;
599}
600
601/// Session management.
602///
603/// Manage conversation context and state:
604/// - [`InMemorySessionService`](session::InMemorySessionService) - In-memory sessions
605/// - Session creation, retrieval, and lifecycle
606/// - State management with scoped prefixes
607///
608/// Available with feature: `sessions`
609#[cfg(feature = "sessions")]
610#[cfg_attr(docsrs, doc(cfg(feature = "sessions")))]
611pub mod session {
612 pub use adk_session::*;
613}
614
615/// Artifact storage.
616///
617/// Store and retrieve binary data:
618/// - [`InMemoryArtifactService`](artifact::InMemoryArtifactService) - In-memory storage
619/// - Version tracking for artifacts
620/// - Namespace scoping
621///
622/// Available with feature: `artifacts`
623#[cfg(feature = "artifacts")]
624#[cfg_attr(docsrs, doc(cfg(feature = "artifacts")))]
625pub mod artifact {
626 pub use adk_artifact::*;
627}
628
629/// Memory system with semantic search.
630///
631/// Long-term memory for agents:
632/// - [`InMemoryMemoryService`](memory::InMemoryMemoryService) - In-memory storage
633/// - Semantic search capabilities
634/// - Memory retrieval and updates
635///
636/// Available with feature: `memory`
637#[cfg(feature = "memory")]
638#[cfg_attr(docsrs, doc(cfg(feature = "memory")))]
639pub mod memory {
640 pub use adk_memory::*;
641}
642
643/// Agent execution runtime.
644///
645/// The engine that manages agent execution:
646/// - [`Runner`](runner::Runner) - Executes agents with full context
647/// - [`RunnerConfig`](runner::RunnerConfig) - Configuration options
648/// - Event streaming and tool coordination
649///
650/// Available with feature: `runner`
651#[cfg(feature = "runner")]
652#[cfg_attr(docsrs, doc(cfg(feature = "runner")))]
653pub mod runner {
654 pub use adk_runner::*;
655}
656
657/// HTTP server (REST + A2A).
658///
659/// Deploy agents as web services:
660/// - REST API for chat interactions
661/// - A2A (Agent-to-Agent) protocol support
662/// - Routes of your own beside them, such as the web home of `adk-surface`
663///
664/// Available with feature: `server`
665#[cfg(feature = "server")]
666#[cfg_attr(docsrs, doc(cfg(feature = "server")))]
667pub mod server {
668 pub use adk_server::*;
669}
670
671/// Telemetry (OpenTelemetry integration).
672///
673/// Production observability:
674/// - Distributed tracing
675/// - Metrics collection
676/// - Log correlation
677///
678/// Available with feature: `telemetry`
679#[cfg(feature = "telemetry")]
680#[cfg_attr(docsrs, doc(cfg(feature = "telemetry")))]
681pub mod telemetry {
682 pub use adk_telemetry::*;
683}
684
685/// Deployment tooling (Agent Engine BYOC deployment client).
686///
687/// Host-side utilities for deploying agents:
688/// - `deploy::gcp` — create, poll, get, and delete ReasoningEngines
689///
690/// Available with feature: `gcp-deploy`
691#[cfg(feature = "gcp-deploy")]
692#[cfg_attr(docsrs, doc(cfg(feature = "gcp-deploy")))]
693pub mod deploy {
694 pub use adk_deploy::*;
695}
696
697/// Graph-based workflow engine (LangGraph-inspired).
698///
699/// Build complex agent workflows with:
700/// - [`StateGraph`](graph::StateGraph) - Graph builder with nodes and edges
701/// - [`GraphAgent`](graph::GraphAgent) - ADK Agent integration
702/// - [`Checkpointer`](graph::Checkpointer) - Persistent state for human-in-the-loop
703/// - [`Router`](graph::Router) - Conditional edge routing helpers
704/// - Cycle support with recursion limits
705/// - Streaming execution modes
706///
707/// Available with feature: `graph`
708#[cfg(feature = "graph")]
709#[cfg_attr(docsrs, doc(cfg(feature = "graph")))]
710pub mod graph {
711 pub use adk_graph::*;
712}
713
714/// Graph, auth, and v8 wire contracts for safe computer-use orchestration.
715///
716/// Available with feature: `computer-use` (included in `standard`).
717#[cfg(feature = "computer-use")]
718#[cfg_attr(docsrs, doc(cfg(feature = "computer-use")))]
719pub mod computer_use {
720 pub use adk_computer_use::*;
721}
722
723/// Agent Client Protocol: external ACP agents as tools, and ADK agents as ACP agents.
724///
725/// - [`AcpAgentTool`](acp::AcpAgentTool) - An external ACP agent (Claude Code, Codex,
726/// Kiro CLI) as a tool
727/// - [`AcpSession`](acp::AcpSession) - A persistent session with an external ACP agent
728/// - [`AcpConnection`](acp::AcpConnection) - One external ACP agent shared by several
729/// sessions, with listing, loading, forking, archiving and authentication
730/// - [`agent_client_protocol`](acp::agent_client_protocol) - The official ACP SDK
731///
732/// Exposing an ADK agent over ACP needs `adk-acp`'s `server` feature.
733///
734/// Available with feature: `acp`
735///
736/// # Example
737///
738/// ```rust
739/// use adk_rust::acp::AcpAgentTool;
740///
741/// let reviewer = AcpAgentTool::new("claude-code --acp")
742/// .name("code_reviewer")
743/// .description("Reviews a change and reports problems");
744/// ```
745#[cfg(feature = "acp")]
746#[cfg_attr(docsrs, doc(cfg(feature = "acp")))]
747pub mod acp {
748 pub use adk_acp::*;
749}
750
751/// Agentic Web Protocol: discovery, capability manifests, trust, consent, and events for
752/// agent-facing websites.
753///
754/// Available with feature: `awp`
755#[cfg(feature = "awp")]
756#[cfg_attr(docsrs, doc(cfg(feature = "awp")))]
757pub mod awp {
758 pub use adk_awp::*;
759}
760
761/// Code execution substrate (experimental — `full` preset).
762///
763/// First-class code execution for agents and generated projects:
764/// - [`CodeExecutor`](code::CodeExecutor) - Backend trait for execution
765/// - [`ExecutionRequest`](code::ExecutionRequest) - Typed execution request
766/// - [`ExecutionResult`](code::ExecutionResult) - Structured execution result
767/// - [`SandboxPolicy`](code::SandboxPolicy) - Sandbox capability model
768/// - [`Workspace`](code::Workspace) - Collaborative project context
769///
770/// Available with feature: `code`
771#[cfg(feature = "code")]
772#[cfg_attr(docsrs, doc(cfg(feature = "code")))]
773pub mod code {
774 pub use adk_code::*;
775}
776
777/// Python `CodeRuntime` for the CodeActAgent, backed by the Monty interpreter
778/// (experimental).
779///
780/// Lets a [`CodeActAgent`](agent::codeact::CodeActAgent) act by writing Python:
781/// - [`MontyRuntime`](codeact_monty::MontyRuntime) - The `CodeRuntime` implementation
782/// - [`OsAccess`](codeact_monty::OsAccess) - Host-granted filesystem/environment/clock policy
783/// - [`PathAccess`](codeact_monty::PathAccess) - Read-only / read-write mount modes
784///
785/// Available with feature: `codeact-monty` (implies `codeact`)
786#[cfg(feature = "codeact-monty")]
787#[cfg_attr(docsrs, doc(cfg(feature = "codeact-monty")))]
788pub mod codeact_monty {
789 pub use adk_codeact_monty::*;
790}
791
792/// Isolated code execution runtime (experimental — `full` preset).
793///
794/// Provides the [`SandboxBackend`](sandbox::SandboxBackend) trait and built-in backends:
795/// - [`ProcessBackend`](sandbox::ProcessBackend) - Subprocess execution with timeout and env isolation
796/// - `WasmBackend` - In-process WASM execution via wasmtime (requires `wasm` feature)
797/// - [`SandboxTool`](sandbox::SandboxTool) - Tool trait implementation for agent integration
798///
799/// Available with feature: `sandbox`
800#[cfg(feature = "sandbox")]
801#[cfg_attr(docsrs, doc(cfg(feature = "sandbox")))]
802pub mod sandbox {
803 pub use adk_sandbox::*;
804}
805
806/// Lightweight console launcher — always available with the `runner` feature.
807///
808/// When the `cli` feature is enabled, this is replaced by the full-featured
809/// `adk_cli::Launcher` with `--serve` mode, readline history, and thinking
810/// block rendering.
811#[cfg(all(feature = "runner", not(feature = "cli")))]
812#[cfg_attr(docsrs, doc(cfg(feature = "runner")))]
813pub use adk_runner::Launcher;
814
815/// Full-featured CLI launcher with console and serve modes.
816///
817/// Requires the `cli` feature, which no tier includes; add it to any preset.
818/// Provides `--serve` mode, `rustyline` history, and `clap` CLI parsing.
819#[cfg(feature = "cli")]
820#[cfg_attr(docsrs, doc(cfg(feature = "cli")))]
821pub use adk_cli::Launcher;
822
823/// Real-time bidirectional streaming (voice, video).
824///
825/// Provides real-time audio/video streaming for voice-enabled agents:
826/// - [`RealtimeAgent`](realtime::RealtimeAgent) - Agent with voice capabilities
827/// - [`RealtimeRunner`](realtime::RealtimeRunner) - Session management and tool execution
828/// - Multiple providers: OpenAI Realtime, Gemini Live
829///
830/// Available with feature: `realtime`
831#[cfg(feature = "realtime")]
832#[cfg_attr(docsrs, doc(cfg(feature = "realtime")))]
833pub mod realtime {
834 pub use adk_realtime::*;
835}
836
837/// Browser automation (WebDriver).
838///
839/// Provides browser automation tools for agents:
840/// - [`BrowserSession`](browser::BrowserSession) - WebDriver session management
841/// - [`BrowserToolset`](browser::BrowserToolset) - Browser tools for agents
842///
843/// Available with feature: `browser`
844#[cfg(feature = "browser")]
845#[cfg_attr(docsrs, doc(cfg(feature = "browser")))]
846pub mod browser {
847 pub use adk_browser::*;
848}
849
850/// Agent evaluation framework.
851///
852/// Test and validate agent behavior:
853/// - [`Evaluator`](eval::Evaluator) - Run evaluation suites
854/// - [`EvaluationConfig`](eval::EvaluationConfig) - Configure evaluation parameters
855///
856/// Available with feature: `eval`
857#[cfg(feature = "eval")]
858#[cfg_attr(docsrs, doc(cfg(feature = "eval")))]
859pub mod eval {
860 pub use adk_eval::*;
861}
862
863/// Guardrails for safety and policy enforcement.
864///
865/// Validate agent inputs and outputs:
866/// - [`GuardrailSet`](guardrail::GuardrailSet) - Collection of guardrails
867/// - [`ContentFilter`](guardrail::ContentFilter) - Content safety filtering
868///
869/// Available with feature: `guardrail`
870#[cfg(feature = "guardrail")]
871#[cfg_attr(docsrs, doc(cfg(feature = "guardrail")))]
872pub mod guardrail {
873 pub use adk_guardrail::*;
874}
875
876/// Authentication and access control.
877///
878/// Manage agent permissions and identity:
879/// - [`Permission`](auth::Permission) - Permission definitions
880/// - [`AccessControl`](auth::AccessControl) - Access control enforcement
881///
882/// Available with feature: `auth`
883#[cfg(feature = "auth")]
884#[cfg_attr(docsrs, doc(cfg(feature = "auth")))]
885pub mod auth {
886 pub use adk_auth::*;
887}
888
889/// Agentic commerce and payment orchestration.
890///
891/// Provides protocol-neutral payment primitives and adapters for:
892/// - ACP stable `2026-01-30`
893/// - ACP experimental surfaces behind `acp-experimental`
894/// - AP2 `v0.1-alpha` as of `2026-03-22`
895///
896/// Available with feature: `payments`
897#[cfg(feature = "payments")]
898#[cfg_attr(docsrs, doc(cfg(feature = "payments")))]
899pub mod payment {
900 pub use adk_payments::*;
901}
902
903/// Plugin system for extending agent behavior.
904///
905/// Extensible callback architecture for agent lifecycle hooks:
906/// - Plugin registration and discovery
907/// - Before/after hooks for agent operations
908///
909/// Available with feature: `plugin`
910#[cfg(feature = "plugin")]
911#[cfg_attr(docsrs, doc(cfg(feature = "plugin")))]
912pub mod plugin {
913 pub use adk_plugin::*;
914}
915
916/// Audio processing pipeline (experimental — `full` preset).
917///
918/// Provides audio capabilities for agents:
919/// - [`TtsProvider`](audio::TtsProvider) - Text-to-speech synthesis
920/// - [`SttProvider`](audio::SttProvider) - Speech-to-text transcription
921/// - [`AudioProcessor`](audio::AudioProcessor) - Audio effects processing
922/// - `AudioPipeline` - Composable audio pipelines
923/// - Cloud providers: ElevenLabs, OpenAI, Gemini, Cartesia, Deepgram, AssemblyAI
924/// - Local inference: MLX (Apple Silicon), ONNX Runtime
925///
926/// Available with feature: `audio`
927#[cfg(feature = "audio")]
928#[cfg_attr(docsrs, doc(cfg(feature = "audio")))]
929pub mod audio {
930 pub use adk_audio::*;
931}
932
933/// Retrieval-Augmented Generation (RAG) pipeline.
934///
935/// Modular RAG system with trait-based components:
936/// - [`RagPipeline`](rag::RagPipeline) - Orchestrates ingest and query workflows
937/// - [`RagTool`](rag::RagTool) - Agentic retrieval via `Tool` trait
938/// - [`InMemoryVectorStore`](rag::InMemoryVectorStore) - Zero-dependency vector store
939/// - Chunking strategies: fixed-size, recursive, markdown-aware
940/// - Feature-gated backends: Gemini, OpenAI, Qdrant, LanceDB, pgvector
941///
942/// Available with feature: `rag`
943#[cfg(feature = "rag")]
944#[cfg_attr(docsrs, doc(cfg(feature = "rag")))]
945pub mod rag {
946 pub use adk_rag::*;
947}
948
949/// Shared action node types for graph workflows.
950///
951/// Provides the type definitions for all 14 action node types:
952/// - Trigger nodes (manual, webhook, schedule, event)
953/// - Data nodes (HTTP, Set, Transform)
954/// - Control flow nodes (Switch, Loop, Merge, Wait)
955/// - Compute nodes (Code)
956/// - Infrastructure nodes (Database)
957/// - Communication nodes (Email, Notification, RSS, File)
958///
959/// Available with feature: `action`
960#[cfg(feature = "action")]
961#[cfg_attr(docsrs, doc(cfg(feature = "action")))]
962pub use adk_action;
963
964/// Anthropic API client types and HTTP client.
965///
966/// Direct access to the `adk-anthropic` crate for low-level Anthropic API usage:
967/// - [`Anthropic`](anthropic_client::Anthropic) - HTTP client struct
968/// - Wire types: `MessageCreateParams`, `Message`, `ContentBlock`, etc.
969/// - Streaming: `MessageStreamEvent`, `ContentBlockDelta`
970/// - Error handling: `Error` enum with typed variants
971///
972/// For high-level agent usage, prefer `adk-model`'s `AnthropicClient` instead.
973///
974/// Available with feature: `anthropic-client`
975#[cfg(feature = "anthropic-client")]
976#[cfg_attr(docsrs, doc(cfg(feature = "anthropic-client")))]
977pub mod anthropic_client {
978 pub use adk_anthropic::*;
979}
980
981/// Local inference in process through mistral.rs, with no separate model server.
982///
983/// Everything `adk-mistralrs` exports:
984/// - [`MistralRsModel`](mistralrs::MistralRsModel) - Text models implementing [`Llm`], with
985/// tool calling for an `LlmAgent`, streamed or not
986/// - [`MistralRsConfig`](mistralrs::MistralRsConfig), [`ModelSource`](mistralrs::ModelSource),
987/// [`QuantizationLevel`](mistralrs::QuantizationLevel) - Loading from safetensors or GGUF,
988/// in-situ quantization, and [`DeviceConfig`](mistralrs::DeviceConfig) layer ranges across GPUs
989/// - [`MistralRsAdapterModel`](mistralrs::MistralRsAdapterModel) - LoRA and X-LoRA adapters
990/// - [`MistralRsVisionModel`](mistralrs::MistralRsVisionModel),
991/// [`MistralRsEmbeddingModel`](mistralrs::MistralRsEmbeddingModel),
992/// [`MistralRsSpeechModel`](mistralrs::MistralRsSpeechModel),
993/// [`MistralRsDiffusionModel`](mistralrs::MistralRsDiffusionModel) - Other modalities
994/// - [`MistralRsMultiModel`](mistralrs::MistralRsMultiModel) - Several models served by name
995///
996/// GPU support comes from `adk-mistralrs`'s own `cuda` and `metal` features, and
997/// `McpClientConfig::connect`, which connects MCP servers as governed toolsets, from its `mcp`
998/// feature.
999///
1000/// Available with feature: `mistralrs`
1001///
1002/// # Example
1003///
1004/// ```rust,no_run
1005/// use adk_rust::mistralrs::{MistralRsConfig, MistralRsModel, ModelSource, QuantizationLevel};
1006///
1007/// # #[tokio::main]
1008/// # async fn main() -> adk_rust::mistralrs::Result<()> {
1009/// let config = MistralRsConfig::builder()
1010/// .model_source(ModelSource::huggingface("Qwen/Qwen3-4B"))
1011/// .isq(QuantizationLevel::Q4K)
1012/// .build();
1013/// let model = MistralRsModel::new(config).await?;
1014/// # let _ = model;
1015/// # Ok(())
1016/// # }
1017/// ```
1018#[cfg(feature = "mistralrs")]
1019#[cfg_attr(docsrs, doc(cfg(feature = "mistralrs")))]
1020pub mod mistralrs {
1021 pub use adk_mistralrs::*;
1022}
1023
1024// ============================================================================
1025// v0.7.0 Competitive Parity Feature Re-exports (opt-in only)
1026// ============================================================================
1027
1028// --- adk-server features ---
1029
1030/// YAML agent configuration loader and hot reload watcher.
1031///
1032/// Declaratively define agents in YAML files with hot reload support:
1033/// - [`YamlAgentDefinition`](server::yaml_agent::YamlAgentDefinition) - YAML schema types
1034/// - [`AgentConfigLoader`](server::yaml_agent::AgentConfigLoader) - Load and validate YAML agent files
1035/// - [`HotReloadWatcher`](server::yaml_agent::HotReloadWatcher) - Watch for file changes and reload agents
1036///
1037/// Available with feature: `yaml-agent`
1038#[cfg(feature = "yaml-agent")]
1039#[cfg_attr(docsrs, doc(cfg(feature = "yaml-agent")))]
1040pub mod yaml_agent {
1041 pub use adk_server::yaml_agent::*;
1042}
1043
1044/// Agent Registry REST API for agent discovery and management.
1045///
1046/// Register, discover, and manage agents through a REST API:
1047/// - [`AgentCard`](server::registry::AgentCard) - Agent metadata
1048/// - [`AgentRegistryStore`](server::registry::AgentRegistryStore) - Storage backend trait
1049/// - [`InMemoryAgentRegistryStore`](server::registry::InMemoryAgentRegistryStore) - In-memory storage
1050/// - [`registry_router`](server::registry::registry_router) - Axum router for registry endpoints
1051///
1052/// Available with feature: `server`
1053#[cfg(feature = "server")]
1054#[cfg_attr(docsrs, doc(cfg(feature = "server")))]
1055pub mod registry {
1056 pub use adk_server::registry::*;
1057}
1058
1059// --- adk-tool features ---
1060
1061/// MCP sampling callback support.
1062///
1063/// Handle `sampling/createMessage` requests from MCP servers:
1064/// - [`SamplingHandler`](tool::sampling::SamplingHandler) - Trait for handling sampling requests
1065/// - [`LlmSamplingHandler`](tool::sampling::LlmSamplingHandler) - Default handler routing to agent's LLM
1066/// - [`SamplingRequest`](tool::sampling::SamplingRequest) / [`SamplingResponse`](tool::sampling::SamplingResponse) - Wire types
1067///
1068/// Available with feature: `mcp-sampling`
1069#[cfg(feature = "mcp-sampling")]
1070#[cfg_attr(docsrs, doc(cfg(feature = "mcp-sampling")))]
1071pub mod sampling {
1072 pub use adk_tool::sampling::*;
1073}
1074
1075/// Native Slack toolset for agent-driven Slack interactions.
1076///
1077/// Built-in Slack tools for agents:
1078/// - [`SlackToolset`](tool::slack::SlackToolset) - Toolset implementing `adk_core::Toolset`
1079/// - Tools: `slack_send_message`, `slack_read_channel`, `slack_add_reaction`, `slack_list_threads`
1080///
1081/// Available with feature: `slack`
1082#[cfg(feature = "slack")]
1083#[cfg_attr(docsrs, doc(cfg(feature = "slack")))]
1084pub mod slack {
1085 pub use adk_tool::slack::*;
1086}
1087
1088/// Native BigQuery toolset for data-analysis agents.
1089///
1090/// Built-in BigQuery tools for agents:
1091/// - [`BigQueryToolset`](tool::bigquery::BigQueryToolset) - Toolset implementing `adk_core::Toolset`
1092/// - Tools: `bigquery_execute_sql`, `bigquery_get_table_schema`, `bigquery_list_datasets`, `bigquery_list_tables`
1093///
1094/// Available with feature: `bigquery`
1095#[cfg(feature = "bigquery")]
1096#[cfg_attr(docsrs, doc(cfg(feature = "bigquery")))]
1097pub mod bigquery {
1098 pub use adk_tool::bigquery::*;
1099}
1100
1101/// Native Spanner toolset for Cloud Spanner interactions.
1102///
1103/// Built-in Spanner tools for agents:
1104/// - [`SpannerToolset`](tool::spanner::SpannerToolset) - Toolset implementing `adk_core::Toolset`
1105/// - Tools: `spanner_execute_sql`, `spanner_get_table_schema`, `spanner_list_tables`
1106///
1107/// Available with feature: `spanner`
1108#[cfg(feature = "spanner")]
1109#[cfg_attr(docsrs, doc(cfg(feature = "spanner")))]
1110pub mod spanner {
1111 pub use adk_tool::spanner::*;
1112}
1113
1114// --- adk-eval features ---
1115
1116/// User personas for evaluation.
1117///
1118/// Define simulated user personas for realistic multi-turn test conversations:
1119/// - [`PersonaProfile`](eval::personas::PersonaProfile) - Persona definition
1120/// - [`UserSimulator`](eval::personas::UserSimulator) - Generate persona-driven messages
1121/// - [`PersonaRegistry`](eval::personas::PersonaRegistry) - Load personas from directory
1122///
1123/// Available with feature: `eval`
1124#[cfg(feature = "eval")]
1125#[cfg_attr(docsrs, doc(cfg(feature = "eval")))]
1126pub mod personas {
1127 pub use adk_eval::personas::*;
1128}
1129
1130// --- adk-realtime features ---
1131
1132/// Video avatar configuration for realtime sessions.
1133///
1134/// Attach a video avatar to realtime voice agents:
1135/// - [`AvatarConfig`](realtime::avatar::AvatarConfig) - Avatar source, lip-sync, and rendering settings
1136/// - [`LipSyncConfig`](realtime::avatar::LipSyncConfig) - Lip-sync configuration
1137/// - [`RenderingConfig`](realtime::avatar::RenderingConfig) - Rendering parameters
1138///
1139/// Available with feature: `video-avatar`
1140#[cfg(feature = "video-avatar")]
1141#[cfg_attr(docsrs, doc(cfg(feature = "video-avatar")))]
1142pub mod avatar {
1143 pub use adk_realtime::avatar::*;
1144}
1145
1146// ============================================================================
1147// Managed Agent Runtime (feature-gated, experimental)
1148// ============================================================================
1149
1150/// Managed agent runtime — durable, resumable, provider-neutral agent execution.
1151///
1152/// Provides the `ManagedAgentRuntime` trait and `DefaultManagedAgentRuntime`:
1153/// - [`ManagedAgentRuntime`](managed::ManagedAgentRuntime) - Central lifecycle trait
1154/// - [`DefaultManagedAgentRuntime`](managed::DefaultManagedAgentRuntime) - Default implementation
1155/// - [`ManagedAgentDef`](managed::types::ManagedAgentDef) - Declarative agent definition
1156/// - [`SessionEvent`](managed::types::SessionEvent) - Provider-neutral event stream
1157/// - [`UserEvent`](managed::types::UserEvent) - Client-to-agent events
1158/// - [`ModelResolver`](managed::ModelResolver) - ModelRef → Arc<dyn Llm> resolution
1159/// - [`ScriptedLlm`](managed::ScriptedLlm) - Deterministic testing double
1160///
1161/// STABILITY: Experimental, additive, feature-gated. No breaking changes to
1162/// existing `Runner`/`LlmAgent` APIs when this feature is disabled.
1163///
1164/// Available with feature: `managed-runtime`
1165#[cfg(feature = "managed-runtime")]
1166#[cfg_attr(docsrs, doc(cfg(feature = "managed-runtime")))]
1167pub mod managed {
1168 pub use adk_managed::*;
1169}
1170
1171/// The governed, durable harness agent (spec 3.1 §8.4).
1172///
1173/// Everything `adk-harness` exports: [`HarnessAgent`](harness::HarnessAgent) and its
1174/// builder, the modes, standing approvals, the shell, todos, instructions, skills, team
1175/// members, plan graphs and goals. With the `cli` feature it also re-exports the CLI's
1176/// `HarnessLauncher`, which runs a harness at the console or behind the server,
1177/// `ConsolePrompter`, which asks for approvals at the terminal, and the `ConsoleIo` it
1178/// reads from.
1179///
1180/// Available with feature: `harness` (included in `enterprise` and `full`)
1181///
1182/// # Example
1183///
1184/// ```rust
1185/// use adk_rust::harness::{HarnessAgent, HarnessMode, InstructionsConfig, Workspace};
1186/// use adk_rust::model::{ScriptedLlm, ScriptedResponse};
1187/// use std::sync::Arc;
1188///
1189/// # fn main() -> adk_rust::Result<()> {
1190/// let model = Arc::new(ScriptedLlm::new("scripted", vec![ScriptedResponse::text("done")]));
1191/// let harness = HarnessAgent::builder("harness")
1192/// .model(model)
1193/// .workspace(Workspace::new(std::env::temp_dir()))
1194/// .project_instructions(InstructionsConfig { user_file: None, ..InstructionsConfig::default() })
1195/// .mode(HarnessMode::Plan)
1196/// .build()?;
1197/// assert_eq!(harness.info().default_mode, HarnessMode::Plan);
1198/// # Ok(())
1199/// # }
1200/// ```
1201#[cfg(feature = "harness")]
1202#[cfg_attr(docsrs, doc(cfg(feature = "harness")))]
1203pub mod harness {
1204 #[cfg(feature = "cli")]
1205 pub use adk_cli::console::ConsoleIo;
1206 #[cfg(feature = "cli")]
1207 pub use adk_cli::harness::{ConsolePrompter, HarnessLauncher};
1208 pub use adk_harness::*;
1209}
1210
1211/// The agent kernel, the always-on form of the harness (spec 3.2 §8.2).
1212///
1213/// Everything `adk-kernel` exports: the [`Kernel`](kernel::Kernel) supervisor and its
1214/// builder, the process table, wake sources, the event bus and the
1215/// [`control`](kernel::control) plane `adk-rust up` serves.
1216///
1217/// Available with feature: `harness-kernel` (included in `enterprise` and `full`)
1218///
1219/// # Example
1220///
1221/// ```rust
1222/// use std::sync::Arc;
1223/// use adk_rust::kernel::{Kernel, KernelConfig, QueueClass};
1224///
1225/// let kernel = Kernel::builder()
1226/// .config(KernelConfig::default().with_app_name("ops"))
1227/// .run_store(Arc::new(adk_rust::InMemoryRunStore::new()))
1228/// .build()
1229/// .unwrap();
1230/// assert_eq!(kernel.config().queues, QueueClass::defaults());
1231/// ```
1232#[cfg(feature = "harness-kernel")]
1233#[cfg_attr(docsrs, doc(cfg(feature = "harness-kernel")))]
1234pub mod kernel {
1235 pub use adk_kernel::*;
1236}
1237
1238/// Local-first perception for agents (spec 3.7).
1239///
1240/// Everything `adk-vision` exports: artifact-backed images, regions in source pixels with
1241/// their transform chains, model manifests pinned by revision and SHA-256, the perception
1242/// traits and [`VisionRuntime`](vision::VisionRuntime), the [`EgressGate`](vision::EgressGate)
1243/// a remote backend's every image passes, the governed [`VisionToolset`](vision::VisionToolset),
1244/// the cloud describers and Meta `sam-3.1`. With `harness`, `pack_vision` gives a harness the
1245/// vision pack.
1246///
1247/// Available with feature: `vision` (included in `full`); the on-device backends with
1248/// `vision-local`
1249///
1250/// # Example
1251///
1252/// ```rust
1253/// use adk_rust::vision::{BBox, DecodedImage, SourceImage, Transform, TransformChain};
1254///
1255/// // A 3024×1964 screenshot, cropped and downscaled before a model sees it: a box the model
1256/// // answers in its own pixels maps back to the screenshot's.
1257/// let chain = TransformChain::new(3024, 1964)
1258/// .then(Transform::Crop { x: 1000, y: 500, width: 800, height: 600 })
1259/// .unwrap()
1260/// .then(Transform::Resize { width: 400, height: 300 })
1261/// .unwrap();
1262/// let source = chain.bbox_to_source(&BBox::new(10.0, 10.0, 110.0, 60.0));
1263/// assert_eq!(source, BBox::new(1020.0, 520.0, 1220.0, 620.0));
1264///
1265/// let page = SourceImage::from_pixels(DecodedImage::filled(64, 64, [255; 4])).unwrap();
1266/// assert!(page.digest().to_string().starts_with("sha256:"));
1267/// ```
1268#[cfg(feature = "vision")]
1269#[cfg_attr(docsrs, doc(cfg(feature = "vision")))]
1270pub mod vision {
1271 pub use adk_vision::*;
1272}
1273
1274/// Agent surfaces: the engine every surface runs on, and the web home (spec 3.3).
1275///
1276/// Everything `adk-surface` exports: the [`SurfaceEngine`](surface::SurfaceEngine) with its
1277/// sources, decision cards in the words of spec 3.3 §8, the rules of what each surface may
1278/// decide, [`web::router`](surface::web::router) for `ServerBuilder::add_api_routes`, and
1279/// [`web::home`](surface::web::home), the page, for `ServerBuilder::add_root_routes`.
1280///
1281/// Available with feature: `surface` (opt-in, in no tier)
1282///
1283/// # Example
1284///
1285/// ```rust
1286/// use adk_rust::surface::{Caller, Origin, SurfaceKind, rules};
1287///
1288/// let chat = Caller::human("ana", SurfaceKind::Chat, Origin::Chat { channel: "Telegram".into() });
1289/// assert!(!rules::may_resume(&chat));
1290/// ```
1291#[cfg(feature = "surface")]
1292#[cfg_attr(docsrs, doc(cfg(feature = "surface")))]
1293pub mod surface {
1294 pub use adk_surface::*;
1295}
1296
1297/// The AWP 2.0 website product (spec 3.5 Part C, §7.1, D-14): site kinds and their charter
1298/// templates, the team of eight agents, onboarding, jobs, incidents, alarms and the weekly
1299/// review.
1300///
1301/// Available with feature: `website` (in `full`).
1302///
1303/// # Example
1304///
1305/// ```rust
1306/// use adk_rust::website::onboarding::{StartingPoint, plan};
1307///
1308/// // The onboarding plan for a site that starts from nothing.
1309/// let steps = plan(&StartingPoint::Nothing, None);
1310/// assert!(!steps.is_empty());
1311/// ```
1312#[cfg(feature = "website")]
1313#[cfg_attr(docsrs, doc(cfg(feature = "website")))]
1314pub mod website {
1315 pub use adk_website::*;
1316}
1317
1318/// The site pipeline of an AWP 2.0 website (spec 3.5 §7.8): content as files, the built-in
1319/// generator, the launch gate, signed releases in the site log, hosts, migration and freeze.
1320///
1321/// Available with feature: `website` (in `full`).
1322///
1323/// # Example
1324///
1325/// ```rust
1326/// use adk_rust::site::content::SiteConfig;
1327///
1328/// let config = SiteConfig::from_toml("name = \"Example\"\ndomain = \"example.com\"\nlanguages = [\"en\"]\n").unwrap();
1329/// assert_eq!(config.base_url(), "https://example.com");
1330/// ```
1331#[cfg(feature = "website")]
1332#[cfg_attr(docsrs, doc(cfg(feature = "website")))]
1333pub mod site {
1334 pub use adk_site::*;
1335}
1336
1337// ============================================================================
1338// Enterprise Client SDK (feature-gated, experimental)
1339// ============================================================================
1340
1341/// Enterprise client SDK — native Rust client for the ADK-Rust Enterprise
1342/// Managed Agent Service.
1343///
1344/// Provides `EnterpriseClient` for interacting with the platform over HTTP/SSE:
1345/// - [`EnterpriseClient`](enterprise::EnterpriseClient) - Primary API client
1346/// - [`ClientConfig`](enterprise::ClientConfig) - Client configuration
1347/// - Agent, Environment, and Session CRUD
1348/// - SSE event streaming with auto-reconnect
1349/// - Vault and Memory management (beta)
1350///
1351/// This crate has zero dependency on `adk-model`, `adk-runner`, or `adk-agent` —
1352/// it communicates exclusively via HTTP with the managed agent platform.
1353///
1354/// STABILITY: Experimental, additive, feature-gated.
1355///
1356/// Available with feature: `enterprise-client`
1357#[cfg(feature = "enterprise-client")]
1358#[cfg_attr(docsrs, doc(cfg(feature = "enterprise-client")))]
1359pub use adk_enterprise;
1360
1361// ============================================================================
1362// Convenience Functions
1363// ============================================================================
1364
1365/// Detect LLM provider from environment variables.
1366///
1367/// Checks environment variables in precedence order and returns the first
1368/// matching provider that was compiled through Cargo features. The default
1369/// `minimal` tier detects Gemini via `GOOGLE_API_KEY`; add `openai` or
1370/// `anthropic` to widen detection.
1371///
1372/// 1. `GOOGLE_GENAI_USE_ENTERPRISE` / `GOOGLE_GENAI_USE_VERTEXAI` truthy
1373/// (`1` or case-insensitive `true`) → Gemini on Vertex AI via Application
1374/// Default Credentials, using `GOOGLE_CLOUD_PROJECT` and
1375/// `GOOGLE_CLOUD_LOCATION` (requires the `gemini-vertex` feature;
1376/// `GOOGLE_GENAI_USE_ENTERPRISE` takes precedence when both are set)
1377/// 2. `ANTHROPIC_API_KEY` → Anthropic (Claude)
1378/// 3. `OPENAI_API_KEY` → OpenAI
1379/// 4. `GOOGLE_API_KEY` → Gemini
1380///
1381/// When a Vertex flag is truthy but the `gemini-vertex` feature is not
1382/// compiled, a `tracing` warning is emitted and detection falls through to
1383/// the API-key steps, which may select the Gemini Studio endpoint
1384/// (`generativelanguage.googleapis.com`).
1385///
1386/// # Errors
1387///
1388/// Returns [`AdkError`] when no supported environment variable is set, or
1389/// when a Vertex flag is truthy but `GOOGLE_CLOUD_PROJECT` /
1390/// `GOOGLE_CLOUD_LOCATION` is missing.
1391///
1392/// # Example
1393///
1394/// ```rust,ignore
1395/// use adk_rust::provider_from_env;
1396/// use std::sync::Arc;
1397///
1398/// let model: Arc<dyn adk_rust::Llm> = provider_from_env()?;
1399/// ```
1400pub fn provider_from_env() -> Result<std::sync::Arc<dyn Llm>> {
1401 // The Vertex opt-in flags come before any API-key sniffing so a
1402 // deployment pinned to Vertex AI can never be diverted to the Studio
1403 // endpoint by a stray API key.
1404 #[cfg(feature = "gemini")]
1405 {
1406 if model::gemini::vertex_env_requested() {
1407 #[cfg(feature = "gemini-vertex")]
1408 {
1409 return Ok(std::sync::Arc::new(model::GeminiModel::from_env(
1410 model::catalog::GEMINI_DEFAULT,
1411 )?));
1412 }
1413 #[cfg(not(feature = "gemini-vertex"))]
1414 tracing::warn!(
1415 env.flags = "GOOGLE_GENAI_USE_ENTERPRISE/GOOGLE_GENAI_USE_VERTEXAI",
1416 "vertex backend requested via environment but the gemini-vertex feature is not compiled; api-key detection may select the gemini studio endpoint (generativelanguage.googleapis.com)"
1417 );
1418 }
1419 }
1420
1421 #[cfg(feature = "anthropic")]
1422 {
1423 if let Ok(key) = std::env::var("ANTHROPIC_API_KEY") {
1424 return Ok(std::sync::Arc::new(model::anthropic::AnthropicClient::from_api_key(key)?));
1425 }
1426 }
1427
1428 #[cfg(feature = "openai")]
1429 {
1430 if let Ok(key) = std::env::var("OPENAI_API_KEY") {
1431 let config = model::openai::OpenAIConfig::new(key, model::catalog::OPENAI_DEFAULT);
1432 return Ok(std::sync::Arc::new(model::openai::OpenAIClient::new(config)?));
1433 }
1434 }
1435
1436 #[cfg(feature = "gemini")]
1437 {
1438 if let Ok(key) = std::env::var("GOOGLE_API_KEY") {
1439 return Ok(std::sync::Arc::new(model::GeminiModel::new(
1440 key,
1441 model::catalog::GEMINI_DEFAULT,
1442 )?));
1443 }
1444 }
1445
1446 Err(AdkError::config(
1447 "No LLM provider detected. Set one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY",
1448 ))
1449}
1450
1451/// High-level single-turn agent invocation.
1452///
1453/// Creates an agent with the given instructions, sends the input, and returns
1454/// the text response. Detects the provider from `ANTHROPIC_API_KEY`, then
1455/// `OPENAI_API_KEY`, then `GOOGLE_API_KEY` (Gemini on AI Studio), among the
1456/// providers compiled in. Unlike [`provider_from_env`], it does not read the
1457/// Vertex AI flags.
1458///
1459/// This is the fastest way to get started with ADK — a single function call
1460/// that handles provider selection, session creation, agent building, and
1461/// execution.
1462///
1463/// # Arguments
1464///
1465/// * `instructions` - System instructions for the agent
1466/// * `input` - User input to send to the agent
1467///
1468/// # Returns
1469///
1470/// The agent's text response as a `String`.
1471///
1472/// # Errors
1473///
1474/// Returns [`AdkError`] when no supported environment variable is set, or
1475/// when agent execution fails.
1476///
1477/// # Example
1478///
1479/// ```rust,ignore
1480/// use adk_rust::run;
1481///
1482/// let response = run("You are a helpful assistant.", "What is 2 + 2?").await?;
1483/// println!("{response}");
1484/// ```
1485#[cfg(all(feature = "agents", feature = "sessions", feature = "runner"))]
1486pub async fn run(instructions: &str, input: &str) -> Result<String> {
1487 use futures::StreamExt;
1488 use std::collections::HashMap;
1489 use std::sync::Arc;
1490
1491 type ProviderPair = (Arc<dyn Llm>, Option<Arc<dyn CacheCapable>>);
1492
1493 let (model, cache_capable): ProviderPair = {
1494 #[allow(unused_assignments)]
1495 #[cfg_attr(
1496 not(any(feature = "anthropic", feature = "openai", feature = "gemini")),
1497 allow(unused_mut)
1498 )]
1499 let mut result: Option<ProviderPair> = None;
1500
1501 #[cfg(feature = "anthropic")]
1502 {
1503 if result.is_none()
1504 && let Ok(key) = std::env::var("ANTHROPIC_API_KEY")
1505 {
1506 let m = model::anthropic::AnthropicClient::from_api_key(key)?;
1507 result = Some((Arc::new(m), None));
1508 }
1509 }
1510
1511 #[cfg(feature = "openai")]
1512 {
1513 if result.is_none()
1514 && let Ok(key) = std::env::var("OPENAI_API_KEY")
1515 {
1516 let config = model::openai::OpenAIConfig::new(key, model::catalog::OPENAI_DEFAULT);
1517 let m = model::openai::OpenAIClient::new(config)?;
1518 result = Some((Arc::new(m), None));
1519 }
1520 }
1521
1522 #[cfg(feature = "gemini")]
1523 {
1524 if result.is_none()
1525 && let Ok(key) = std::env::var("GOOGLE_API_KEY")
1526 {
1527 let m = Arc::new(model::GeminiModel::new(key, model::catalog::GEMINI_DEFAULT)?);
1528 let cc: Arc<dyn CacheCapable> = m.clone();
1529 result = Some((m, Some(cc)));
1530 }
1531 }
1532
1533 result.ok_or_else(|| {
1534 AdkError::config(
1535 "No LLM provider detected. Set one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY",
1536 )
1537 })?
1538 };
1539
1540 let agent =
1541 agent::LlmAgentBuilder::new("adk_run").instruction(instructions).model(model).build()?;
1542
1543 let session_service: Arc<dyn adk_session::SessionService> =
1544 Arc::new(session::InMemorySessionService::new());
1545
1546 let session_id = SessionId::generate();
1547
1548 session_service
1549 .create(session::CreateRequest {
1550 app_name: "adk_run".into(),
1551 user_id: "user".into(),
1552 session_id: Some(session_id.to_string()),
1553 state: HashMap::new(),
1554 })
1555 .await?;
1556
1557 let mut runner_builder = runner::Runner::builder()
1558 .app_name("adk_run")
1559 .agent(Arc::new(agent))
1560 .session_service(session_service);
1561 if let Some(cache_capable) = cache_capable {
1562 runner_builder = runner_builder.cache_capable(cache_capable);
1563 }
1564 let runner = runner_builder.build()?;
1565
1566 let content = Content::new("user").with_text(input);
1567 let mut stream = runner.run(UserId::new("user")?, session_id, content).await?;
1568
1569 let mut result = String::new();
1570 let mut text_deltas = adk_core::EventTextDeltas::default();
1571 while let Some(event) = stream.next().await {
1572 let event = event?;
1573 let event = text_deltas.push(&event);
1574 if let Some(content) = &event.llm_response.content {
1575 for part in &content.parts {
1576 if let Some(text) = part.text() {
1577 result.push_str(text);
1578 }
1579 }
1580 }
1581 }
1582
1583 Ok(result)
1584}
1585
1586// ============================================================================
1587// Prelude
1588// ============================================================================
1589
1590/// Convenience prelude for common imports.
1591///
1592/// Import everything you need with a single line:
1593///
1594/// ```
1595/// use adk_rust::prelude::*;
1596/// ```
1597///
1598/// This includes:
1599/// - Core traits: `Agent`, `Tool`, `Llm`, `Session`
1600/// - Agent builders: `LlmAgentBuilder`, `CustomAgentBuilder`
1601/// - Workflow agents: `SequentialAgent`, `ParallelAgent`, `LoopAgent`
1602/// - Models: `GeminiModel`
1603/// - Tools: `FunctionTool`, `GoogleSearchTool`, `McpToolset`
1604/// - Services: `InMemorySessionService`, `InMemoryArtifactService`
1605/// - Runtime: `Runner`, `RunnerConfig`
1606/// - Harness (feature `harness`): `HarnessAgent`, `HarnessAgentBuilder`, `HarnessMode`
1607/// - Common types: `Arc`, `Result`, `Content`, `Event`
1608pub mod prelude {
1609 // Core types (always available)
1610 pub use crate::{
1611 AdkError, Agent, BeforeModelResult, Choice, ChoiceOption, Content, Decider, Decision,
1612 Event, EventStream, InvocationContext, Llm, LlmRequest, LlmResponse, Part, Result,
1613 RunConfig, RunConfigBuilder, Session, State, Tool, ToolContext, Toolset, decide,
1614 };
1615
1616 // Agents
1617 #[cfg(feature = "agents")]
1618 pub use crate::agent::{
1619 ConditionalAgent, CustomAgent, CustomAgentBuilder, DecisionAgent, DecisionAgentBuilder,
1620 LlmAgent, LlmAgentBuilder, LlmConditionalAgent, LlmConditionalAgentBuilder, LoopAgent,
1621 ParallelAgent, SequentialAgent,
1622 };
1623
1624 // Models
1625 #[cfg(feature = "gemini")]
1626 pub use crate::model::GeminiModel;
1627
1628 // Model providers (when specific features are enabled)
1629 #[cfg(feature = "openai")]
1630 pub use crate::model::openai::{
1631 OpenAIClient, OpenAIConfig, OpenAIResponsesClient, OpenAIResponsesConfig,
1632 };
1633
1634 #[cfg(feature = "openrouter")]
1635 pub use crate::model::openrouter::{
1636 OpenRouterApiMode, OpenRouterClient, OpenRouterConfig, OpenRouterPlugin,
1637 OpenRouterProviderPreferences, OpenRouterReasoningConfig, OpenRouterRequestOptions,
1638 OpenRouterResponseTool,
1639 };
1640
1641 #[cfg(feature = "opencode")]
1642 pub use crate::model::opencode::{
1643 OpenCodeApi, OpenCodeClient, OpenCodeConfig, OpenCodeService,
1644 };
1645
1646 #[cfg(feature = "anthropic")]
1647 pub use crate::model::anthropic::{AnthropicClient, AnthropicConfig, Effort, ThinkingMode};
1648
1649 #[cfg(feature = "deepseek")]
1650 pub use crate::model::deepseek::{DeepSeekClient, DeepSeekConfig};
1651
1652 #[cfg(feature = "groq")]
1653 pub use crate::model::groq::{GroqClient, GroqConfig};
1654
1655 #[cfg(feature = "muse")]
1656 pub use crate::model::muse::{
1657 MuseAsrClient, MuseClient, MuseConfig, MuseFilesClient, MuseImagesClient,
1658 MuseResponsesClient,
1659 };
1660
1661 #[cfg(feature = "ollama")]
1662 pub use crate::model::ollama::{OllamaConfig, OllamaModel};
1663
1664 // OpenAI-compatible providers: use OpenAICompatible with provider presets
1665 // e.g. OpenAICompatibleConfig::fireworks(api_key, model)
1666 #[cfg(feature = "openai")]
1667 pub use crate::model::openai_compatible::{OpenAICompatible, OpenAICompatibleConfig};
1668
1669 #[cfg(feature = "bedrock")]
1670 pub use crate::model::bedrock::{BedrockClient, BedrockConfig};
1671
1672 #[cfg(feature = "azure-ai")]
1673 pub use crate::model::azure_ai::{AzureAIClient, AzureAIConfig};
1674
1675 // Tools
1676 #[cfg(feature = "mcp")]
1677 pub use crate::tool::McpToolset;
1678 #[cfg(feature = "tools")]
1679 pub use crate::tool::{
1680 BasicToolset, ExitLoopTool, FunctionTool, GoogleSearchTool, LoadArtifactsTool,
1681 UrlContextTool, WebSearchTool,
1682 };
1683
1684 // Skills
1685 #[cfg(feature = "skills")]
1686 pub use crate::skill::{SelectionPolicy, SkillInjector, SkillInjectorConfig, load_skill_index};
1687 #[cfg(feature = "skills-progressive-disclosure")]
1688 pub use crate::skill::{SkillToolset, SkillToolsetConfig};
1689
1690 // Sessions
1691 #[cfg(feature = "sessions")]
1692 pub use crate::session::InMemorySessionService;
1693
1694 // Artifacts
1695 #[cfg(feature = "artifacts")]
1696 pub use crate::artifact::InMemoryArtifactService;
1697
1698 // Memory
1699 #[cfg(feature = "memory")]
1700 pub use crate::memory::InMemoryMemoryService;
1701
1702 // Runner
1703 #[cfg(feature = "runner")]
1704 pub use crate::runner::{Runner, RunnerConfig};
1705
1706 // Graph workflows
1707 #[cfg(feature = "graph")]
1708 pub use crate::graph::{END, GraphAgent, NodeOutput, Router, START, StateGraph};
1709
1710 // Harness
1711 #[cfg(feature = "harness")]
1712 pub use crate::harness::{HarnessAgent, HarnessAgentBuilder, HarnessMode};
1713
1714 // Realtime
1715 #[cfg(feature = "realtime")]
1716 pub use crate::realtime::{
1717 RealtimeAgent, RealtimeAgentBuilder, RealtimeConfig, RealtimeModel, RealtimeRunner,
1718 RealtimeSession,
1719 };
1720
1721 // Common re-exports
1722 pub use crate::anyhow::Result as AnyhowResult;
1723 pub use crate::async_trait;
1724 pub use std::sync::Arc;
1725
1726 // Convenience functions
1727 pub use crate::provider_from_env;
1728 #[cfg(all(feature = "agents", feature = "sessions", feature = "runner"))]
1729 pub use crate::run;
1730}