adk-deploy
Deployment manifest, bundling, and control-plane client for ADK-Rust agents.
Overview
adk-deploy provides everything needed to package and deploy ADK-Rust agents to a control plane:
- Deployment manifests — TOML-based configuration covering agent identity, build settings, scaling, health checks, deployment strategy, service bindings, secrets, telemetry, auth, guardrails, realtime, A2A, graph/HITL, plugins, skills, and interaction triggers
- Bundle builder — compiles the agent binary, packages it with assets into a
.tar.gzarchive, and generates SHA-256 integrity checksums - Control-plane client — HTTP client for push deployments, status checks, rollbacks, promotions, secret management, and dashboard queries
- Comprehensive validation — manifests are validated before build or push (unique bindings, secret refs, auth mode consistency, graph checkpoint requirements, trigger field completeness)
Installation
[]
= "0.5.0"
Manifest Format
Create an adk-deploy.toml in your project root:
[]
= "my-agent"
= "my-agent"
= "1.0.0"
= "A production AI agent"
[]
= "release"
= ["openai", "tools"]
= ["prompts/", "config.yaml"]
[]
= 2
= 20
= 300
= 70
[]
= "/api/health"
= 10
= 5
= 3
[]
= "rolling"
# type = "canary"
# trafficPercent = 10
# type = "blue-green"
[[]]
= "sessions"
= "postgres"
= "managed"
[[]]
= "memory"
= "pgvector"
= "external"
= "PGVECTOR_URL"
[[]]
= "OPENAI_API_KEY"
= true
[[]]
= "PGVECTOR_URL"
= true
[]
= "info"
= { = "OPENAI_API_KEY" }
[]
= "https://otel.example.com:4317"
= "my-agent"
[]
= "bearer"
= ["agent:invoke"]
[]
= true
= ["toxicity"]
[]
= true
[]
= "Ask the agent"
= "What can you help me with?"
[[]]
= "daily-report"
= "Daily Report"
= "schedule"
= "0 9 * * *"
= "America/New_York"
Usage
Loading and Validating a Manifest
use DeploymentManifest;
use Path;
let manifest = from_path?;
println!;
Building a Bundle
use ;
use Path;
let manifest_path = new;
let manifest = from_path?;
let builder = new;
let artifact = builder.build?;
println!;
println!;
The bundle builder:
- Validates the manifest
- Runs
cargo buildwith the configured profile, target, and features - Packages the binary + manifest + assets into a
.tar.gz - Writes a
.sha256checksum file alongside the archive
Pushing a Deployment
use ;
let config = load?;
let client = new;
let response = client.push_deployment.await?;
println!;
Deployment Operations
// Check status
let status = client.status.await?;
// View history
let history = client.history.await?;
// Rollback
let rolled_back = client.rollback.await?;
// Promote (canary → full)
let promoted = client.promote.await?;
// Dashboard overview
let dashboard = client.dashboard.await?;
Secret Management
use SecretSetRequest;
// Set a secret
client.set_secret.await?;
// List secrets (keys only, values never returned)
let secrets = client.list_secrets.await?;
// Delete a secret
client.delete_secret.await?;
Manifest Sections
| Section | Purpose |
|---|---|
agent |
Name, binary, version, description |
build |
Profile, target triple, features, system deps, assets |
scaling |
Min/max instances, latency/CPU/concurrency targets |
health |
Health check path, interval, timeout, failure threshold |
strategy |
Rolling, blue-green, or canary with traffic percentage |
services |
Service bindings (postgres, redis, sqlite, mongodb, neo4j, pgvector, MCP, checkpoints) |
secrets |
Secret key declarations with required flag |
env |
Environment variables (plain values or secret refs) |
telemetry |
OTLP endpoint, service name, resource attributes |
auth |
Auth mode (disabled/bearer/OIDC), scopes, issuer, JWKS |
guardrails |
PII redaction, content filters |
realtime |
Realtime features (openai, gemini, vertex-live, livekit) |
a2a |
Agent-to-Agent protocol toggle |
graph |
Checkpoint binding, HITL toggle |
plugins |
Plugin references |
skills |
Skills directory, hot reload |
interaction |
Manual input config, webhook/schedule/event triggers |
source |
Source metadata (Studio project ID, etc.) |
Service Binding Kinds
| Kind | Description |
|---|---|
in-memory |
In-memory (dev/test only) |
postgres |
PostgreSQL sessions |
redis |
Redis sessions |
sqlite |
SQLite sessions |
mongo-db |
MongoDB sessions |
neo4j |
Neo4j sessions |
pgvector |
PostgreSQL + pgvector memory |
redis-memory |
Redis memory |
mongo-memory |
MongoDB memory |
neo4j-memory |
Neo4j memory |
artifact-storage |
Binary artifact storage |
mcp-server |
MCP server connection |
checkpoint-postgres |
Graph checkpoint (PostgreSQL) |
checkpoint-redis |
Graph checkpoint (Redis) |
Deployment Strategies
| Strategy | Description |
|---|---|
rolling |
Gradual instance replacement (default) |
blue-green |
Full parallel deployment, instant switch |
canary |
Route trafficPercent to new version, promote or rollback |
Error Handling
All operations return DeployResult<T> with structured DeployError variants:
use DeployError;
match result
Client Configuration
The client config is stored at ~/.config/adk-deploy/config.json:
Load with DeployClientConfig::load() (defaults to http://127.0.0.1:8090 if no config exists).
Related Crates
- adk-rust — Umbrella crate
- adk-server — REST API and A2A server
- adk-cli — CLI with
deploysubcommands
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.