Migrating from ADK-Rust 2.x to 3.0
3.0.0 is a major release. This guide lists the breaking changes between the published 2.3.0 crates and 3.0.0: the API breaks and the behaviour changes that need a code change or a decision. Crates that are new in 3.0.0 have no 2.x users and are not covered. The CHANGELOG has the full entry for each.
Note: the API breaks come from the release's changelog entries and from a comparison of the public structs, enums, trait methods and function signatures of every crate published at 2.3.0 between the
v2.3.0tag and 3.0.0.cargo semver-checkshas not been run against 2.3.0 for 3.0.0: thesemverCI job runs withSEMVER_RELEASE_TYPE: major, which accepts every change.
Related guides:
| Moving from | Guide |
|---|---|
| SQLx 0.8 pools, migrations and feature flags | SQLx 0.9 in ADK-Rust 3.0 |
An AWP 1.x site (business.toml, /awp/* routes) | Migrating from AWP 1.x to 2.0 |
adk_agent::coding::CodingAgent | Migrating from CodingAgent to the harness |
| ADK Studio 1.x | ADK Studio: Studio 3 is in development against ADK-Rust 3.0 |
adk-ui 2 render tools | Agent-drawn UI |
The runtime UI that adk-server served at /ui/ | The web home |
Update every adk-* dependency together — the crates are versioned in lockstep:
[dependencies]
adk-rust = { version = "3.0.0", features = ["standard"] }
Quick reference
| If your code… | Do this |
|---|---|
passes a reqwest::Client or other reqwest type to an adk-* API | depend on reqwest = "0.13" (reqwest 0.13) |
builds RunConfig, EventActions, LlmResponse or another config struct with a literal | end the literal with ..Default::default() or use the constructor (struct literals) |
builds RunnerConfig with a literal | use Runner::builder() |
matches exhaustively on ErrorCategory, GraphError, GuardrailError, an adk-anthropic enum, or another enum in the table | add the new arms |
matches on FinishReason, or shows a model's refusal as its answer | add a wildcard arm, and expect a refusal to fail the run with model.refusal (refusals) |
| relies on a tool being retried | declare ToolEffect::Idempotent or ReadOnly (retries) |
| reads the error text the model receives for a failed tool | call expose_tool_error_messages(true) (tool errors) |
builds tool_confirmation_fingerprints with tool_call_fingerprint | take fingerprint() from the held call's request (fingerprints) |
wraps Tool, ReadonlyContext, or Agent | forward the new trait methods (wrappers) |
| serves agents to other machines or browsers | set the bind address, allowed_hosts, and allowed_origins (server exposure) |
| has graph runs paused under 2.3.0 | finish them before upgrading, or re-key their checkpoints (graph threads) |
uses #[tool], FunctionTool, or StatefulTool with a schema | expect undeclared keys and out-of-range values to be rejected (argument validation) |
uses PostgresAuditSink | call migrate() before the first write (audit) |
enables a feature named after a dependency (adk-session/tokio, adk-auth/jsonwebtoken, adk-guardrail/jsonschema, …) | enable the feature that uses it (optional dependencies) |
calls SessionService::rewind or rewind_steps | pass an AdkIdentity (rewind) |
implements PaymentPolicyGuardrail | make evaluate async and add the context parameter (payments) |
runs cargo adk eval | pass --agent-cmd (eval) |
queries exported GenAI spans or uses adk_telemetry::semconv | use the current GenAI attribute names (telemetry) |
runs cargo adk bench | install with cargo install cargo-adk --features bench (benchmarks) |
depends on adk-agent or adk-runner directly and calls a skill method (with_skills, with_auto_skills, with_skill_injector, …) | enable skills on that crate (skills) |
names an adk-rust alias feature (fireworks, whisper-onnx, action-db, a2a, personas, …) | replace it with its sibling (features) |
consumes or implements SttProvider::transcribe_stream | match TranscriptEvents (audio) |
builds adk_memory::MemoryEntry with a literal, implements or wraps MemoryService, or sets RedisMemoryConfig::ttl | use MemoryEntry::new, forward delete_memory and purge_expired, and expect the TTL per entry (memory expiry) |
reads SandboxPolicy::allow_network or network_rules, implements SandboxEnforcer, or runs WindowsEnforcer with the network denied | use SandboxPolicy::network, add network_support, or call acknowledge_open_network (sandbox network) |
implements Llm or CacheCapable, or reads or edits LlmRequest::tools | use ToolDeclarations (tool declarations) |
opens / or /ui/ on a server built with adk-server | mount adk-surface's web home, or run adk-rust serve (runtime UI) |
calls POST /api/run or POST /api/run_sse for a session it has not created | create the session first (runs) |
serves or calls A2A v1, or has an A2A 0.3 client that reads /.well-known/agent-card.json | send A2A-Version: 1.0, match SendMessageResponse, read .tasks, and read 0.3 cards from /.well-known/agent.json (A2A v1) |
mounts registry_router or implements AgentRegistryStore | pass a RequestContextExtractor and implement replace_owned and delete_owned (agent registry) |
calls ModelProvider::default_model, or relies on a provider's default model | handle None for Bedrock and Azure AI, and check the new defaults (default models) |
validates tokens with JwtValidator or an SSO provider | set an audience, pass JwtAlgorithm to algorithm(..), and expect tokens without iss or aud to be refused (SSO) |
matches error codes artifact.legacy, artifact.gcs.not_found, or config.legacy for a session identifier | match the new codes (artifacts, sessions) |
| runs graph HTTP, notification, or RSS nodes against an internal service | add allow_private_networks() to the policy (graph HTTP) |
runs adk-rust without a subcommand, adk-rust serve, or code, goal, ultracode from a script | use adk-rust chat, serve --agent chat, or --yes (adk-cli) |
uses adk-acp's server or the agent_client_protocol re-export | follow the ACP SDK 5 layout and the new handler signatures (adk-acp) |
Before you upgrade
Some changes affect state written by 2.3.0 or the way a deployment is reached. Handle these before or during the upgrade.
| Stored state or deployment | What 3.0 does | Do this |
|---|---|---|
Graph runs paused by GraphAgent or a NodeTool | Keys checkpoints by app, user, and session; checkpoints under a bare session id are not read | Finish paused runs on 2.3.0, or re-key them (details) |
Runs paused inside a SubgraphNode or a run_node child | Keys child work by activation, so the child starts again on resume | Finish those runs on 2.3.0 |
| Tool calls held for confirmation | Binds approvals to the agent and the tool's origin; a call held under 2.3.0 is answered as not run when a decision resumes it | Re-issue the held calls after the upgrade |
PostgresAuditSink tables | Writes the new agent_id and on_behalf_of columns | Call migrate() once; until then every insert fails and guarded tools are refused |
| SQLite, PostgreSQL, and MongoDB session stores | Adds migration 2 (sessions.initial_state on SQLite, events.seq on PostgreSQL, an index on MongoDB) | Call the service's migrate() |
RedisSessionService | Writes sessions through Lua scripts | Allow EVAL for the service's Redis user |
FileArtifactService directories | Writes a new layout for names and user-scoped artifacts; the earlier layout is still read | Update tools that read the directory tree directly |
Artifacts saved under the session id user | Reserves that id for user-scoped artifacts, so those artifacts are unreachable | Copy them to another session before upgrading |
| pgvector collections | Validates collection names instead of rewriting them | Use the existing table's name without its rag_ prefix |
| RAG vector store collections | Keys every chunk by scope and chunk ID | pgvector: call create_collection once (it migrates in place). LanceDB, Qdrant, Agent Retrieval: re-create and re-ingest (details) |
| SurrealDB vector store collections | Removes SurrealVectorStore and the surrealdb feature | Re-ingest the source documents into another vector store (details) |
Background runs persisted by FileRunPersistence | Removes the file store; runs live in a DurableRunStore | Let persisted runs finish on 2.3.0, and re-create cron jobs |
| Servers reached from other machines or browsers | Listens on 127.0.0.1, allows no cross-origin access, and checks the Host header | Configure the bind address, hosts, and origins (details) |
Deployments whose users open / or /ui/ on an adk-server server | Serves no page at those paths | Mount the web home, or run adk-rust serve (details) |
A2A peers of a server built with a2a-v1 | Serves A2A v1 beside 0.3, serves the v1 card at /.well-known/agent-card.json (the 0.3 card stays at /.well-known/agent.json), and refuses v1 requests without A2A-Version | Point 0.3 clients at agent.json, and send A2A-Version: 1.0 from v1 clients (details) |
Clients that call POST /api/run with a new session id | Answers 404 with session.not_found | Create the session before the first run (details) |
Scripts that run adk-rust code, goal, or ultracode | Runs them on the harness in ask mode, so edits and host commands wait for approval | Pass --yes or a --mode (details) |
reqwest 0.13
Every crate builds its HTTP clients on reqwest 0.13 (2.3.0 used 0.12). An API that takes or
returns a reqwest type — adk_auth's with_http_client(reqwest::Client), adk_core::egress's
RequestBuilder, the Slack tools, adk_gemini's and adk_gcp's clients, and the others —
takes the 0.13 type, so an application that passes its own client depends on the same version:
[dependencies]
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }
TLS is rustls on aws-lc-rs with the platform verifier, which checks certificates against the
operating system's trust store, as rustls-tls-native-roots did. ring is no longer compiled
for HTTP, so a binary that installs a rustls provider itself installs aws-lc-rs, or calls
adk_core::ensure_crypto_provider(). On Windows x86_64 (MSVC), aws-lc-sys assembles with NASM
for every tier, minimal included; without NASM installed, set AWS_LC_SYS_PREBUILT_NASM=1 to
use the objects it ships.
Struct literals
Most API breaks are new public fields. A struct literal that names every field stops compiling;
one that ends with ..Default::default(), or a constructor, keeps compiling:
use adk_core::{Content, EventActions, LlmResponse, RunConfig, StreamingMode};
let config = RunConfig { streaming_mode: StreamingMode::SSE, ..Default::default() };
let actions = EventActions { escalate: true, ..Default::default() };
let response = LlmResponse {
content: Some(Content::new("model").with_text("Done.")),
..Default::default()
};
| Type | Crate | New or changed fields | Build it with |
|---|---|---|---|
RunConfig | adk-core | invocation_hooks, budget, budget_tracker, action_ledger, tool_policy, tool_reviewer, governance, tool_approvals, approval_store, approval_service, durable_run_id, tool_confirmation_timeout, spend_ledger, llm_spend_estimate, audit, acting, deny_on_confirmation_timeout, intra_compaction, history_compactor, consent_gate, egress_policy, request_context, request_metadata, requested_call, transfer_target_descriptions | ..Default::default() or RunConfig::builder() |
IntraCompactionConfig | adk-core | enabled, context_window_fraction, native, background, background_fraction; token_threshold is Option<u64> | IntraCompactionConfig::at_tokens(n), with_overlap_event_count, with_native and in_background |
MessageCreateParams | adk-anthropic | compaction, thread, betas | MessageCreateParams::new or ..Default::default() |
RunnerConfig | adk-runner | tool_policy, governance, action_ledger, approval_store, spend_ledger, durable_runs, audit, identity_source, subject_delegation, egress_policy | Runner::builder(), or set each to None |
EventActions | adk-core | input_screened, workflow_positions, steering, grounding_sources | ..Default::default() |
LlmResponse | adk-core | model, provider | ..Default::default() |
UsageMetadata | adk-core | builtin_tool_uses | ..Default::default() |
GenerateContentConfig | adk-core | effort (per-call reasoning effort, spec 3.1 §7.23), response_modalities | ..Default::default() |
ToolConfirmationRequest | adk-core | acting, origin, evidence | ToolConfirmationRequest::new and with_evidence |
ToolOutcome | adk-core | error | add the field |
RetryBudget | adk-core | max_delay | RetryBudget::new |
TeamBudget | adk-agent | allow_unpriced_models | ..TeamBudget::default() |
CodeActCheckpoint | adk-agent (codeact) | run_id | add run_id: None |
AnthropicConfig | adk-model | request_timeout_secs, prompt_cache_ttl, thinking_display, inline_tool_changes, message_threads; max_tokens is Option<u32> | AnthropicConfig::new and its with_* methods |
OpenAIResponsesConfig | adk-model | transport removed | drop the field |
Usage, MessageDeltaUsage | adk-anthropic | raw | add raw: None |
ServerToolUsage | adk-anthropic | web_fetch_requests, code_execution_requests | ..Default::default() |
ServerToolUseBlock, WebSearchToolResultBlock, WebFetchToolResultBlock | adk-anthropic | caller | their new constructors |
ToolUseBlock, ToolResultBlock | adk-anthropic | toolset_name | ToolUseBlock::new, ToolResultBlock::new |
UserEvent::DefineOutcome | adk-anthropic (managed-agents) | description, rubric, max_iterations replace criteria | UserEvent::define_outcome |
UsageMetadata, interactions::Usage | adk-gemini | raw | add raw: None |
GroundingMetadata, GroundingSegment | adk-gemini | search_entry_point, part_index | ..Default::default() |
ServerConfig | adk-server | governance, session_activity | ServerConfig::new |
SecurityConfig | adk-server | allowed_hosts, admin_scope, run_timeout | ..SecurityConfig::default() |
RemoteA2aConfig | adk-server | allowed_endpoint_origins, credential_broker, credential_scopes | RemoteA2aAgent::builder |
RemoteA2aV1Config | adk-server (a2a-v1) | credential_broker, credential_scopes, send_configuration, hooks | add the fields |
TaskStoreEntry | adk-server (a2a-v1) | version | add version: 0 |
AgUiRunInput, MessagePart, CreateSessionBodyRequest | adk-server | resume; function_call, function_response; session_id | ..Default::default() |
registry::AgentCard | adk-server (agent-registry) | owner | add owner: None; the server sets it from the caller |
SubmitRunRequest, CreateCronJobRequest | adk-server (background) | see background runs | add the fields |
CronState | adk-server (background) | jitter, audit; the struct is #[non_exhaustive], so no literal outside adk-server | CronState::new and with_schedule_store, with_jitter, with_audit |
ExecutionConfig | adk-graph | a crate-private field, so no literal outside adk-graph | ExecutionConfig::new and its builder methods |
Checkpoint | adk-graph | version, pending_writes | Checkpoint::new |
RetentionPolicy | adk-graph | #[non_exhaustive]; pinned | RetentionPolicy::keep_last, max_age, with_max_age, with_max_per_thread, pinning |
InterruptedExecution | adk-graph | interrupts | InterruptedExecution::new |
executor::SuperStepResult | adk-graph | interrupt replaced by interrupts; updates | add the fields |
ContainerConfig, DockerConfig | adk-code | drop_capabilities, no_new_privileges, pids_limit | ..ContainerConfig::default(), ..DockerConfig::default() |
MemoryEntry | adk-memory | id, expires_at; the struct is #[non_exhaustive], so no literal outside adk-memory | MemoryEntry::new(content, author) and with_timestamp, with_id, with_ttl, with_expires_at |
TriggerEvent | adk-agent (ambient) | none; the struct is #[non_exhaustive], so no literal outside adk-agent | TriggerEvent::new(source, payload) and with_principal |
AuditEvent, AuditFilter | adk-auth | agent_id, on_behalf_of (AuditFilter: agent_id) | add the fields |
ManagedSessionState | adk-managed | record, pending, durable_run_id | ManagedSessionState::new |
LlmJudgeConfig | adk-eval | max_tokens and temperature are Option | wrap values in Some |
StructuredJudgeConfig | adk-eval | temperature is Option | wrap the value in Some |
DeploymentManifest | adk-deploy | targets | ..DeploymentManifest::default() |
RetryConfig | adk-model | max_server_delay | ..RetryConfig::default() |
ToolDefinition | adk-realtime | behavior | ToolDefinition::new, or add behavior: None |
Message, MessageDelta | adk-anthropic | stop_details | Message::new, MessageDelta::new |
GenerationConfig, Candidate | adk-gemini | presence_penalty, frequency_penalty, response_logprobs, logprobs; logprobs_result, avg_logprobs | ..Default::default() |
Turn, TurnResult | adk-eval | expected_vision, actual_vision | add the field as None |
EvaluationCriteria | adk-eval | vision | ..Default::default() |
GraphInterruptPayload | adk-graph | interrupt_id, response_schema | GraphInterruptPayload::new or from_event |
CapabilityEntry | awp-types | access_level | add access_level: None |
BusinessCapability | awp-types | input_schema, output_schema | add both as None |
AcpServerConfig | adk-acp (server) | standing_permissions, authenticator, system_prompts, providers | AcpServerConfigBuilder::new() |
AcpAgentConfig, PromptResult | adk-acp | new fields; both are #[non_exhaustive], so no literal outside adk-acp | AcpAgentConfig::new and its builder methods |
RetryReflectConfig | adk-retry-reflect | record_payloads | ..RetryReflectConfig::default() |
Runner::builder() replaces a RunnerConfig literal, which has no Default:
use adk_runner::Runner;
let runner = Runner::builder()
.app_name("support")
.agent(agent)
.session_service(sessions)
.build()?;
Optional dependencies are no longer features
Optional dependencies of eleven crates were reachable as features named after the
dependency, because the crates enabled them without the dep: prefix. 3.0.0 names them with
dep:, so those names are no longer features; enable the feature that uses the dependency.
| Crate | Removed implicit features | Enable instead |
|---|---|---|
adk-agent | adk-guardrail | guardrails |
adk-artifact | adk-gcp, google-cloud-auth, reqwest, serde, tracing | gcs |
adk-auth | axum, base64, dashmap, jsonwebtoken, reqwest | sso, auth-bridge, signed-audit, token-exchange, web-bot-auth |
adk-deploy | adk-core, adk-gcp, google-cloud-auth | gcp |
adk-eval | adk-gcp, google-cloud-auth, reqwest | vertex-eval |
adk-guardrail | jsonschema | schema |
adk-memory | adk-gcp, fred, google-cloud-auth, reqwest | redis-memory, vertex-memory |
adk-session | adk-gcp, aes-gcm, base64, fred, google-cloud-auth, rand, reqwest, sha2, sqlx, tokio | sqlite, postgres, redis, vertex-session, encrypted-session |
adk-surface | adk-tool | genui-apps |
adk-telemetry | google-cloud-auth, http, tokio, tonic | gcp |
adk-tool | adk-gcp, google-cloud-auth, reqwest | http-transport, slack, example-store, vertex-agent-registry |
Exhaustive matches
These enums gain variants and are not #[non_exhaustive], so an exhaustive match needs the
new arms:
| Enum | Crate | New variants |
|---|---|---|
ErrorCategory | adk-core | ResourceExhausted (HTTP 429), Conflict (HTTP 409) |
GuardrailError | adk-guardrail | Blocked |
ClientError | adk-gemini | ErrorInResponse; BadResponse gains retry_after |
Error | adk-anthropic | none; RateLimit, ServiceUnavailable and Timeout gain status_code, and Api and InternalServer gain retry_after, so a pattern that names every field ends with .. |
ThinkingConfig | adk-anthropic | BetweenTools |
ModelProvider | adk-model | Bedrock, AzureAi, Muse, Openrouter, Opencode, OpencodeGo |
ThinkingMode | adk-model (anthropic) | BetweenTools |
A2aError | adk-server (a2a-v1) | ConcurrentModification |
SsoError | adk-auth (sso) | AuditFailed |
RealtimeError | adk-realtime | OutputBlocked, SpendRefused |
RagError | adk-rag | InvalidScope, UnsupportedFilter |
DevToolError | adk-devtools | Excluded, Stale |
schema::Part | adk-eval | Image |
BenchError | adk-bench | Vision |
AwpConfigError | adk-awp | Serialize |
AcpError | adk-acp | Unsupported |
AcpServerError | adk-acp (server) | AuthRequired, Unsupported |
composition::CompositionError | cargo-adk | UnsupportedProvider |
ContentBlock | adk-anthropic | CodeExecutionToolResult, BashCodeExecutionToolResult, TextEditorCodeExecutionToolResult, Compaction, ToolAddition, ToolRemoval, Unknown |
MessageRole | adk-anthropic | System (a mid-conversation system message) |
ContentBlockDelta, MessageStreamEvent | adk-anthropic | Unknown |
StopReason | adk-anthropic | Compaction, Unknown(String) |
ToolUnionParam | adk-anthropic | WebSearch20260209, WebFetch20260209, ComputerToolset20260801, BrowserToolset20260801, Computer20251124, Computer20250124, Advisor20260301 |
Content | adk-anthropic | BrowserState |
WebFetchErrorCode | adk-anthropic | UrlTooLong, UrlNotAccessible, UnsupportedContentType; Unknown becomes Unknown(String) |
WebSearchErrorCode | adk-anthropic | RequestTooLarge, Unknown(String) |
WebhookVerifyError | adk-anthropic (managed-agents) | MissingHeader, TimestampInFuture |
TaskState | adk-server | AuthRequired |
V1ClientError | adk-server (a2a-v1) | CardEndpoint, Credential |
ServerStatus | adk-tool (mcp) | Starting |
auth::PaymentOperation | adk-payments | ExecutePayment |
These enums become #[non_exhaustive], so a match on them outside their crate needs a wildcard
arm:
| Enum | Crate | New variants |
|---|---|---|
FinishReason | adk-core | Refusal, MalformedToolCall |
FinishReason | adk-gemini | none |
GraphError | adk-graph | AgentFailed, FanInIncomplete, CheckpointConflict, Suspended, Cancelled, ResumeRejected; DatabaseError is removed |
EvalError | adk-eval | Refused |
OutputChunk | adk-acp | plans, notices, compactions, mode, config, command and session-info changes, user text, subagents; Done becomes Done { stop_reason, usage } |
SandboxError | adk-sandbox | Unsupported, Remote (with workspace) |
background::RunStatus | adk-server | Waiting |
ServerTool | adk-anthropic | ComputerUse20251124, ComputerToolset20260801, BrowserToolset20260801 |
use adk_core::{AdkError, ErrorCategory};
fn next_step(error: &AdkError) -> &'static str {
match error.category {
ErrorCategory::InvalidInput | ErrorCategory::Unsupported => "fix the request",
ErrorCategory::Unauthorized | ErrorCategory::Forbidden => "check the credentials",
ErrorCategory::NotFound => "check the id",
ErrorCategory::RateLimited | ErrorCategory::Timeout | ErrorCategory::Unavailable => {
"retry later"
}
ErrorCategory::Cancelled => "stop",
ErrorCategory::Internal => "report a bug",
// New in 3.0
ErrorCategory::ResourceExhausted => "raise the budget or stop",
ErrorCategory::Conflict => "reload and retry",
}
}
adk-core and adk-runner
LlmRequest::tools keeps declaration order
LlmRequest::tools is an adk_core::ToolDeclarations instead of a
HashMap<String, serde_json::Value>. It keeps the order the agent declares its tools in —
static tools, then each toolset's — and every provider sends them in that order.
CacheCapable::create_cache and GeminiModel::create_cached_content take
&ToolDeclarations. A custom Llm, a cache
implementation, and a before_model_callback that names the map type change it:
use std::collections::HashMap;
use serde_json::Value;
// 2.3
fn tool_names(tools: &HashMap<String, Value>) -> Vec<String> {
let mut names: Vec<String> = tools.keys().cloned().collect();
names.sort();
names
}
use adk_core::{LlmRequest, ToolDeclarations};
use serde_json::json;
// 3.0
fn tool_names(tools: &ToolDeclarations) -> Vec<String> {
// Already in declaration order.
tools.keys().cloned().collect()
}
fn declare_lookup(request: &mut LlmRequest) {
request.tools.insert("lookup_order".to_string(), json!({ "name": "lookup_order" }));
}
insert, get, contains_key, remove, iter, keys, values, len and is_empty work
as on a HashMap, ToolDeclarations collects from (name, declaration) pairs, and
tools: Default::default() still fills an LlmRequest literal. Anthropic, Bedrock and the
OpenAI clients no longer sort tools by name, so a prompt-cache prefix written before the
upgrade misses once.
Tool retries follow the declared effect
A RetryBudget retried every failed call, including one that timed out after its side effect
happened. LlmAgent and CodeActAgent now retry only a tool whose Tool::effect() is
ReadOnly or Idempotent, and only after a retryable error or a timeout. A tool that declares
nothing and is not is_read_only() is NonIdempotent and runs once. Declare the effect to keep
retrying a tool — #[tool(idempotent)], FunctionTool::with_effect, or Tool::effect:
use adk_core::ToolEffect;
use adk_tool::FunctionTool;
use serde_json::json;
let lookup = FunctionTool::new("lookup_order", "Looks up an order", |_ctx, args| async move {
Ok(json!({ "order": args["id"] }))
})
.with_effect(ToolEffect::Idempotent);
The delay ceiling now doubles per retry up to RetryBudget::max_delay (30 seconds by default),
and each delay is drawn from the upper half of that ceiling. Build the budget with its
constructor:
use std::time::Duration;
use adk_core::RetryBudget;
// 2.3
let budget = RetryBudget { max_retries: 2, delay: Duration::from_millis(500) };
use std::time::Duration;
use adk_core::RetryBudget;
// 3.0
let budget = RetryBudget::new(2, Duration::from_millis(500))
.with_max_delay(Duration::from_secs(5));
An AgentTool delegation no longer stops at the parent agent's tool_timeout; set
AgentTool::timeout to bound it. A delegation that runs past that timeout is a tool error with
ErrorCategory::Timeout, not an {"error": ...} result.
Interrupted calls report an unknown outcome
A non-idempotent call that times out or panics, and a call still in flight when a run is
cancelled, is answered with {"status": "outcome_unknown", ...} instead of {"error": ...}, so
the model does not call it again. Code that reads function responses detects it with
adk_core::is_outcome_unknown.
Approval fingerprints name the agent and the tool
ToolConfirmationRequest::fingerprint() now covers the acting agent's id and the tool's
origin as well as the tool name and arguments, so an approval for one agent's call does not
authorize another agent's call with the same arguments. A fingerprint built with
tool_call_fingerprint(name, args), or from a request without an acting agent, matches no
call, and the call stays held; RunConfigBuilder::tool_approval refuses one. Take the
fingerprint from the request the held call surfaced, or build it for the agent and tool:
use adk_core::tool_call_fingerprint;
// 2.3
let fingerprint = tool_call_fingerprint(transfer.name(), &args);
use adk_core::{ActingContext, AgentPrincipal, ToolConfirmationRequest};
// 3.0
// From the request the held call surfaced:
let fingerprint = request.fingerprint();
// Or built for a known agent and tool:
let fingerprint = ToolConfirmationRequest::for_tool(transfer.as_ref(), args)
.with_acting_context(ActingContext::new(AgentPrincipal::derived("ops", "treasurer")))
.fingerprint();
A call held under 2.3.0 records no agent or origin, so it is answered as not run when a decision resumes it; re-issue it.
Held calls are answered and resumed
- Enhanced plugins, runner hooks, and
BeforeToolCallbacks run before the policy, guardrails, and confirmation, so an approval covers the arguments that execute, and theToolConfirmationRequestcarries them. - A call awaiting confirmation without a handler receives
confirmation_pending_response("status": "confirmation_pending"), and the turn's other calls run before the run ends. - The next run executes an approved held call under its original call ID, so the model does not need to issue it again.
SequentialAgent,LoopAgent,ParallelAgent,ConditionalAgent, andLlmConditionalAgentstop at a held call and resume at the sub-agent that held it, instead of running their later sub-agents in the same run.- Compaction stops before the earliest held call, so a custom
CompactionStrategyreceives fewer events while a call is undecided. - A
ToolConfirmationHandlerdecision that takes longer thanRunConfig::tool_confirmation_timeout(five minutes by default) leaves the call waiting in the run's approval store, or denies it when the run has none or setsRunConfig::deny_on_confirmation_timeout, and decisions in one batch run concurrently. A handler that prompts on a shared device serializes its own prompts.
Wrappers forward the new trait methods
A type that wraps another and implements the trait itself must forward the new methods, or it reports the trait default instead of the wrapped value.
Tool gains effect(), origin(), annotations(), timeout_override(), egress(),
approval_evidence(), and batch_group(). Without forwarding, a wrapped tool is
NonIdempotent, its approvals bind to the "static" origin, its annotations are lost, a run
with an egress policy refuses it as undeclared, a held call shows no evidence, and its calls no
longer stop at the first failure in an ordered batch:
use std::time::Duration;
use adk_core::ToolEffect;
use adk_core::egress::ToolEgress;
use serde_json::Value;
fn effect(&self) -> ToolEffect {
self.inner.effect()
}
fn origin(&self) -> &str {
self.inner.origin()
}
fn annotations(&self) -> Option<&Value> {
self.inner.annotations()
}
fn timeout_override(&self) -> Option<Option<Duration>> {
self.inner.timeout_override()
}
fn egress(&self, args: &Value) -> ToolEgress {
self.inner.egress(args)
}
fn approval_evidence(&self, args: &Value) -> Vec<adk_core::Evidence> {
self.inner.approval_evidence(args)
}
fn batch_group(&self) -> Option<adk_core::BatchGroup> {
self.inner.batch_group()
}
ReadonlyContext gains acting_context(). A context wrapper that does not forward it reports
the derived identity (urn:adk:agent:{app}/{agent}) instead of the configured principal:
use adk_core::ActingContext;
fn acting_context(&self) -> ActingContext {
self.inner.acting_context()
}
Llm gains context_window(), which auto-compaction reads to set its threshold. A model
wrapper that does not forward it compacts at the 100,000-token default instead of near the
wrapped model's window:
fn context_window(&self) -> Option<u64> {
self.inner.context_window()
}
Llm also gains native_compaction(), which tells auto-compaction that the model's provider
writes the summary itself. A wrapper that does not forward it compacts with the runner's
summarizer instead:
use adk_core::NativeCompaction;
fn native_compaction(&self) -> Option<NativeCompaction> {
self.inner.native_compaction()
}
Llm also gains data_locality(), which says whether a call's data leaves the process or the
machine. A wrapper that does not forward it reports Remote, so a guardrail gates a local
model's calls as if they left the machine:
use adk_core::DataLocality;
fn data_locality(&self) -> DataLocality {
self.inner.data_locality()
}
Agent gains screen_user_input, which the runner calls on the root agent before it saves a
user message. Its default screens with sub_agents(), so an agent that runs another without
listing it as a sub-agent delegates to it:
use adk_core::{Content, Result};
async fn screen_user_input(&self, content: &Content) -> Result<Option<Content>> {
self.inner.screen_user_input(content).await
}
Agent also gains allows_transfer_to_parent and allows_transfer_to_peers, which the
runner reads when it checks a transfer, and profile, from which A2A v1 cards build their
skills. A wrapper that does not forward them allows both transfers and reports a custom agent:
use adk_core::AgentProfile;
fn allows_transfer_to_parent(&self) -> bool {
self.inner.allows_transfer_to_parent()
}
fn allows_transfer_to_peers(&self) -> bool {
self.inner.allows_transfer_to_peers()
}
fn profile(&self) -> AgentProfile {
self.inner.profile()
}
Instructions travel as system contents
LlmAgent sends its global instruction, instruction, and output-schema directive with role
"system" instead of "user". A custom Llm implementation maps system contents to its
provider's system prompt.
Run lifecycle
- Transfers obey the source agent's restrictions. A transfer that a tool or a custom agent
requests is checked like the model's
transfer_to_agentcall: to a sub-agent, to the parent unlessdisallow_transfer_to_parent, or to a peer unlessdisallow_transfer_to_peers. Any other target is refused and control stays with the source; a root withstrict_transfer_policy()fails the run withagent.transfer.target_forbidden. after_agentruns on every exit except a failure or a held call, including a transfer, a turn-ending tool result, and a cancellation, so after-agent callbacks see these exits. Plugins'after_runruns once, after the run's last event, also when the consumer drops the stream.- Input guardrails of every agent in the tree screen each user message before it is saved. An input guardrail on a sub-agent, workflow step, or transfer target screens the message for the whole run instead of only when that agent runs, and a blocked message is not saved.
- Runner plugins' agent, model, and tool callbacks run. A
PluginManageron the runner had only its run, user-message, and event callbacks called. Itsbefore_agent,after_agent,before_model,after_model,before_tool,after_tool, andon_tool_errornow run ahead of each agent's own, and a callback that returns a value short-circuits the agent's callbacks of that kind. adk_runner::Callbacksis removed, with itsBeforeModelCallback,AfterModelCallback,BeforeToolCallback, andAfterToolCallbackaliases; the runtime never called them. Register callbacks on the agent builder or as runner plugins.${x},\{x}, and{{x}}in instructions stay literal. Only{var},{var?}, and{artifact.name}are substituted.
History sent to the model
- Workflow sub-agents see other agents' turns as context. An
LlmAgentwithout transfer targets, such as aSequentialAgentstep, receives another agent's text, calls, and results as quoted user-role context instead of as its own model turns. Code that matched the old request shape needs updating. - Calls without IDs get generated
adk-call-IDs. A function call a provider sends without an ID carries a generated ID (adk_core::GENERATED_CALL_ID_PREFIX) in the saved event, its responses, andToolContext::function_call_id(), instead of{invocation}_{name}_{index}. Model requests leave the generated IDs out. - A model turn without an answer fails the run with
model.empty_response, instead of succeeding with no output: a final turn with no parts, only thinking, or only whitespace. - History is compacted before each model call. Auto-compaction is on by default: once a
request passes 80% of the model's context window, or 100,000 estimated tokens, the agent's
history is summarized and the compaction recorded in the session. The runner no longer
compacts once before the agent runs or retries
agent.run()on a token-limit error.Runner::builder().without_intra_compaction()restores the uncompacted history; see Context Compaction. On a model whose provider compacts conversations itself, such as Claude Sonnet 5.5 on the Claude API, the provider writes the summary and its signed block opens later requests;IntraCompactionConfig::with_native(false)keeps the runner's summarizer. - Model events carry one bounded copy of the request (
trace_payload_max_bytes, full only withrecord_payloads) and nogcp.vertex.agent.llm_requestprovider metadata. Withrecord_payloadsoff, thecall_llmspan and the DEBUG tool-call logs record a marker instead of the first 2 KB of each payload. - An agent that can transfer is told what each target does. An
LlmAgentwith transfer targets adds a system instruction after its own that lists each target with its description. - Provider-native items replay only to the provider and model that produced them. Thinking
and its signatures, server-side tool calls and preserved provider messages reach no other
provider or model, and A2A responses no longer carry
server_tool_callorserver_tool_responsedata parts.
adk-agent
Tool failures reach the model without their message
A tool that returns Err, or a before-tool callback that fails, is answered with the error's
component, category, and code — {"error": "tool '<name>' failed: <component>.<category> (<code>)"}
— instead of its message, so connection strings and upstream bodies stay out of model requests
and sessions. The message still reaches on_tool_error and ToolOutcome::error. An error with
code tool.invalid_arguments keeps its text.
When an after-tool callback or plugin fails after the tool ran, the call is answered with
adk_core::result_withheld_response ("status": "result_withheld") instead of the callback's
error, so the model does not repeat the side effect.
A failing toolset no longer fails the turn
When a toolset's tools() call fails, LlmAgent skips that toolset, logs a warning, and runs
the model with the tools that resolved. Both 2.3.0 behaviours are one builder call away:
use adk_agent::LlmAgentBuilder;
let agent = LlmAgentBuilder::new("assistant")
.model(model)
.toolset(toolset)
// Fail the turn when a toolset cannot list its tools, as 2.3.0 did.
.strict_toolsets(true)
// Send tool error messages to the model, as 2.3.0 did.
.expose_tool_error_messages(true)
.build()?;
A refusal ends the run with an error
A model that declines finishes with FinishReason::Refusal on every provider — Anthropic's
refusal stop reason was Safety, an OpenAI Chat Completions refusal was Safety, and a
Responses refusal part was Stop. LlmAgent and CodeActAgent emit the model's event, so the
session keeps the refusal text, and then end the run with model.refusal
(ErrorCategory::Forbidden); no tool call of that turn runs. A Chat Completions refusal was the
run's successful answer in 2.3.0, so adk-rust code and adk-rust goal now exit 1 on one.
A tool call the provider reports as invalid — Gemini MALFORMED_FUNCTION_CALL and
UNEXPECTED_TOOL_CALL, Bedrock malformed_tool_use — finishes with
FinishReason::MalformedToolCall and ends the run with model.malformed_tool_call.
A chat surface that showed the refusal as the answer reads it from the run's last model event:
use adk_core::{AdkError, Event, FinishReason};
fn refusal_text(events: &[Event], error: &AdkError) -> Option<String> {
if error.code != "model.refusal" {
return None;
}
let event = events
.iter()
.rev()
.find(|event| event.llm_response.finish_reason == Some(FinishReason::Refusal))?;
let content = event.llm_response.content.as_ref()?;
Some(content.parts.iter().filter_map(|part| part.text()).collect())
}
Skills are not a default feature
adk-agent and adk-runner no longer enable skills by default, so a project that depends on
either crate directly compiles no adk-skill. The skill methods on the agent builders
(with_skills, with_auto_skills, with_skills_from_root, with_skill_policy,
with_skill_budget) and on Runner (with_skill_injector, with_auto_skills_mut) need the
feature on the crate that provides them:
[dependencies]
adk-agent = { version = "3.0.0", features = ["skills"] }
adk-runner = { version = "3.0.0", features = ["skills"] }
Through adk-rust, the skills feature (in standard and above) enables both.
Other agent changes
- A panicking before-tool callback answers the call
not runwithcallback.panicked, inLlmAgent,CodeActAgentandEnhancedPluginManager, instead of unwinding through the agent. - Two static tools with one name fail the build.
LlmAgentBuilder::build,CodeActAgentBuilder::build, and the realtime builders returnagent.duplicate_tool_nameinstead of letting the last registration win. Rename one tool or register it once. - Team cost caps fail closed.
TeamBudget::max_cost_microusdis enforced against priced usage, and a response with no known cost stops the team unlessallow_unpriced_modelsis set. Team budget errors useErrorCategory::ResourceExhausted(codesbudget.*) instead of the retryableRateLimited.
use adk_agent::TeamBudget;
let budget = TeamBudget {
max_cost_microusd: Some(2_000_000),
// Count a response with no known cost as free instead of stopping the team.
allow_unpriced_models: true,
..TeamBudget::default()
};
adk-tool and adk-rust-macros
Tool arguments are checked against the schema
#[tool] validates each call against its parameters schema before the function runs, with
additionalProperties: false on every object that declares all its fields. An undeclared key, a
value outside a range, length, or pattern bound, or a missing required field fails the call
with tool.invalid_arguments, which the model can correct; serde used to drop unknown keys and
the bounds were never enforced. FunctionTool and StatefulTool with
with_parameters_schema::<T>() validate the same way. A tool that accepts input its schema does
not describe, such as a #[serde(alias)] key, opts out:
use adk_tool::{AdkError, tool};
use schemars::JsonSchema;
use serde::Deserialize;
use serde_json::{Value, json};
#[derive(Deserialize, JsonSchema)]
struct LookupArgs {
/// The order to look up.
#[serde(alias = "orderId")]
order_id: String,
}
/// Looks up an order, accepting the legacy `orderId` key.
#[tool(lenient_args)]
async fn lookup_order(args: LookupArgs) -> Result<Value, AdkError> {
Ok(json!({ "order_id": args.order_id }))
}
use adk_tool::FunctionTool;
use schemars::JsonSchema;
use serde::Serialize;
#[derive(Serialize, JsonSchema)]
struct LookupArgs {
order_id: String,
}
let tool = FunctionTool::new("lookup_order", "Looks up an order", |_ctx, args| async move {
Ok(args)
})
.with_parameters_schema::<LookupArgs>()
.with_lenient_args(true);
MCP
SimpleClient::inner returns the shared connection, since requests no longer go through a mutex:
// 2.3
let peer = client.inner().lock().await.peer().clone();
// 3.0
let peer = client.inner().peer().clone();
should_refresh_connection takes the rmcp::ServiceError instead of its text, and reconnects
only on a closed transport, a broken connection, an interrupted stream, an expired session, or an
HTTP 401:
use adk_tool::mcp::should_refresh_connection;
// 2.3
let reconnect = should_refresh_connection(&error.to_string());
use adk_tool::mcp::should_refresh_connection;
// 3.0
let reconnect = should_refresh_connection(&error);
OAuth2Config sends the client-credentials request only to an https token URL, or http on
localhost or a loopback address; any other URL fails with AuthError::TokenFetch.
McpServerManager reports a server whose handshake is in progress as ServerStatus::Starting,
and a server that has not finished its handshake within with_startup_timeout (30 seconds by
default) is FailedToStart. Raise the timeout for a server that downloads a package on its first
start. McpToolset caches a server's tools/list for 60 seconds; a server that changes its
tools without sending notifications/tools/list_changed needs with_tool_list_cache_ttl or
invalidate_tool_list_cache().
AgentTool
A delegation that runs past AgentTool::timeout is a Timeout tool error in every
AgentToolFailureMode. In the default ReturnErrorObject mode a failed delegation's object
names the error's component, category and code instead of its message;
AgentTool::expose_error_messages(true) restores the message. Under AgentToolFailureMode::Propagate, a failed delegate's error keeps
its category and code instead of becoming tool.legacy. The delegate's session_id() is its
caller's session ID instead of an agent-tool-{uuid} ID.
adk-model
-
Unsupported generation settings fail by name. The OpenAI Chat Completions, OpenAI Responses, Anthropic, Bedrock, Groq, DeepSeek, and Azure AI Inference clients dropped
stop_sequences,seed,frequency_penalty,presence_penalty, andtop_logprobs. Each now sends the ones its API supports and fails a request that sets any other withmodel.unsupported_configbefore sending it; remove that field from the provider'sGenerateContentConfig. -
GeminiModel,OllamaModel, and OpenRouter send the same settings.GeminiModelandOllamaModelnow send all five. Current Gemini models (gemini-3.5-flash-lite,gemini-3.8-flash) answer penalties and log probabilities withINVALID_ARGUMENT, so a Gemini config that set them fails withErrorCategory::InvalidInputwhere it ran without them; remove them. The Gemini Interactions transport and OpenRouter's Responses mode fail withmodel.unsupported_configon the fields their APIs lack (penalties andtop_logprobs;seed).adk_gemini::GenerationConfigandadk_gemini::Candidategain fields, so struct literals end with..Default::default(). -
A request's
effortwins over the client's.GenerateContentConfig::effortis new; a request that sets it runs at that level on every client with an effort control, whatever the client was built with (see Per-Call Reasoning Effort).OpenAIClientbuilt with reasoning effortNonesends a GPT-5.6 tool call that sets an effort through the Responses API. -
Bedrock
prompt_token_countincludes cache reads and writes, asAnthropicClientreports it. Code that added the cache counts itself counts them twice. -
The
openaifeature enablesasync-openai'sbyotfeature. An application that also callsasync-openai0.41 directly setsstream: Some(true)on requests it passes tocreate_stream. -
Groq presets for delisted models are removed.
GroqConfig::llama8b,GroqConfig::mixtral,GroqConfig::gemma,GroqClient::llama8b, andGroqClient::mixtralselected models Groq no longer serves. UseGroqConfig::gpt_oss_20b,GroqConfig::gpt_oss_120b, orGroqConfig::new(key, model). -
The Gemini Interactions allowlist names current models.
InteractionTarget::parseandGeminiModel::use_interactions_api(true)refusegemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite, andgemini-3-flash-previewwithmodel.gemini.interactions.unsupported_target;gemini-3.8-flashis accepted. -
Server retry hints are bounded.
RetryConfig::max_server_delay(60 seconds by default) is the longestRetry-Afterthe retry executor waits for; a longer hint returns the error at once instead of waiting a shortened delay. HTTP 520 to 524 are retryable.
Default models
ModelProvider::default_model returns Option<&'static str>: None for Bedrock and
AzureAi, whose model or deployment ID depends on the account, region or endpoint:
use adk_model::ModelProvider;
// 2.3
let model: &str = ModelProvider::Gemini.default_model();
use adk_model::ModelProvider;
// 3.0
fn model_for(provider: ModelProvider, configured: Option<String>) -> Option<String> {
configured.or_else(|| provider.default_model().map(str::to_string))
}
The catalog defaults move to current models, so a client, template or judge built without a model ID calls a different model. Pin the model ID to keep the earlier one.
| Default | 2.3.0 | 3.0.0 |
|---|---|---|
catalog::GEMINI_DEFAULT, adk_gemini::Model::default() | gemini-3.7-flash | gemini-3.8-flash |
catalog::OPENAI_DEFAULT | gpt-5.6-terra | gpt-6.1-sol |
catalog::ANTHROPIC_DEFAULT | claude-sonnet-5 | claude-sonnet-5-5 |
BedrockConfig::default() | us.anthropic.claude-sonnet-4-6 | us.anthropic.claude-sonnet-5-5 |
catalog::XAI_DEFAULT | grok-4.6 | grok-4.7 |
catalog::MISTRAL_DEFAULT | mistral-medium-latest | mistral-large-latest |
catalog::FIREWORKS_DEFAULT | accounts/fireworks/models/kimi-k2p6 | accounts/fireworks/models/kimi-k3 |
catalog::TOGETHER_DEFAULT | MiniMaxAI/MiniMax-M2.7 | moonshotai/Kimi-K3.1-Pro |
catalog::MINIMAX_DEFAULT | MiniMax-M2.7 | MiniMax-M3 |
catalog::ZHIPU_DEFAULT | glm-5.2 | glm-5.3 |
OpenAIResponsesClient always uses HTTP
ResponsesTransport, OpenAIResponsesConfig::transport, and with_transport are removed; the
option was never read. WebSocket mode is WsTransport (openai-ws feature):
use adk_model::openai::{OpenAIResponsesClient, OpenAIResponsesConfig, ResponsesTransport};
// 2.3
let config = OpenAIResponsesConfig::new(api_key, "gpt-6.1-sol")
.with_transport(ResponsesTransport::WebSocket);
let client = OpenAIResponsesClient::new(config)?;
use adk_model::openai::{OpenAIResponsesClient, OpenAIResponsesConfig, WsTransport};
// 3.0, with the `openai-ws` feature
let config = OpenAIResponsesConfig::new(api_key, "gpt-6.1-sol");
let client = OpenAIResponsesClient::new(config.clone())?.with_websocket(WsTransport::new(&config)?);
AnthropicConfig::max_tokens is optional
None, the default, requests 64,000 output tokens from Claude 5, Opus 4.6 to 4.8 and Sonnet 4.6
(128,000 at xhigh or max effort), 32,000 from earlier Claude 4 models and 4,096 from others,
instead of a fixed 4,096 that left always-thinking Claude 5 models stopping before the answer:
use adk_model::anthropic::AnthropicConfig;
// 2.3
let config = AnthropicConfig::new(api_key, "claude-sonnet-5-5");
let limit: u32 = config.max_tokens;
use adk_model::anthropic::AnthropicConfig;
// 3.0
let config = AnthropicConfig::new(api_key, "claude-sonnet-5-5");
// `None` resolves per model: 64,000 for current models, 32,000 for earlier Claude 4, 4,096 otherwise.
let limit: Option<u32> = config.max_tokens;
let config = config.with_max_tokens(8_192);
adk-anthropic
- New API values no longer fail the turn. A content block, delta, stream event, or stop
reason newer than the client is kept in the new
Unknownvariants; see exhaustive matches. StopReasonandUsageare no longerCopy; clone them where they were copied.StopReason::from_stris infallible.BatchResult::Succeededboxes its message:messageis aBox<Message>; construction wraps it inBox::new, and code that moves it out dereferences the box.StopReasonParseErroris removed, since parsing a stop reason no longer fails.- Errors carry transport metadata.
Error::RateLimitandError::ServiceUnavailablegainstatus_code,Error::Timeoutan optionalstatus_code, andError::ApiandError::InternalServergainretry_after. The constructors keep their signatures; code that builds a variant directly adds the field, and a pattern ends with... MessageandMessageDeltagainstop_details, the refusal details of a refused turn, andThinkingConfiggainsBetweenTools(adk_model::anthropic::ThinkingModetoo).
Managed Agents
define_outcome sends the documented body: a description and a rubric instead of criteria.
Pass former criteria as OutcomeRubric::text:
// 2.3
client.define_outcome(session_id, "The report cites three sources.").await?;
use adk_anthropic::managed_agents::OutcomeRubric;
// 3.0
client
.define_outcome(
session_id,
"A research report",
OutcomeRubric::text("The report cites three sources."),
)
.await?;
Webhook verification follows Standard Webhooks. verify_webhook takes the webhook-id,
webhook-timestamp, and webhook-signature headers instead of one signature string;
WebhookHeaders::from_header_map reads them from an HTTP header map:
use adk_anthropic::managed_agents::verify_webhook;
// 2.3
let event = verify_webhook(body, signature, secret)?;
use adk_anthropic::managed_agents::{WebhookHeaders, verify_webhook};
// 3.0
let headers = WebhookHeaders {
id: webhook_id,
timestamp: webhook_timestamp,
signature: webhook_signature,
};
let event = verify_webhook(body, headers, secret)?;
Defaults deny network egress. CreateEnvironmentParams::cloud creates limited networking with no
allowed hosts; use cloud_limited(name, hosts) or cloud_unrestricted(name).
ToolConfig::agent_toolset and agent_toolset_with_policy leave out web_fetch and
web_search; ToolConfig::agent_toolset_with_web enables all eight tools.
adk-gemini
ClientError gains ErrorInResponse, which reports an error object inside a successful
response, and ClientError::BadResponse gains retry_after: Option<String>, the raw
Retry-After header. GroundingMetadata, GroundingSegment, UsageMetadata,
interactions::Usage, GenerationConfig, and Candidate gain fields, and FinishReason is
#[non_exhaustive]. See struct literals and
exhaustive matches.
use adk_gemini::ClientError;
// 3.0
fn is_unavailable(error: &ClientError) -> bool {
matches!(error, ClientError::BadResponse { code: 503, .. })
}
adk-session
Rewind takes the full session identity, so one user's rewind cannot truncate another user's session with the same ID:
// 2.3
let session = sessions.rewind_steps("session-1", 2).await?;
use adk_core::{AdkIdentity, AppName, SessionId, UserId};
// 3.0
let identity = AdkIdentity::new(
AppName::try_from("support")?,
UserId::try_from("user-1")?,
SessionId::try_from("session-1")?,
);
let session = sessions.rewind_steps(&identity, 2).await?;
createfor an existing session fails withsession.already_exists(ErrorCategory::Conflict) on every backend and writes nothing. The in-memory and Redis backends replaced the session. CheckAdkError::is_conflict()where a create may race.delete_all_sessionsalso deletes the user'suser:state in the app, on every backend; Vertex AI implements it by deleting each session. Keep a value that must outlive the user's sessions inapp:state or outside the session store. The trait's default implementation returnssession.delete_all.unsupported(ErrorCategory::Unsupported).sql_schema_versionandschema_version()report read failures as errors instead of version 0; they return 0 only when the registry table does not exist.- SQL migration steps are
'static:migration::sqlite_runner::run_sql_migrationsandmigration::pg_runner::run_sql_migrationstake&'static [(i64, &'static str, &'static str)]. Declare custom steps as aconstorstaticslice. - SQLx 0.9: applications that share pools or call the migration runners update their SQLx dependency; see SQLx 0.9 in ADK-Rust 3.0.
- A custom
SessionServiceimplements history primitives, not rewind.rewindandrewind_stepsare provided methods built onrewrite_history, andforkonhistoryandimport_session. Implement those three to support history operations; plan withSessionHistory::rewriteandSessionHistory::forkinside the backend's transaction. The defaults returnsession.history.unsupported, which replacessession.rewind.unsupported. See Fork, Rewind, and Edit History. - Rewinds keep tool calls paired and stop at held calls: a rewind that would keep a tool
call without its response fails with
session.history.splits_tool_call, and a rewind of a session holding a call for a decision fails withsession.history.held_call. - PostgreSQL migration 3 adds
sessions.initial_state; runmigrate()after upgrading. - Invalid identifiers fail with
session.invalid_identifier. An empty, oversized, or NUL-containing app name, user ID, or session ID fails on every backend, in the encrypted wrapper, and inRunner::run_strwithsession.invalid_identifier(ErrorComponent::Session,ErrorCategory::InvalidInput, HTTP 400) instead ofconfig.legacy, soAdkError::is_config()isfalsefor it.VertexAiSessionServicereports an empty identifier with this code instead ofsession.vertex.invalid_input.
adk-artifact
-
Artifact versions are immutable. A save with
version: Some(n)for an existingnfails withartifact.version_exists(ErrorCategory::Conflict) instead of replacing it; save withversion: Noneto add a version. -
The session id
useris reserved for user-scoped artifacts and is rejected withartifact.reserved_session_id. -
FileArtifactServicewrites a new on-disk layout; see before you upgrade. -
Errors are typed on every backend.
InMemoryArtifactServiceandFileArtifactServicereported these failures asartifact.legacy(ErrorCategory::Internal):Failure 3.0 code Category Missing artifact or version artifact.not_foundNotFound, soAdkError::is_not_found()istrueInvalid file name, such as ../escape.txtartifact.invalid_nameInvalidInputInvalid app name, user ID, or session ID artifact.invalid_identifierInvalidInputFileArtifactServicefilesystem failureartifact.file.ioInternalGcsArtifactServiceuses the same codes for the same failures instead ofartifact.gcs.not_foundandartifact.gcs.invalid_input, which remain for failed GCS requests.
adk-memory and adk-rag
PgVectorStore accepts collection names of 1 to 59 ASCII lowercase letters, digits, and
underscores, and returns RagError::VectorStoreError for any other name; 2.3.0 rewrote invalid
characters to _, so docs-v1 and docs_v1 shared one table. PgVectorStore::new returns
adk_rag::Result. The SQLx and pgvector feature changes are in the
SQLx 0.9 guide.
AgentRetrievalStore refuses a collection name it would have rewritten onto another collection,
with RagError::VectorStoreError:
| Store | 2.x | 3.0 |
|---|---|---|
AgentRetrievalStore | Lowercased, replaced other characters with -, and truncated to 63, so Docs, docs, and docs_ could share a collection | Accepts ASCII lowercase letters, digits, and underscores; _ becomes - in the collection ID, so my_docs still reaches the collection 2.x named my-docs |
QdrantVectorStore stores each chunk under the UUID v5 of its chunk ID and keeps the chunk ID in
the point's chunk_id payload; 2.x used the chunk ID as the point ID, which Qdrant refused unless
it was a UUID. A collection written by 2.x with UUID chunk IDs is still searchable, but upserts
and deletes now address the derived point IDs, so re-ingest it.
RagTool (rag_search) answers each result as {"id", "document_id", "text", "metadata", "score"} instead of the whole SearchResult, so embedding vectors no longer reach the model. A
top_k argument goes through RagPipeline::query_with_top_k, which reranks and applies the
similarity threshold as query does, and a missing query or a top_k that is not a positive
integer fails with tool.invalid_arguments.
RagTool searches only its configured collections. RagTool::new(pipeline, "kb") has no
collection argument and refuses a call that names another collection with
tool.invalid_arguments; 2.x searched whatever collection the model named. To let the model
choose, list the collections:
use std::sync::Arc;
use adk_rag::{RagPipeline, RagTool};
fn search_tool(pipeline: Arc<RagPipeline>) -> RagTool {
RagTool::new(pipeline, "docs").with_allowed_collections(["faq", "changelog"])
}
RagTool is read-only and concurrency-safe, so DeclarativePolicy::allow_read_only() admits it.
Memories carry ids and expire
adk_memory::MemoryEntry has two new fields, id and expires_at, and is #[non_exhaustive]:
use adk_core::Content;
use adk_memory::MemoryEntry;
// 2.x
// let entry = MemoryEntry { content, author: "user".to_string(), timestamp: chrono::Utc::now() };
let entry = MemoryEntry::new(Content::new("user").with_text("Prefers email"), "user");
| Change | 2.x | 3.0 |
|---|---|---|
MemoryService | — | delete_memory(app, user, id) and purge_expired(), with defaults that return an error; a wrapper forwards both |
| Search and listing | Returned every stored entry | Skip entries whose expires_at has passed; each returned entry carries its id |
RedisMemoryConfig::ttl | Expired a whole session list, refreshed by every write to it | The default TTL of each entry written without an expiry; a list key expires with its latest entry |
| Schema | — | Migration 3 adds memory_id and expires_at to SQLite and PostgreSQL, and indexes to MongoDB (a TTL index on expires_at) and Neo4j; the knowledge graph's migration 2 adds them to its episodic log. migrate() applies them and gives existing entries ids |
The SurrealDB vector store is removed
SurrealVectorStore and the surrealdb feature of adk-rag are removed, and full no longer
enables them. The backend's dependency tree carried RUSTSEC-2026-0453 and RUSTSEC-2026-0454, the
second fixed only in surrealdb 4.0, and every Business Source License crate in the workspace.
| 2.x | 3.0 |
|---|---|
features = ["surrealdb"] | Remove the feature and choose another backend: pgvector, lancedb, qdrant, or agent-retrieval |
SurrealVectorStore::in_memory() | InMemoryVectorStore::new(), or LanceDBVectorStore for an embedded store on disk |
SurrealVectorStore::rocksdb(path), SurrealVectorStore::remote(url) | Another VectorStore; re-ingest the source documents into it |
A deployment that keeps SurrealDB implements VectorStore over the surrealdb crate in its own
code; the shared contract in adk-rag/tests/common/vector_store_contract.rs states what an
implementation must satisfy.
Every vector store operation names a scope
VectorStore methods take a Scope, and a stored chunk is identified by its collection, scope,
and chunk ID together. RagPipeline loses ingest, ingest_batch, query, and
query_with_top_k; they move to ScopedRag, from pipeline.scoped(scope), which adds count and
purge_scope. create_collection takes a CollectionSpec, and search a VectorQuery:
use adk_rag::{Document, RagPipeline};
// 2.3
async fn ingest_and_query(pipeline: &RagPipeline, document: &Document) -> adk_rag::Result<()> {
pipeline.ingest("docs", document).await?;
let results = pipeline.query_with_top_k("docs", "refund window", 3).await?;
Ok(())
}
use adk_rag::{Document, QueryOptions, RagPipeline, Scope};
// 3.0
async fn ingest_and_query(pipeline: &RagPipeline, document: &Document) -> adk_rag::Result<()> {
let rag = pipeline.scoped(Scope::single_tenant());
rag.ingest("docs", document).await?;
let options = QueryOptions::new().with_top_k(3);
let results = rag.query_with("docs", "refund window", &options).await?;
Ok(())
}
A multi-tenant application builds the scope from the authenticated tenant, for example
Scope::from_parts(["support-app", tenant_id])?, and gives it to RagTool::with_scope. A custom
VectorStore implements the scoped signatures plus count and purge_scope, and must apply the
scope inside its search, before the top k are chosen; the shared contract in
adk-rag/tests/common/vector_store_contract.rs checks this.
| Store | Stored data |
|---|---|
PgVectorStore | create_collection adds a scope column, assigns existing rows to Scope::single_tenant(), and re-keys the table by (scope, id) |
LanceDBVectorStore | Delete the collection, create it again, and re-ingest; upsert into an old table fails with that guidance |
QdrantVectorStore | Re-ingest: point IDs now derive from scope and chunk ID, and old points carry no scope |
AgentRetrievalStore | Delete the collection, create it again, and re-ingest: collections now declare a data schema, metadata is stored as metadataJson, and Data Object IDs derive from scope and chunk ID |
AgentRetrievalStore::hybrid_search takes the scope after the collection name.
A custom VectorStore also implements delete_where(collection, scope, &Filter), takes
filter: Option<&Filter> in count, and applies VectorQuery::filter in search, inside its
query and before the top k, returning RagError::UnsupportedFilter for a filter it cannot
express. Filter::matches is the reference semantics, and the shared contract's
filter_catalogue checks them.
ScopedRag::ingest replaces a document's chunks: after upserting the new chunks it deletes the
document's chunks in the scope that the new version no longer has, where 2.x left them in place.
To filter on a metadata key, declare it when creating the collection, with
RagPipeline::create_collection_with_filterable or CollectionSpec::with_filterable; LanceDB and
Agent Retrieval store each declared key as a field of its own, so their collections are created
again to add one.
Documents and chunks carry provenance
Document gains title, and Chunk gains source_uri and title. Both types are
#[non_exhaustive], so code outside adk-rag builds them with constructors:
use std::collections::HashMap;
use adk_rag::Document;
// 2.3
let document = Document {
id: "refunds".to_string(),
text: "Refunds are issued within 30 days.".to_string(),
metadata: HashMap::from([("section".to_string(), "billing".to_string())]),
source_uri: Some("https://example.com/refunds".to_string()),
};
use adk_rag::{Chunk, Document};
// 3.0
let document = Document::new("refunds", "Refunds are issued within 30 days.")
.with_metadata("section", "billing")
.with_source_uri("https://example.com/refunds")
.with_title("Refund policy");
let chunk = Chunk::from_document(&document, "refunds_0", "Refunds are issued")
.with_embedding(vec![0.1, 0.2]);
A custom Chunker builds chunks with Chunk::from_document, which copies the document's ID,
metadata, source URI, and title. Every vector store persists source_uri and title as fields of
their own, and RagTool results include them when present. Stored data:
| Store | Do this |
|---|---|
PgVectorStore | Call create_collection once; it adds the source_uri and title columns in place |
LanceDBVectorStore | Delete the collection, create it again, and re-ingest; upsert into a 2.x table fails with that guidance |
QdrantVectorStore, AgentRetrievalStore | Nothing; chunks stored by 2.x return None for both fields until re-ingested |
adk-graph
ExecutionConfig has no struct literal
ExecutionConfig gains public fields and a crate-private one, so code outside adk-graph
builds it with its constructor and builder methods:
use std::collections::HashMap;
use adk_graph::node::ExecutionConfig;
// 2.3
let config = ExecutionConfig {
thread_id: "refund-42".to_string(),
resume_from: None,
recursion_limit: 25,
metadata: HashMap::new(),
parent_context: None,
};
use adk_graph::node::ExecutionConfig;
// 3.0
let config = ExecutionConfig::new("refund-42").with_recursion_limit(25);
The graph's recursion limit bounds its runs
ExecutionConfig::recursion_limit is Option<usize>. None, the default, applies the graph's
limit — 100 unless CompiledGraph::with_recursion_limit or GraphAgentBuilder::recursion_limit
sets it — and ExecutionConfig::with_recursion_limit overrides it for one run. 2.3.0 ignored the
graph's limit and capped every run at the ExecutionConfig default of 50 super-steps, so a run
that stopped at 50 now continues to the graph's limit. Code that read the field as a usize
reads an Option.
Checkpoints carry a per-thread version
Checkpointer::save refuses a version that is not greater than every stored version of the
thread (GraphError::CheckpointConflict). A caller that saves several checkpoints on one thread
numbers them:
use adk_graph::state::{Checkpoint, State};
let first = Checkpoint::new("thread-1", State::new(), 0, vec!["plan".to_string()]);
checkpointer.save(&first).await?;
let next = Checkpoint::new("thread-1", State::new(), 1, vec![]).with_version(first.version + 1);
checkpointer.save(&next).await?;
A custom Checkpointer implements prune, which no longer has a default that kept everything.
Retention keeps what a resume needs
RetentionPolicy never removes a checkpoint a resume still needs: besides the newest, each pause
no run has resumed and each effect-log entry (checkpoint::needed_to_resume). A custom
Checkpointer gets this by selecting with RetentionPolicy::expired; one that hides checkpoint
metadata from the store it wraps pins needed_to_resume of its own view before delegating, as
adk_harness::SealedCheckpointer does.
ExecutionConfig::with_resume_from naming a checkpoint the store no longer holds fails with
GraphError::CheckpointError before any node runs. In 2.3 the run started again from the graph's
entry and failed on its first save with GraphError::CheckpointConflict.
Functional resume loads the checkpoint resume_from names
The #[entrypoint]-generated invoke loads ExecutionConfig::resume_from by checkpoint id, and
fails with GraphError::CheckpointError when the thread has no checkpoint with that id. To resume
where a thread left off, pass the id Checkpointer::load returns:
use adk_graph::node::ExecutionConfig;
// 2.3
let config = ExecutionConfig::new("refund-42").with_resume_from("latest");
use adk_graph::node::ExecutionConfig;
// 3.0
let latest = checkpointer
.load("refund-42")
.await?
.ok_or_else(|| anyhow::anyhow!("thread refund-42 has no checkpoint to resume"))?;
let config = ExecutionConfig::new("refund-42").with_resume_from(&latest.checkpoint_id);
Graph checkpoints are keyed by app, user, and session
GraphAgent runs a session on session_thread_id(app_name, user_id, session_id) and NodeTool
runs each call on tool_call_thread_id(app_name, user_id, session_id, function_call_id), instead
of the bare session id, so a user who picks another user's session id cannot resume that user's
run. Checkpoints written under a bare session id are not read. Code that loads a session's
checkpoints directly uses the new id:
// 2.3
let latest = checkpointer.load(session_id).await?;
use adk_graph::agent::session_thread_id;
// 3.0
let latest = checkpointer.load(&session_thread_id(app_name, user_id, session_id)).await?;
To keep a paused run across the upgrade, re-key its checkpoints from the bare session id to
session_thread_id(app_name, user_id, session_id); otherwise the session starts over on its next
turn.
Errors, pauses, and events
- An agent node's failure is
GraphError::AgentFailed { node, source }, andFrom<GraphError> for AdkErrorreturns the agent's own error, so a rate-limited model staysRateLimited.GraphAgentandNodeToolconvert graph errors withAdkError::frominstead of flattening them toAdkError::agentorAdkError::tool. - A functional suspension is
GraphError::Suspendedand a cancellationGraphError::Cancelled, instead ofGraphError::Other. InterruptedExecution::interruptsandSuperStepResult::interruptscarry every pause of a step, andGraphAgentyields one event per pause. Read a pause withGraphInterruptPayload::from_event.GraphAgentstreams its agent nodes' events under the turn's invocation id, and every event it builds carries that id instead of"graph_output"or"graph_interrupted".SubgraphNodethreads become<parent thread>/<node>@<step>, and an entry of{node}_fan_inis the predecessor's own updates instead of the whole state.Interrupt::Dynamicgainsidandresponse_schema,StreamEvent::Interruptedgainsinterrupt_id, andStreamEvent::NodeInterruptgainsresponse_schema: end a pattern that names every field with.., and build pauses withinterrupt,interrupt_with_dataandStreamEvent::interrupted.GraphErroris#[non_exhaustive]and gainsResumeRejected, so amatchon it needs a wildcard arm. See Interrupt Ids, Typed Answers and Strict Resume.
HTTP action nodes reach public addresses only
HttpActionPolicy refuses loopback, private, link-local (the cloud metadata endpoint
included), CGNAT and unspecified addresses, also for an allowlisted host, and the HTTP,
notification and RSS nodes no longer use the system proxies. 2.3.0 allowed any host. A workflow
that calls a service on a private network or on the same host allows it, ideally beside
allow_hosts naming the service:
use adk_action::ActionNodeConfig;
use adk_graph::action::ActionNodeExecutor;
use adk_graph::action::http::HttpActionPolicy;
// 3.0
fn executor(config: ActionNodeConfig) -> ActionNodeExecutor {
let policy = HttpActionPolicy::new()
.allow_hosts(["billing.internal.example.com"])
.allow_private_networks();
ActionNodeExecutor::new(config).with_http_policy(policy)
}
allow_private_networks also uses the system proxies again.
adk-skill
Skill frontmatter is read and written with serde-saphyr instead of the deprecated
serde_yaml, and SkillError::Yaml carries the YAML library's message instead of its error
type, so a later change of YAML library is not a breaking change.
| 2.3.0 | 3.0 |
|---|---|
SkillError::Yaml(serde_yaml::Error) | SkillError::Yaml { message: String } |
Both libraries read YAML 1.2, so yes, no and 1.0 in frontmatter stay strings. adk-site
front matter, adk-server's YAML agent definitions (yaml-agent) and cargo adk read and
write YAML through the same library.
adk-server
The bundled runtime UI moves to adk-surface
adk-server serves no page: /, /ui/, /ui/{*path} and
/ui/assets/config/runtime-config.json are no longer routed and answer 404, and the web_ui
module, with RuntimeConfig and its handlers, is removed. The REST, SSE, A2A and /api/ui/* APIs are
unchanged. adk_cli::Launcher serve mode serves the REST API only.
| To keep a page | Do this |
|---|---|
On a server you build with adk-server | Mount adk-surface's web home (web feature): adk_surface::web::router(engine) with ServerBuilder::add_api_routes and adk_surface::web::home() with add_root_routes, behind a RequestContextExtractor (Mount it on your own server) |
| Without writing a server | adk-rust serve or adk-rust up serve the web home at /ui/ (The web home) |
A run needs an existing session
POST /api/run, and POST /api/run_sse without a UI protocol, answer 404 with code
session.not_found for a session that does not exist, as the path-style
/api/run/{app}/{user}/{session} already did; 2.3.0 created it. A run with a UI protocol
(a2ui, ag_ui, mcp_apps) still starts its thread's session. Create the session first:
curl -X POST http://127.0.0.1:8080/api/apps/support/users/user-1/sessions/session-1 \
-H 'Content-Type: application/json' -d '{}'
curl -X POST http://127.0.0.1:8080/api/run_sse \
-H 'Content-Type: application/json' \
-d '{"appName":"support","userId":"user-1","sessionId":"session-1",
"newMessage":{"role":"user","parts":[{"text":"Hello"}]}}'
POST /api/sessions with appName and userId creates a session with a generated id.
The server is reachable from this machine only by default
Launcher serve mode, adk_cli::serve::run_serve, and adk-rust serve listen on 127.0.0.1
instead of 0.0.0.0. An empty SecurityConfig::allowed_origins, the default, allows no
cross-origin access, and a request whose Host is not localhost, *.localhost, an IP
address, the A2A or backend URL's host, or a listed name is refused with 403.
SecurityConfig::development() allows loopback origins on any port instead of every origin.
Where the server must be reachable from other machines, set all three:
use std::net::{IpAddr, Ipv4Addr};
use adk_cli::Launcher;
use adk_server::SecurityConfig;
let security = SecurityConfig {
allowed_origins: vec!["https://app.example.com".to_string()],
..SecurityConfig::default()
}
.with_allowed_hosts(["agents.example.com"]);
Launcher::new(agent)
.with_bind_address(IpAddr::V4(Ipv4Addr::UNSPECIFIED))
.with_security_config(security)
.run_serve_directly(8080)
.await?;
With ServerBuilder, set the hosts and origins on the ServerConfig:
use adk_server::ServerConfig;
let config = ServerConfig::new(agent_loader, session_service)
.with_allowed_origins(vec!["https://app.example.com".to_string()])
.with_allowed_hosts(vec!["agents.example.com".to_string()]);
vec!["*".to_string()] as allowed_origins restores the previous CORS behaviour. The
cargo-adk api and server addons read BIND_HOST (default 127.0.0.1), and the generated
Dockerfiles set BIND_HOST=0.0.0.0.
A2A
The A2A v1 layer (adk_server::a2a::v1, A2aV1Client) uses a2a-protocol-types 0.15
(2.3.0 used 0.12). Code that builds messages, tasks or agent cards for it depends on the same
version; the JSON on the wire is unchanged:
[dependencies]
a2a-protocol-types = "0.15"
A2A clients send messages only to the origin the agent card came from, and refuse a card whose
endpoint is elsewhere with a2a.card_endpoint_refused. Allow a further origin explicitly:
use adk_server::a2a::RemoteA2aAgent;
let agent = RemoteA2aAgent::builder("billing")
.description("Billing agent")
.agent_url("https://agents.example.com")
.allow_endpoint_origin("https://rpc.example.com")
.build()?;
Model thinking never reaches a peer. v1::convert::adk_part_to_wire returns Option, with
None for a thinking part:
use adk_server::a2a::v1::convert::adk_part_to_wire;
// 2.3
for part in parts {
wire.push(adk_part_to_wire(part)?);
}
use adk_server::a2a::v1::convert::adk_part_to_wire;
// 3.0
for part in parts {
// `None` for a thinking part, which stays private.
if let Some(converted) = adk_part_to_wire(part)? {
wire.push(converted);
}
}
RemoteA2aConfig, RemoteA2aV1Config, RemoteA2aAgent, and RemoteA2aAgentBuilder hold an
optional credential broker, so they are no longer UnwindSafe or RefUnwindSafe.
A task that ends on a held or long-running call is input-required, and one that ends on an
adk_request_credential call is auth-required (the new TaskState::AuthRequired).
A2A v1 wire and API
With the a2a-v1 feature, which adk-rust's server feature enables, the A2A v1 layer
changes in ways a 2.3.0 peer or caller sees:
| Change | 3.0 | Do this |
|---|---|---|
| Endpoints and cards | ServerBuilder::with_a2a, create_app_with_a2a and A2aServer serve A2A v1 beside 0.3: JSON-RPC at /a2a/v1, HTTP+JSON under /a2a/v1/rest, and the v1 card at /.well-known/agent-card.json, which served nothing in 2.3.0. The 0.3 card stays at /.well-known/agent.json; /a2a and /a2a/stream stay | Point an A2A 0.3 client that tries agent-card.json first (A2A 0.3's well-known path) at agent.json, since agent-card.json now answers with the v1 card; adk-server's A2aClient falls back to agent.json |
| Version negotiation | v1::version::SUPPORTED_VERSIONS is ["1.0"]: a v1 request without A2A-Version, or with 0.3, gets VersionNotSupportedError, which JSON-RPC reports as error -32009. The header may also be the A2A-Version query parameter. Card routes are not version-checked | Send A2A-Version: 1.0; the ADK-Rust, adk-python and adk-go clients do |
SendMessage | JSON-RPC SendMessage and REST POST /message:send answer {"task": …} (the SendMessageResponse oneof) instead of a bare Task. A2aV1Client::send_message and send_message_rest return SendMessageResponse and still read a bare Task from older servers | Match SendMessageResponse::Task and SendMessageResponse::Message |
ListTasks | Returns {tasks, nextPageToken, pageSize, totalSize}, newest first, 50 per page by default (1 to 100); RequestHandler::tasks_list, CallerScope::tasks_list, A2aV1Client::list_tasks and list_tasks_rest return TaskListResponse. The push config list returns {configs, nextPageToken} | Read .tasks, and follow next_page_token until it is empty |
| Continuing a task | A message's taskId must name one of the caller's tasks that waits on the caller (INPUT_REQUIRED or AUTH_REQUIRED): an unknown task gets TaskNotFoundError, another task's contextId gets InvalidParams, a finished or running task gets UnsupportedOperationError. An INPUT_REQUIRED task needs an answer to every call it waits on | Send a follow-up without taskId to start a new task in the context |
| Task updates | Each event becomes one artifact update with all its parts and its metadata (adk_invocation_id, adk_author, …); OutputMode::ArtifactPerRun, the default, keeps the answer in one artifact and streams partial events into an artifact marked adk_partial. Without a run_config, model output no longer streams token by token. The session user without authentication is A2A_USER_{contextId} instead of a2a-{contextId} | Read the answer from artifacts not marked adk_partial; set a RunConfig with StreamingMode::SSE to stream |
| Task versions | TaskStoreEntry::version rises with each save, and InMemoryTaskStore refuses a stale save_task_if_version with A2aError::ConcurrentModification (-32603) | Add version: 0 to TaskStoreEntry literals; check the version in a store shared between processes |
| Errors and cards | HTTP+JSON errors name their google.rpc.Code in status (NOT_FOUND, INVALID_ARGUMENT, …) instead of an HTTP phrase. GetExtendedAgentCard no longer returns the public card: it answers UnsupportedOperation (-32004) when the card declares no extended card, as the card with_a2a builds does, and ExtendedAgentCardNotConfigured (-32007) when no ExtendedCardProducer is set. Card skills are built as adk-go builds them, from Agent::profile | Match the google.rpc.Code names; set A2aV1ServerBuilder::extended_agent_card to serve an extended card |
use a2a_protocol_types::{Message, SendMessageResponse, Task};
use adk_server::a2a::client::v1_client::{A2aV1Client, V1ClientError};
// 3.0
async fn send_and_list(client: &A2aV1Client, message: Message) -> Result<Vec<Task>, V1ClientError> {
let mut tasks = Vec::new();
if let SendMessageResponse::Task(task) = client.send_message(message).await? {
tasks.push(task);
}
let mut page_token: Option<String> = None;
loop {
let page = client.list_tasks(None, None, None, page_token.as_deref()).await?;
tasks.extend(page.tasks);
if page.next_page_token.is_empty() {
return Ok(tasks);
}
page_token = Some(page.next_page_token);
}
}
Background runs and cron jobs use the durable stores
The background feature's process-local stores are removed: RunStore, BackgroundRun,
BackgroundRunner, RunPersistence, FileRunPersistence, PersistedRun, RunRetention,
CronJobStore, CronJob, DEFAULT_MAX_QUEUE_DEPTH, and CronState::with_max_queue_depth.
BackgroundState keeps runs in a DurableRunStore (in memory unless with_run_store gives it a
shared one) and CronState keeps jobs in a ScheduleStore:
use std::sync::Arc;
use adk_server::background::{
BackgroundRunner, BackgroundState, CronState, FileRunPersistence, RunStore, WorkflowExecutor,
};
// 2.3
let store = RunStore::new().with_persistence(Arc::new(FileRunPersistence::new("runs.json")));
let runner = BackgroundRunner::new(store.clone()).with_executor(executor);
let background = BackgroundState { store, runner };
let cron = CronState::new(background.clone()).with_max_queue_depth(10);
use std::sync::Arc;
use adk_server::background::{BackgroundState, CronState, WorkflowExecutor};
use adk_session::{SqliteRunStore, SqliteScheduleStore};
// 3.0
let runs = SqliteRunStore::new("sqlite://runs.db?mode=rwc").await?;
runs.migrate().await?;
let schedules = SqliteScheduleStore::new("sqlite://runs.db?mode=rwc").await?;
schedules.migrate().await?;
let background =
BackgroundState::new().with_run_store(Arc::new(runs)).with_executor(executor);
let cron = CronState::new(background.clone()).with_schedule_store(Arc::new(schedules));
SubmitRunRequest::timeout_secsis removed; useDurableWorkerConfig::run_timeout.SubmitRunRequestgainstarget,session_id,user_id,idempotency_key,concurrency_key,on_conflict, andnot_before, andCreateCronJobRequestgainstimezoneandmissed_fire_policy.CronState::cron_storeis nowschedules, andvalidate_cron_expressionreturnsResult<(), String>.- REST responses change:
RunStatusResponseaddstarget,attempt,maxAttempts,cancelRequested,sessionId, andcheckpoint;CronJobResponseuses the job name asjobIdand dropscreatedAt,lastExecution,executionCount, andactiveRunCount. Creating a job with an existing name returns409, andDELETE /runs/{id}on a running run returns itrunningwithcancelRequested: trueuntil its worker stops it. - Runs and cron jobs belong to their caller on a server with a
RequestContextExtractor:GET /runslists the caller's runs, another owner's run or job answers404,idempotencyKeyandconcurrencyKeyare scoped to the owner, and a cron job's runs act for its owner instead of the usercron.
The agent registry checks card owners
With agent-registry, registry_router takes a RequestContextExtractor and authenticates
every request through it (401 for a refused token or an empty user id). A registered card
records its owner (AgentCard::owner); any authenticated caller lists and reads every card, a
taken name answers 409, and only the owner updates the card through PUT /agents/{name} or
deletes it — anyone else gets 403. An AgentRegistryStore implements replace_owned and
delete_owned, which check the owner and write in one step:
use std::sync::Arc;
use adk_server::auth_bridge::RequestContextExtractor;
use adk_server::registry::{InMemoryAgentRegistryStore, registry_router};
// 2.3: registry_router(store)
// 3.0
fn registry(extractor: Arc<dyn RequestContextExtractor>) -> axum::Router {
registry_router(Arc::new(InMemoryAgentRegistryStore::new()), extractor)
}
Run timeouts and error responses
- Agent runs get their own timeout.
/api/run,/api/run/{app}/{user}/{session},/api/run_sse,/a2a,/a2a/stream,/a2a/v1and/a2a/v1/rest/message:*answer408afterSecurityConfig::run_timeout(15 minutes by default;ServerConfig::with_run_timeout) instead of the 30-secondrequest_timeout, which every other route keeps. - Error responses keep upstream text out. With
SecurityConfig::expose_error_detailsoff, the default, the run endpoints' Problem JSON, SSE error event and AG-UIRUN_ERRORcarry the error's message only when the server rejected the request itself (categories such asinvalid_input,not_found,conflict); a provider's or a store's text is replaced by a generic message for its category and logged with the request'sx-request-id.code,category,requestIdandretryAfterare kept. - AG-UI held calls end as interrupts. A protocol-native AG-UI stream no longer sends a held
call's placeholder
TOOL_CALL_RESULTor text message; the run ends with an interrupt for the call, and its result arrives against the sametoolCallIdin the run that resumes it. - The debug trace route answers its owner only.
GET /api/debug/trace/{event_id}matches the span's event id only (404for any other value), and with aRequestContextExtractoranswers403unless the span's user is the caller. - Handlers called directly take more extractors.
rest::controllers::session::list_sessionstakes aQuery<ListSessionsQuery>, anda2a::v1::jsonrpc_handler::jsonrpc_handlertakes the requested extensions and the raw body. Routers that mount them,create_appincluded, are unaffected. - A2A push notifications reach public addresses only.
HttpPushNotificationSenderrefuses a webhook host that resolves to a loopback, private, link-local or metadata address, and ignores proxy settings.
The OpenAI webhook handler verifies Standard Webhooks deliveries
OpenAIWebhookHandler (openai-webhooks) checks the webhook-id, webhook-timestamp and
webhook-signature headers OpenAI sends, in place of a hex HMAC in x-openai-signature.
| 2.x | 3.0 |
|---|---|
OpenAIWebhookHandler::new(config) returns Self | Returns Result<Self, WebhookError>; the secret is the whsec_... value from the OpenAI dashboard |
handler.validate_signature(body, hex) | handler.verify(&WebhookHeaders, body) |
| Any delivery with a valid signature is broadcast | A delivery signed more than five minutes from the local clock is refused, and a repeated webhook-id is acknowledged without a second broadcast |
use adk_server::webhooks::{OpenAIWebhookConfig, OpenAIWebhookHandler};
let handler = OpenAIWebhookHandler::new(OpenAIWebhookConfig {
webhook_secret: std::env::var("OPENAI_WEBHOOK_SECRET")?,
path: "/webhooks/openai".to_string(),
})?;
let router = handler.router();
# let _ = router;
# Ok::<(), Box<dyn std::error::Error>>(())
adk-auth
A guarded tool whose audit sink fails is refused. ProtectedTool, ProtectedToolDyn,
ScopedTool, and ScopedToolDyn default to AuditFailureMode::Block, so a sink error fails the
call with auth.audit_failed instead of being ignored. To keep running while the sink is down:
use adk_auth::{AccessControl, AuditFailureMode, AuditSink, ProtectedTool};
let protected = ProtectedTool::with_audit(tool, access_control, sink)
.with_audit_failure_mode(AuditFailureMode::Warn);
PostgresAuditSink writes two new columns, agent_id and on_behalf_of. Call migrate() once
on a database created by 2.3.0; until then every insert fails.
SSO
-
Tokens need
issandaud.JwtValidatorand the Google, Azure AD, Okta, Auth0 and generic OIDC providers refuse a token without anissoraudclaim withTokenError::MissingClaim(auth.missing_claim); jsonwebtoken checked those claims only when a token carried them. A token withoutexpfails withMissingClaiminstead ofDecodingError.AzureADProvider::multi_tenantrequiresissand checks no issuer value. -
JwtValidatorBuilder::buildrequires an audience. Callaudience(..), orwithout_audience()for an issuer whose tokens carry noaud; that validator refuses a token that carries one. -
SsoAccessControlrefuses a grant it cannot audit. A grant whose audit record fails returnsSsoError::AuditFailed;SsoAccessControlBuilder::audit_failure_mode(AuditFailureMode::Warn)grants it with a warning. -
No
jsonwebtokentypes in the API.adk-authmoves to jsonwebtoken 12 and keeps its types private, so a later jsonwebtoken major does not breakadk-auth.2.x 3.0 JwtValidatorBuilder::algorithm(jsonwebtoken::Algorithm::ES256)algorithm(JwtAlgorithm::ES256), oralgorithm("ES256".parse()?)jsonwebtoken::Algorithm::HS256(refused bybuild)No JwtAlgorithmvariant;"HS256".parse::<JwtAlgorithm>()fails withTokenError::UnsupportedAlgorithm?on ajsonwebtoken::errors::ErrorintoTokenErrorMap it yourself, for example TokenError::DecodingError(err.to_string())JwksCache::get_key(kid)returningjsonwebtoken::DecodingKeyCrate-private; validate with JwtValidatoror a provider -
Unknown critical headers are refused. A token whose
critheader names an extension the validator does not implement fails withTokenError::DecodingError.
use adk_auth::sso::{JwtAlgorithm, JwtValidator, TokenError};
// 3.0
fn validator() -> Result<JwtValidator, TokenError> {
JwtValidator::builder()
.issuer("https://login.example.com/")
.jwks_uri("https://login.example.com/.well-known/jwks.json")
// Required: `without_audience()` only for an issuer that sends no `aud` claim.
.audience("api://agents")
.algorithm(JwtAlgorithm::ES256)
.build()
}
adk-guardrail
- Guardrail blocks are structured errors. An input or output block ends the run with
ErrorComponent::Guardrail,ErrorCategory::InvalidInput(HTTP 400), and codeguardrail.input_blockedorguardrail.output_blocked, instead ofagent.legacy(HTTP 500). Code that matchedagent.legacyoris_agent()for a block matches the new codes. PathAllowListdenies a call that omits a path argument, which it allowed unchecked.PathAllowListchecks the keys it names at any depth, in nested objects and arrays, not only at the top level. A call holding a path outside the allowed roots, or a value other than a path, under a named key anywhere in its arguments is denied. Scope the guardrail withon_toolswhen a tool uses a key of the same name for something other than a filesystem path.ContentFilter::newandContentFilter::blocked_keywordsreturnResult, failing withGuardrailError::Regexfor a keyword list that cannot compile instead of building a filter that blocks nothing.
use adk_guardrail::{ContentFilter, PathAllowList};
let filter = ContentFilter::blocked_keywords(vec!["internal-only".to_string()])?;
// Allow calls that omit the path arguments, as 2.3.0 did.
let paths = PathAllowList::new("workspace", ["path"], ["/srv/data"]).allow_missing();
adk-eval and cargo-adk
BaselineStore::check_regressions returns an error when the baseline file does not exist, and
reports a metric or case with no score in the current run as a regression, so
Regression::current_value is an Option:
use adk_eval::BaselineStore;
// 2.3
let store = BaselineStore::new(".eval-baseline.json");
for regression in store.check_regressions(¤t, 0.05)? {
println!("{}: {:.3}", regression.metric_name, regression.current_value);
}
use adk_eval::BaselineStore;
// 3.0
let store = BaselineStore::new(".eval-baseline.json");
// Fails when the baseline file does not exist.
for regression in store.check_regressions(¤t, 0.05)? {
match regression.current_value {
Some(value) => println!("{}: {value:.3}", regression.metric_name),
None => println!("{}: no score in this run", regression.metric_name),
}
}
Judge settings are applied and are optional, because Claude 5 and OpenAI reasoning models reject sampling parameters:
use adk_eval::{LlmJudge, LlmJudgeConfig, StructuredJudgeConfig};
// 2.3
let judge = LlmJudge::with_config(model, LlmJudgeConfig { max_tokens: 1024, temperature: 0.0 });
let structured = StructuredJudgeConfig { temperature: 0.0, ..Default::default() };
use adk_eval::{LlmJudge, LlmJudgeConfig, StructuredJudgeConfig};
// 3.0
let judge = LlmJudge::with_config(
model,
LlmJudgeConfig { max_tokens: Some(1024), temperature: Some(0.0) },
);
let structured = StructuredJudgeConfig { temperature: Some(0.0), ..Default::default() };
Evaluator::evaluate_cases_parallel returns a Result, failing for a concurrency of 0 or an
empty slice:
// 2.3
let results = evaluator.evaluate_cases_parallel(agent, cases, 4).await;
// 3.0
let results = evaluator.evaluate_cases_parallel(agent, cases, 4).await?;
- Judged criteria fail closed. A judge reply without a valid
SCORE:line is an error, and safety, hallucination, and semantic replies need theirSAFE:,HALLUCINATION_FREE:, orEQUIVALENT:line; aSemanticMatchConfig::custom_promptasks for theEQUIVALENT:line too. A judged criterion without a judge fails the case instead of being skipped. - Evaluations that evaluate nothing fail: a file without cases, a case without turns, an
evaluator without criteria, or an
evaluate_directorydirectory without*.test.jsonfiles isEvalError::ConfigError. A case that no configured criterion applies to fails with anot_evaluatedfailure, andEvaluationReport::all_passed()isfalsefor a report without results. Custom criteria do not count, becauseEvaluatordoes not score them: a configuration with onlyEvaluationCriteria::customentries is aConfigErrorbefore the agent runs. - The eval schema gains vision fields:
Turn::expected_vision,TurnResult::actual_vision,EvaluationCriteria::vision,schema::Part::ImageandBenchError::Vision. Eval files without images parse unchanged; struct literals and exhaustive matches add them. cargo adk evalruns your agent. It starts the command given with--agent-cmd, sends one JSON request per turn on its stdin, and reads one JSON response per turn from its stdout. The--modeland--concurrencyflags are removed.- Refusals stop an evaluation. Judge calls meter against the current
ModelCallScope, and a run or judge call refused by a budget, a spend ledger or a frozen kill switch returnsEvalError::Refusedinstead of a failed case.EvalErroris#[non_exhaustive], so an exhaustivematchneeds a wildcard arm. Drop aMeteredLlmwrapper around a judge model that runs under a scope, which would meter each call twice.
cargo adk eval tests/support.test.json --agent-cmd "./target/release/support-agent-eval"
Benchmarks
cargo adk benchis behind thebenchfeature, off by default, socargo install cargo-adkno longer compilesadk-bench. Without the feature the subcommand exits with status 2 and names the install command:cargo install cargo-adk --features bench.cargo adk bench --suite,BenchConfig::suite, andadk_bench::TaskSuiteare removed; the flag ran the ordinary workloads whatever suite it named.BenchmarkResultreports only what the runner measures:tool_invocation,token_overhead,ToolInvocationMetrics,TokenOverheadMetrics, andTokenBreakdownare removed.memoryis filled on Linux and macOS, andmodeland the cost estimate useBenchConfig::modelinstead of the workload's declared model.
adk-payments
PaymentPolicyGuardrail::evaluate and PaymentPolicySet::evaluate are async and take a
PaymentPolicyContext, which carries the operation, the paying org and agent, and the spend
ledger:
use adk_payments::domain::{ProtocolDescriptor, TransactionRecord};
use adk_payments::guardrail::{PaymentPolicyDecision, PaymentPolicyGuardrail};
// 2.3
impl PaymentPolicyGuardrail for NoTestMerchant {
fn name(&self) -> &str {
"no_test_merchant"
}
fn evaluate(
&self,
record: &TransactionRecord,
_protocol: &ProtocolDescriptor,
) -> PaymentPolicyDecision {
if record.merchant_of_record.merchant_id == "test" {
return PaymentPolicyDecision::deny(Vec::new());
}
PaymentPolicyDecision::allow()
}
}
use adk_payments::domain::{ProtocolDescriptor, TransactionRecord};
use adk_payments::guardrail::{
PaymentPolicyContext, PaymentPolicyDecision, PaymentPolicyGuardrail,
};
use async_trait::async_trait;
// 3.0
#[async_trait]
impl PaymentPolicyGuardrail for NoTestMerchant {
fn name(&self) -> &str {
"no_test_merchant"
}
async fn evaluate(
&self,
record: &TransactionRecord,
_protocol: &ProtocolDescriptor,
_context: &PaymentPolicyContext,
) -> PaymentPolicyDecision {
if record.merchant_of_record.merchant_id == "test" {
return PaymentPolicyDecision::deny(Vec::new());
}
PaymentPolicyDecision::allow()
}
}
Payment tools enforce their declared scopes. PaymentToolsetBuilder::build wraps every tool in
an adk-auth ScopeGuard, which reads ToolContext::user_scopes() by default; grant the
scopes, or supply a resolver:
use adk_auth::{ScopeGuard, StaticScopeResolver};
use adk_payments::tools::PaymentToolsetBuilder;
let toolset = PaymentToolsetBuilder::new(checkout, transactions)
.with_scope_guard(ScopeGuard::new(StaticScopeResolver::new(vec![
"payments:checkout:create",
"payments:checkout:update",
"payments:checkout:complete",
])))
.build();
- Payment tools govern checkouts. Checkout creation and completion go through
GovernedCheckoutService: a policy escalation fails withpayments.policy.approval_requiredunless the run approves the call, and completion fails withpayments.policy.checkout_not_foundwhen the backend cannot return the checkout. - The acting agent is the commerce actor. The tools record the acting agent's id
(
urn:adk:agent:{app}/{agent}unless configured) instead ofagent-tool. auth::PaymentOperationgainsExecutePayment, with the scopepayments:payment:execute.- Autonomous AP2 payments need a verified intent authorization: submit the intent mandate with its user authorization artifact.
adk-realtime
-
RealtimeAgent,RealtimeRunner,IntegratedRealtimeRunner, andToolBridgeAdapteranswer a failed tool without its message; callexpose_tool_error_messages(true)on the builder, orToolBridgeAdapter::with_exposed_error_messages(true), for the 2.3.0 behaviour. -
A failed after-tool stage answers with
result_withheld_responseinstead of the tool's result or the callback's error. -
Tool-call arguments that are not valid JSON are answered with an error instead of running the tool with
{}. -
Two static tools with one name fail the build.
-
RealtimeRunnerandIntegratedRealtimeRunnerrun every tool call through the governed path, underRunConfig::default()and a kill switch of their own when notool_governanceis set, instead of executing it directly. A call nothing denies still runs; a call marked withrequire_tool_confirmationthat nothing can decide is refused.2.x 3.0 Every tool call executes Every tool call is authorized first; restrict calls with a ToolPolicyintool_governanceNo kill switch runner.governance().freeze(reason); share one with.governance(control)on the builderTool contexts answer run_config()withNoneTool contexts answer with the governance config, runner.run_config()
adk-audio
SttProvider::transcribe_stream yields TranscriptEvents instead of Transcripts, so a stream
tells interim text from final text. The method has a default that returns AudioError::Stt, so a
provider without streaming drops its own implementation. SttOptions is #[non_exhaustive]:
build it with SttOptions::default() and the with_* methods.
| 2.x stream item | 3.0 event |
|---|---|
Ok(transcript) for an interim result | Ok(TranscriptEvent::Partial { text, .. }) |
Ok(transcript) for a final result | Ok(TranscriptEvent::Final { transcript, .. }) |
| — | Started, SpeechStarted, SpeechEnded, Speaker, Progress, Usage |
use adk_audio::{AudioResult, TranscriptEvent, TranscriptStream};
use futures::StreamExt;
async fn finals(mut events: TranscriptStream) -> AudioResult<Vec<String>> {
let mut texts = Vec::new();
while let Some(event) = events.next().await {
if let TranscriptEvent::Final { transcript, .. } = event? {
texts.push(transcript.text);
}
}
Ok(texts)
}
adk-browser
Navigation refuses loopback, private, link-local, shared-address, and cloud metadata addresses,
host names that resolve to them, and host names the agent host cannot resolve, and checks the
page the browser ends on after a redirect. browser_file_upload is in no profile and uploads
only inside configured roots. For an agent meant to reach an internal network or upload files:
use adk_browser::{BrowserSession, BrowserToolset};
// Only for an agent meant to browse an internal network and upload files.
let toolset = BrowserToolset::new(browser)
.with_private_network_access(true)
.with_file_upload(["/srv/agent/uploads"]);
with_unresolved_hosts(true) permits host names the agent host cannot resolve, for a browser
that resolves names through a proxy.
adk-devtools
Workspace::new disables bash, which runs model-written commands outside the file tools'
path containment, and DevToolset omits the tool until it is enabled. A model-supplied
timeout_secs can no longer extend a command past Workspace::bash_timeout.
use adk_devtools::{DevToolset, Workspace};
let toolset = DevToolset::new(Workspace::new("./my-repo").allow_bash(true));
- An edit of a file changed since it was read is refused.
edit_filewithoutexpect_sha256requires the file to still have the digest recorded when it was read, and answersdevtools.stale(DevToolError::Stale,ErrorCategory::Conflict) otherwise, writing nothing;Workspace::with_read_ledgersets where the records live. bashreturns at most 30,000 characters of output: the first 10,000 and the last 20,000 around a marker, instead of up to 1 MiB per stream from the start.
adk-code and adk-sandbox
ContainerConfig and DockerConfig drop every capability, set no-new-privileges, and limit a
container to 256 processes by default. A DockerConfig setup command that switches users, such
as apt-get, needs the capabilities:
use adk_code::DockerConfig;
let docker = DockerConfig {
image: "python:3.12-slim".to_string(),
setup_commands: vec!["apt-get update && apt-get install -y git".to_string()],
// `apt-get` switches users, which needs the capabilities kept.
drop_capabilities: false,
..DockerConfig::default()
};
SandboxError is #[non_exhaustive], so a match on it needs a wildcard arm.
SandboxPolicy's allow_network: bool and network_rules: Vec<NetworkRule> become one
network: NetworkAccess — Denied (the default), Proxied { endpoint }, or Open.
SandboxPolicyBuilder::allow_network() still sets Open; allow_domain and NetworkRule are
removed, since no enforcer applied them. Policies serialized by 2.x load unchanged in meaning.
An enforcer refuses a mode it cannot enforce with SandboxError::Unenforceable instead of
logging a warning and running:
| 2.x | 3.0 |
|---|---|
policy.allow_network | policy.network == NetworkAccess::Open, or policy.network.restricts() |
.allow_domain("api.example.com", &[443]) | .proxied(endpoint) with an egress proxy that admits the host |
impl SandboxEnforcer for MyEnforcer | add fn network_support(&self) -> NetworkSupport; a wrapper forwards its inner enforcer's |
WindowsEnforcer::new() with the network denied | WindowsEnforcer::new().acknowledge_open_network(), accepting that the network stays open |
WindowsEnforcer written as a unit value | WindowsEnforcer::new(): the struct has private fields |
bubblewrap granting /run (or a path under it holding a socket), /tmp, /var/tmp or /dev/shm with the network denied | grant a narrower directory |
use adk_sandbox::sandbox::{NetworkAccess, SandboxPolicyBuilder};
let policy = SandboxPolicyBuilder::new().allow_read("/usr").build();
assert_eq!(policy.network, NetworkAccess::Denied);
assert!(policy.network.restricts());
adk-managed
- A custom tool call ends the turn with
agent.custom_tool_useand astatus.idlethat requires action; the turn continues afteruser.custom_tool_result.ToolParkingLotand theparkingmodule are removed, andSessionLoop::newandSessionLoop::with_pause_controlsno longer take a parking lot. DefaultModelResolveris no longer a unit struct; build it withDefaultModelResolver::new().- Built-in tools run confined.
bashandcode_executionrun under the platform's OS sandbox (Seatbelt on macOS, bubblewrap on Linux) in a workspace of the session's own, and are refused withmanaged.builtin.sandbox_unavailablewhere none runs, Windows included.filesystemresolves every path inside that workspace. Running the commands on the host as 2.x did takes an explicitBuiltinTools::unsafe_unconfined_host(). - The
sandboxfeature is removed:adk-sandboxalways links andwith_sandboxneeds no feature.build_agent(def, model, sandbox)becomesbuild_agent(def, model, &tools)with aBuiltinTools,ManagedBuiltinTool::newtakes aBuiltinTools, andDefaultManagedAgentRuntime::sandbox()becomesbuiltin_tools(). - Every turn's
Runnershares the runtime'sGovernanceControl,ToolPolicyand action ledger, set withwith_governance,with_tool_policyandwith_action_ledger.
use std::sync::Arc;
use adk_managed::builtin::BuiltinTools;
use adk_managed::resolver::DefaultModelResolver;
use adk_managed::DefaultManagedAgentRuntime;
use adk_session::InMemorySessionService;
// 2.3: built-in tools ran on the host with nothing confining them.
// 3.0: the same, chosen explicitly; the default confines them.
let runtime = DefaultManagedAgentRuntime::new(
Arc::new(DefaultModelResolver::new()),
Arc::new(InMemorySessionService::new()),
)
.with_builtin_tools(BuiltinTools::unsafe_unconfined_host());
ManagedSessionState gains record, pending, and durable_run_id; build it with its
constructor:
use adk_managed::{ManagedSessionState, RunState};
let state = ManagedSessionState::new(Vec::new(), RunState::initial());
ScriptedLlm is adk_model::ScriptedLlm. A call past the last scripted turn fails with
model.scripted.exhausted, and the turn counters are replaced:
use adk_managed::{ScriptedLlm, ScriptedTurn};
// 2.3
let llm = ScriptedLlm::new(
"scripted-model",
vec![ScriptedTurn { text: Some("Done.".to_string()), tool_calls: vec![] }],
);
let calls = llm.turns_consumed();
let left = llm.total_turns() - calls;
use adk_managed::{ScriptedLlm, ScriptedTurn};
// 3.0
let llm = ScriptedLlm::new(
"scripted-model",
vec![ScriptedTurn { text: Some("Done.".to_string()), tool_calls: vec![] }],
);
let calls = llm.requests().len();
let left = llm.remaining();
adk-acp
adk-acp moves from agent-client-protocol 2.2 to ~5.2 (ACP schema 1.17). Code that uses
the adk_acp::agent_client_protocol re-export follows the SDK's v5 layout: protocol v1 messages
move from agent_client_protocol::schema::v1 to agent_client_protocol::v1::schema, and
Client.builder() and Agent.builder() become Client.v1() and Agent.v1(); the SDK's
changelog
has the rest. The ACP wire protocol stays at version 1; the draft protocol v2 is behind the
unstable-protocol-v2 feature.
AcpAgentConfig,PromptResultandOutputChunkare#[non_exhaustive]. BuildAcpAgentConfigwithAcpAgentConfig::new(command)and its builder methods.PromptResultgainsstop_reasonandusage,OutputChunk::DonebecomesDone { stop_reason, usage }, andOutputChunkgains variants for plans, notices, compactions, mode, config, command and session-info changes, user text and subagents.AcpSession::startreturns once the agent created the session, so a refused handshake orsession/newfailsstartinstead of the first prompt. The client requests the highest version inSUPPORTED_PROTOCOL_VERSIONSand rejects an agent that selects another.- Errors:
AcpErrorgainsUnsupported, returned when the agent did not advertise what a request needs, andAcpServerErrorgainsAuthRequiredandUnsupported. A request that names a missing session gets ACP'ssession_not_founderror (-32002with{"sessionId"}) instead of-32602.
use adk_acp::OutputChunk;
// 3.0
fn print_chunk(chunk: &OutputChunk) {
match chunk {
OutputChunk::Text(text) => print!("{text}"),
OutputChunk::Done { stop_reason, .. } => println!("\n[done: {stop_reason:?}]"),
OutputChunk::Error(message) => eprintln!("{message}"),
// Plans, notices, tool calls, and variants added later.
_ => {}
}
}
With the server feature, AcpSessionHandler's session setup takes the client connection and
the SDK's request types, and AcpServerConfig gains fields (build it with
AcpServerConfigBuilder::new()):
| 2.3.0 | 3.0 |
|---|---|
create_session(request, cancellation) | create_session(request, cancellation, connection) |
resume_session(&session_id, cwd, directories, mcp_servers, cancellation) | resume_session(ResumeSessionRequest, cancellation, connection) |
load_session(&session_id, cwd, directories, mcp_servers, cancellation, connection) | load_session(LoadSessionRequest, cancellation, connection) |
fork_session(&source_id, cwd, directories, mcp_servers, cancellation) | fork_session(ForkSessionRequest, cancellation, connection) |
handle_prompt(..) returns StopReason | returns the full PromptResponse, with the turn's token usage |
AcpServerConfig { agent, session_service, …, session_controls } | adds standing_permissions, authenticator, system_prompts, providers, governance (GovernanceControl::new() in a struct literal) |
adk-awp
InMemoryEventSubscriptionService delivers events over HTTP with Standard Webhooks signatures,
and refuses a subscription whose callback URL names a loopback, private, link-local or other
non-public address. An in-cluster receiver needs a delivery that allows private networks:
use adk_awp::events::InMemoryEventSubscriptionService;
use adk_core::egress::EgressPolicy;
use adk_core::webhook_delivery::WebhookDelivery;
let subscriptions = InMemoryEventSubscriptionService::new().with_delivery(
WebhookDelivery::new().with_egress_policy(EgressPolicy::allow_private_networks()),
);
The 1.x types and helpers change as well:
- The capability manifest carries access levels and schemas.
build_manifestandGET /awp/manifestkeep them:CapabilityEntrygainsaccess_level: Option<TrustLevel>(accessLevel, omitted when absent), andBusinessCapabilitygainsinput_schemaandoutput_schema, read frombusiness.toml. The wire change is additive; struct literals add the fields. business_context_to_tomlreportsAwpConfigError::Serializefor a context TOML cannot represent, instead ofAwpConfigError::WatcherError.sign_payloadandverify_signatureare deprecated: event deliveries carry Standard Webhooks signatures, which receivers verify withadk_core::webhook::WebhookVerifier. Thesha256=<hex_digest>pair stays for receivers of the earlier format and warns on use.
Moving a site to AWP 2.0 is covered in Migrating from AWP 1.x to 2.0.
adk-retry-reflect
RetryTracker keeps counts per invocation, so its methods take the invocation ID, the tool name,
and the call key:
use adk_retry_reflect::RetryTracker;
// 2.3
let mut tracker = RetryTracker::new();
let attempts = tracker.increment("search:call-1");
let total = tracker.total();
use adk_retry_reflect::RetryTracker;
// 3.0
let mut tracker = RetryTracker::new();
let attempts = tracker.increment("invocation-1", "search", "call-1");
let total = tracker.total("invocation-1");
adk-telemetry
The GenAI spans follow the current OpenTelemetry GenAI conventions, those of the
semantic-conventions-genai
repository (Telemetry). Dashboards,
alerts and queries that read the old names need the new ones; there is no dual emission, since
the 2.x names (total_tokens, cache_read_tokens, thinking_tokens) matched no released
version of the conventions.
| 2.x | 3.0 |
|---|---|
Model span gen_ai.generate with gen_ai.system | {gen_ai.operation.name} {gen_ai.request.model}, such as chat claude-sonnet-5-5, with gen_ai.provider.name and gen_ai.operation.name |
gen_ai.system values gemini, bedrock, azure-ai | gen_ai.provider.name values gcp.gemini (gcp.vertex_ai on Vertex), aws.bedrock, azure.ai.inference |
gen_ai.usage.total_tokens | Not recorded; add input and output |
gen_ai.usage.cache_read_tokens, cache_creation_tokens | gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_write.input_tokens |
gen_ai.usage.thinking_tokens | gen_ai.usage.reasoning.output_tokens |
gen_ai.usage.audio_input_tokens, audio_output_tokens | gen_ai.usage.audio.input_tokens, gen_ai.usage.audio.output_tokens |
gen_ai.request.stream = false on a unary call | Absent; present (true) only when streaming |
Agent span agent.execute | Exported as invoke_agent {agent} with gen_ai.operation.name, gen_ai.agent.name |
Tool span execute_tool {tool} with tool.name | The same name, with gen_ai.operation.name, gen_ai.tool.name, gen_ai.tool.type, gen_ai.tool.call.id |
Finish reasons max_tokens, tool_calls (map_finish_reason) | length, tool_call |
SemconvConfig { capture_content: true } | SemconvConfig { capture_content: CaptureContent::SpanOnly }, or OTEL_INSTRUMENTATION_GENAI_CAPTURE_CONTENT=SPAN_ONLY |
ContentEventEmitter::emit_prompt, emit_completion (gen_ai.content.prompt, gen_ai.content.completion) | ContentEventEmitter::emit_inference_details (gen_ai.client.inference.operation.details) |
semconv::GEN_AI_SYSTEM, GEN_AI_USAGE_TOTAL_TOKENS, GEN_AI_USAGE_CACHE_READ_TOKENS, GEN_AI_USAGE_CACHE_CREATION_TOKENS, GEN_AI_USAGE_THINKING_TOKENS, GEN_AI_CONTENT_PROMPT, GEN_AI_CONTENT_COMPLETION | GEN_AI_PROVIDER_NAME, GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, GEN_AI_USAGE_CACHE_WRITE_INPUT_TOKENS, GEN_AI_USAGE_REASONING_OUTPUT_TOKENS, GEN_AI_INFERENCE_DETAILS_EVENT |
GenAiSpanBuilder::top_k(f64) | top_k(i64) |
Exhaustive matches on GenAiProvider, GenAiOperation | Add a wildcard arm: both are #[non_exhaustive] |
The tracing span names agent.execute, gen_ai.generate and execute_tool are unchanged, so
the in-process debug exporter and the SQLite exporter keep their keys; only the exported
OpenTelemetry name follows the conventions.
adk-cli
The adk-rust binary runs on the harness (spec 3.1, adk-harness):
| Command | 2.3.0 | 3.0 | Keep the 2.3.0 behaviour |
|---|---|---|---|
adk-rust without a subcommand | The chat REPL | The harness in ask mode in the current directory, full screen on a capable terminal: workspace-confined file tools, host bash behind per-call approval, and long-term facts kept in harness.db | adk-rust chat |
adk-rust serve | Served the chat agent | Serves the harness in plan mode with the approval inbox under /api/approvals; a host other than loopback needs --auth-token or ADK_SERVE_TOKEN | adk-rust serve --agent chat |
adk-rust code, goal, ultracode | Edited files and ran commands without asking | Run on the harness in ask mode: edits and host commands wait for approval; without a terminal and without --yes, code holds the calls, prints the session id and exits with status 3 | --yes, or --mode |
The REPL, code and goal make one extra model call when a session ends, to keep facts for
later sessions; --no-memory or --ephemeral keeps none. adk_cli::serve::run_serve logs its
listening address through tracing instead of printing it.
adk-rust features
3.0.0 removes the 19 umbrella features that only aliased a sibling, and folds what each compiled into that sibling, so replacing the name keeps the same code. Cargo rejects a manifest that names a removed feature, so the build fails until the name is replaced.
Removed adk-rust feature | Use instead | Notes |
|---|---|---|
cerebras, fireworks, mistral, perplexity, sambanova, together | openai | Construct the client with OpenAICompatible::new(OpenAICompatibleConfig::<provider>(api_key, model)) |
whisper-onnx, distil-whisper, moonshine, chatterbox | audio-onnx | audio-onnx now compiles all four models |
action-code, action-db, action-email | action | action now compiles the database and email placeholders |
action-rss | action-http | action-http now compiles the RSS node |
a2a | server | server already enabled A2A v1 |
agent-registry | server | adk_rust::registry is now available with server |
cli-deepseek, cli-groq | cli | cli now compiles the DeepSeek and Groq providers |
personas | eval | adk_rust::personas is now available with eval |
Member crates drop the features that compiled nothing:
| Crate | Removed feature | Use instead |
|---|---|---|
adk-model | cerebras, fireworks, mistral, perplexity, sambanova, together, xai | openai with the OpenAICompatibleConfig preset |
adk-audio | streaming | nothing: the streaming methods are always compiled |
adk-auth | adk-server | nothing: auth-bridge no longer needs adk-server |
adk-gemini | studio (was the default) | nothing: the AI Studio backend is always compiled |
adk-telemetry | metrics | otlp |
adk-graph | action-db-mongo, action-db-redis | action-db, which builds the MongoDB and Redis placeholders |
adk-graph | action-code | action, which builds the code node |
adk-audio | vad | nothing: VadProcessor is always compiled; desktop-audio no longer lists it |
adk-audio's whisper-onnx, distil-whisper, moonshine and chatterbox, adk-graph's
action-db, action-email and action-rss, adk-server's agent-registry, adk-eval's
personas and adk-cli's deepseek and groq gate code and are unchanged.
Verifying your upgrade
cargo update
cargo check --all-targets
cargo test