docs.rs failed to build adk-server-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
adk-server-0.2.1
adk-server
HTTP server and A2A protocol for Rust Agent Development Kit (ADK-Rust) agents.
Overview
adk-server provides HTTP infrastructure for the Rust Agent Development Kit (ADK-Rust):
- REST API - Standard HTTP endpoints for agent interaction
- A2A Protocol - Agent-to-Agent communication (JSON-RPC 2.0)
- SSE Streaming - Server-Sent Events for real-time responses
- Web UI - Built-in chat interface for testing
- RemoteA2aAgent - Connect to remote agents as sub-agents
Installation
[]
= "0.3.0"
Or use the meta-crate:
[]
= { = "0.3.0", = ["server"] }
Quick Start
Basic Server
use ;
use Arc;
let config = new;
let app = create_app;
let listener = bind.await?;
serve.await?;
Security Configuration
Configure CORS, timeouts, and other security settings:
use ;
use Duration;
// Development mode (permissive CORS, detailed errors)
let config = new
.with_security;
// Production mode (restricted CORS, sanitized errors)
let config = new
.with_allowed_origins
.with_request_timeout
.with_max_body_size; // 5MB
A2A Server
use create_app_with_a2a;
let app = create_app_with_a2a;
// Exposes:
// GET /.well-known/agent.json - Agent card
// POST /a2a - JSON-RPC endpoint
// POST /a2a/stream - SSE streaming
Remote Agent Client
use RemoteA2aAgent;
let remote = builder
.description
.agent_url
.build?;
// Use as sub-agent
let coordinator = new
.sub_agent
.build?;
API Endpoints
Runtime and Sessions
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Health check |
/api/apps |
GET | List available agents |
/api/list-apps |
GET | adk-go compatible app listing |
/api/sessions |
POST | Create session |
/api/sessions/{app_name}/{user_id}/{session_id} |
GET, DELETE | Get or delete session |
/api/run/{app_name}/{user_id}/{session_id} |
POST | Run agent with SSE |
/api/run_sse |
POST | adk-go compatible SSE runtime |
UI Protocol Contracts
| Endpoint | Method | Description |
|---|---|---|
/api/ui/capabilities |
GET | Supported UI protocols/features (adk_ui, a2ui, ag_ui, mcp_apps) |
/api/ui/resources |
GET | List MCP UI resources (ui:// entries) |
/api/ui/resources/read?uri=... |
GET | Read a registered MCP UI resource |
/api/ui/resources/register |
POST | Register an MCP UI resource (validated ui:// + mime/meta) |
Runtime endpoints support protocol negotiation via:
- request body field
uiProtocol/ui_protocol - header
x-adk-ui-protocol(takes precedence)
Supported runtime profile values:
adk_ui(default, legacy profile)a2uiag_uimcp_apps
Deprecation signaling:
adk_uideprecation metadata is included in/api/ui/capabilities.- Runtime requests using
adk_uiemit server warning logs to aid migration tracking. - Current timeline: announced
2026-02-07, sunset target2026-12-31.
Example runtime request:
Protocol response behavior:
adk_uiprofile: legacy runtime event payload shape- non-default profiles (
a2ui,ag_ui,mcp_apps): profile-wrapped SSE payloads with protocol metadata
MCP UI resource registration request shape:
Resource registration enforces:
ui://URI scheme- supported MIME type contracts
- metadata domain/CSP validation
A2A Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/agent.json |
GET | A2A agent card |
/a2a |
POST | A2A JSON-RPC |
/a2a/stream |
POST | A2A streaming |
Features
- Axum-based async HTTP
- CORS support
- Embedded web assets
- Multi-agent routing
- Health checks
Related Crates
- adk-rust - Meta-crate with all components
- adk-runner - Execution runtime
- adk-cli - CLI launcher
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.