Skip to main content

Crate adk_server

Crate adk_server 

Source
Expand description

§adk-server

HTTP server and A2A v1.0.0 protocol for ADK agents.

§Overview

This crate provides HTTP infrastructure:

§What’s New in 0.6.0

§A2A v1.0.0 Protocol Compliance

The a2a::v1 module (behind the a2a-v1 feature flag) implements the full A2A Protocol v1.0.0 specification with all 11 JSON-RPC operations:

  • RFC 3339 timestamps on all task status changes
  • Agent capabilities declaration via build_v1_agent_card()
  • Message ID idempotency for SendMessage/SendStreamingMessage
  • Push notification authentication (Bearer + a2a-notification-token)
  • INPUT_REQUIRED multi-turn resume flow
  • Input validation (parts, IDs, metadata size)
  • Content-Type: application/a2a+json on JSON-RPC responses
  • Task object as first SSE streaming event
  • Context-scoped task lookup for multi-turn conversations
  • Version negotiation via A2A-Version header

Wire types powered by a2a-protocol-types.

§Breaking Changes

  • build_v1_agent_card() now requires an AgentCapabilities parameter
  • TaskStore trait gains find_task_by_context() method
  • PushNotificationSender trait methods gain config parameter
  • message_stream() and tasks_subscribe() return StreamResponse instead of TaskStatusUpdateEvent

§Quick Start

use adk_server::{create_app, ServerConfig};
use std::sync::Arc;

// let config = ServerConfig { ... };
// let app = create_app(config);
// let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await?;
// axum::serve(listener, app).await?;

§A2A Protocol

Expose agents via Agent-to-Agent protocol:

  • GET /.well-known/agent-card.json - Agent card with capabilities
  • POST /jsonrpc - JSON-RPC endpoint (all 11 v1 operations)
  • REST routes for all operations

Re-exports§

pub use a2a::A2aClient;
pub use a2a::Executor;
pub use a2a::ExecutorConfig;
pub use a2a::RemoteA2aAgent;
pub use a2a::RemoteA2aAgentBuilder;
pub use a2a::RemoteA2aConfig;
pub use a2a::build_agent_card;
pub use a2a::build_agent_skills;
pub use auth_bridge::RequestContextError;
pub use auth_bridge::RequestContextExtractor;
pub use config::SecurityConfig;
pub use config::ServerConfig;
pub use rest::A2aController;
pub use rest::RuntimeController;
pub use rest::SessionController;
pub use rest::create_app;
pub use rest::create_app_with_a2a;
pub use rest::shutdown_signal;

Modules§

a2a
auth_bridge
Auth middleware bridge for flowing authenticated identity into agent execution.
config
rest
ui_protocol
UI protocol constants, capability specs, and normalization.
ui_types
MCP Apps render-option types and validation.
web_ui

Structs§

RequestContext
Identity and authorization context extracted from an HTTP request.