adk_server/lib.rs
1//! # adk-server
2#![allow(clippy::result_large_err)]
3//!
4//! HTTP server and A2A protocol for ADK agents.
5//!
6//! ## Overview
7//!
8//! This crate provides HTTP infrastructure:
9//!
10//! - [`create_app`] - Create REST API server
11//! - [`create_app_with_a2a`] - Add A2A protocol support
12//! - [`RemoteA2aAgent`] - Connect to remote A2A agents
13//! - [`ServerConfig`] - Server configuration
14//!
15//! ## Quick Start
16//!
17//! ```rust,no_run
18//! use adk_server::{create_app, ServerConfig};
19//! use std::sync::Arc;
20//!
21//! // let config = ServerConfig { ... };
22//! // let app = create_app(config);
23//! // let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await?;
24//! // axum::serve(listener, app).await?;
25//! ```
26//!
27//! ## A2A Protocol
28//!
29//! Expose agents via Agent-to-Agent protocol:
30//!
31//! - `GET /.well-known/agent.json` - Agent card
32//! - `POST /a2a` - JSON-RPC endpoint
33//! - `POST /a2a/stream` - SSE streaming
34
35pub mod a2a;
36pub mod auth_bridge;
37pub mod config;
38pub mod rest;
39pub mod ui_protocol;
40pub mod ui_types;
41pub mod web_ui;
42
43pub use a2a::{
44 A2aClient, Executor, ExecutorConfig, RemoteA2aAgent, RemoteA2aAgentBuilder, RemoteA2aConfig,
45 build_agent_card, build_agent_skills,
46};
47pub use auth_bridge::{RequestContext, RequestContextError, RequestContextExtractor};
48pub use config::{SecurityConfig, ServerConfig};
49pub use rest::{
50 A2aController, RuntimeController, SessionController, create_app, create_app_with_a2a,
51 shutdown_signal,
52};