Skip to main content

adk_server/
lib.rs

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