| Crates.io | adk-server |
| lib.rs | adk-server |
| version | 0.2.1 |
| created_at | 2025-11-30 14:38:24.208614+00 |
| updated_at | 2026-01-22 03:44:00.484597+00 |
| description | HTTP server and A2A protocol for Rust Agent Development Kit (ADK-Rust) agents |
| homepage | |
| repository | https://github.com/zavora-ai/adk-rust |
| max_upload_size | |
| id | 1958310 |
| size | 4,181,731 |
HTTP server and A2A protocol for Rust Agent Development Kit (ADK-Rust) agents.
adk-server provides HTTP infrastructure for the Rust Agent Development Kit (ADK-Rust):
[dependencies]
adk-server = "0.2.0"
Or use the meta-crate:
[dependencies]
adk-rust = { version = "0.2.1", features = ["server"] }
use adk_server::{create_app, ServerConfig};
use std::sync::Arc;
let config = ServerConfig::new(
Arc::new(SingleAgentLoader::new(Arc::new(agent))),
Arc::new(InMemorySessionService::new()),
);
let app = create_app(config);
let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await?;
axum::serve(listener, app).await?;
Configure CORS, timeouts, and other security settings:
use adk_server::{ServerConfig, SecurityConfig};
use std::time::Duration;
// Development mode (permissive CORS, detailed errors)
let config = ServerConfig::new(agent_loader, session_service)
.with_security(SecurityConfig::development());
// Production mode (restricted CORS, sanitized errors)
let config = ServerConfig::new(agent_loader, session_service)
.with_allowed_origins(vec!["https://myapp.com".to_string()])
.with_request_timeout(Duration::from_secs(60))
.with_max_body_size(5 * 1024 * 1024); // 5MB
use adk_server::create_app_with_a2a;
let app = create_app_with_a2a(config, Some("http://localhost:8080"));
// Exposes:
// GET /.well-known/agent.json - Agent card
// POST /a2a - JSON-RPC endpoint
// POST /a2a/stream - SSE streaming
use adk_server::RemoteA2aAgent;
let remote = RemoteA2aAgent::builder("weather_agent")
.description("Remote weather service")
.agent_url("http://weather-service:8080")
.build()?;
// Use as sub-agent
let coordinator = LlmAgentBuilder::new("coordinator")
.sub_agent(Arc::new(remote))
.build()?;
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Web UI |
/api/chat |
POST | Send message |
/api/chat/stream |
POST | Stream response |
/.well-known/agent.json |
GET | A2A agent card |
/a2a |
POST | A2A JSON-RPC |
/a2a/stream |
POST | A2A streaming |
Apache-2.0
This crate is part of the ADK-Rust framework for building AI agents in Rust.