npm / @google/adk
@google/adk
What changed in @google/adk 0.2 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
26 breaking24 security5 deprecations119 new APIs and options3 performance19 behavior and defaults2 tooling191 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@google/adk 2219 changes
Breaking changes 18
Agent instructions are no longer included in the published A2A agent card.
A stale session is rejected instead of being reloaded when appending an event.
The skill loader now throws typed errors, allowing callers to handle failures by error type.
The frontmatter delimiter must be a line consisting of exactly three hyphens.
Code executors now run client-side code by default and match adk-python output.
Implicit Google API authentication now requires HTTPS.
Boolean nodes in JSON Schema are converted to object schemas.
Boolean branches in anyOf are converted to object schemas.
An agent is a workflow node itself and can be passed directly to an edge or node(); non-LlmAgent nodes no longer append node input to conversation or promote final model text to node output.
BaseAgent now extends BaseNode and inherits rerunOnResume, waitForOutput, retryConfig, timeout, inputSchema, outputSchema, and stateSchema; same-named subclass fields collide, and description is no longer undefined when unset.
Schemas declared in the genai dialect are enforced, not just Zod schemas.
LLMAgentWrapper and LLMAgentWrapperConfig are removed; pass an agent directly to an edge or node() instead.
A node that reports an error now fails instead of being treated as successful.
Dynamic ctx.runNode() children that raise an interrupt and re-read ctx.resumeInputs on re-run must declare rerunOnResume: true; otherwise they complete with the raw reply as output.
Numeric custom runIds and runIds colliding with automatic ones are refused.
A node's declared stateSchema is enforced.
A workflow's output is no longer delivered as two events.
WorkflowAgent is removed; workflows can be driven as nodes.
Security 13
Reads environment variables safely in the browser.
Prevents path traversal in loadDotenvForAgent and eval set routes.
Fetched agent card RPC URLs are pinned to the origin from which the card was fetched.
Hardens agent-card resolution against SSRF and a silent file read.
Scrubs credential material before forwarding it to a remote A2A peer.
Rejects an empty credentialKey before storing the credential.
Redacts the OAuth2 authorization code from malformed-callback-URI logs.
Emits a PKCE S256 code challenge on the OAuth2 authorization URI.
Rejects an unusable OpenAPI HTTP credential instead of sending an unauthenticated request.
Redacts inline data payloads from the resumption debug event dump.
Prunes credential-bearing httpOptions from the traced request.
Unsupported-URI errors redact the connection-URI password.
Credential responses are bound to the request that asked for them.
Deprecations 4
Custom metadata keys prefixed with __adk_internal_ are reserved for ADK; developers should avoid using them.
LoopAgent remains usable but logs a deprecation warning once per class per process.
ParallelAgent remains usable but logs a deprecation warning once per class per process.
SequentialAgent remains usable but logs a deprecation warning once per class per process.
New APIs and options 44
Telemetry records ADK duration, token, and totals metrics.
Adds hooks for agent and run errors, and finalizes aborted runs.
Telemetry exports on the Agent Runtime request path.
CLI commands now support aliases.
Adds a computer use tool and toolset with a BaseComputer interface.
CLI flags can use kebab-case.
Telemetry records MCP HTTP exchanges.
Telemetry settings can be overridden per run.
Adds control over generated IDs through setIdProvider.
Application Integration list operations support sortByColumns.
Traces, metrics, and logs can be exported to telemetry.googleapis.com.
Telemetry emits the v2 span tree and GenAI log records.
Adds opt-in automatic session creation in the runner.
Adds DebugLoggingPlugin with full Python parity for developers who want debug logging through a plugin.
Adds ToolCallIntegrityPlugin with adk-python parity.
The code-execution skill is published on the agent card.
Ports the BasePlanner planner API.
Ports the BuiltInPlanner planner API.
customMetadata is declared for memory entries.
LlmAgent gains planner support, allowing developers to configure an agent with a planner.
The logger facade is exported from the @google/adk public API.
Ports the PlanReActPlanner planner API.
Adds a module aliasing ToolContext to Context.
Adds a toolset for Chrome WebMCP document.modelContext tools.
Adds a BaseLlm for using the on-device Chrome Prompt API model.
Adds Docker-sandboxed code execution for applications that need to run code in a container.
Adds a model plugin for self-healing error recovery.
Adds a tool plugin for self-healing error recovery.
Exports resetLogger from the public API so applications can reset the logger.
Ports the adk-python v0.1.0 retrieval tools.
Ports the typed-errors module from adk-python.
Adds a Vertex AI RAG memory backend.
The environment abstraction is available, including BaseEnvironment, ExecutionResult, and LocalEnvironment.
ctx.runNode() now accepts the same inputs as edges.
Workflows gain a built-in Function node.
FunctionTool supports require_confirmation for human-in-the-loop approval.
Workflow support adds LLM-agent-as-node, task mode, and node-as-tool capabilities.
Plugins can use before/after node callbacks.
A failed workflow node is recorded as a NodeErrorEvent.
Workflow support adds ParallelWorker and JoinNode.
Runner.runLive and the LlmAgent live flow are implemented.
Workflows gain a built-in Tool node.
The workflow engine adds an execution model, graph, node registry, and public workflow runner API.
Workflow and node execution can be traced with OpenTelemetry.
Performance 3
The stale-session event reload is moved out of appendEvent's row lock.
Imports MikroORM on first database use.
Situational subsystems are optional peers, reducing the reported install package count from 591 to 172.
Behavior and default changes 12
Trace context is propagated across A2A calls.
Agent Engine request traces are continued and include the support id.
ExampleTool examples are validated when the tool is constructed, surfacing invalid examples earlier.
Session metadata is attached to task, working, and input-required events.
ADK tracking headers are sent on MCP HTTP requests.
MemoryEntry.id is forwarded as the Vertex memoryId.
InvocationContext.agent is optional; code outside an agent's execution must handle undefined, while code inside one should prefer requireAgent(ctx).
isolationScope now filters LLM contents.
RoutedAgent graduates out of experimental.
RoutedLlm graduates out of experimental.
Runner, App, and the agent loader accept a bare Workflow as a root.
Workflow is still experimental, and a bare Workflow can now be used as a root by the runner, App, and agent loader.
Fixes and other changes 125
The CLI honors otel_to_cloud and sets failure exit codes.
Fixes the wire protocol and SSE parsing, and makes the aiplatform peer optional.
Passes the parent's current state to a reused AgentTool session.
Normalizes artifact MIME types and uses placeholders for binary instructions.
Fixes container lifecycle and image build caching.
Prevents thought leaks and empty parts when converting foreign events.
Preserves empty user ID filters in database lists.
Fixes datetime precision, schema initialization, and StaleSessionError.
Accepts filenames starting with '..'.
Keeps schema constraints in the Gemini converter.
Skips registered global providers when setting OpenTelemetry providers.
Validates config, keeps path schemas, and scopes sample fetch.
Object.prototype names are treated as missing state keys in instructions.
Updates LoadMemoryTool description and LoadMemoryResponse types.
Resumes the matching peer task when tool replies are mixed.
Keys nested skill resources by forward-slash paths on Windows.
Serializes path, header, and cookie parameters and omits null values.
Preserves a tool's outputKey value when the final event has no text and excludes thought parts from the value.
Parallel tool responses are retained when another call asks for confirmation.
Function calls are skipped in partial events.
Invokes plugin beforeAgentCallback and afterAgentCallback.
Remote peer messages are no longer attributed to the local user.
Serializes array and object fields in form bodies.
Validates frontmatter delimiters, empty mappings, and 0-byte zip files.
Runs a skill script named without the scripts/ prefix.
The stdio MCP timeout is now honored.
Skips set_model_response in task mode and preserves function call IDs.
Keeps temp: state in the session for the rest of the invocation.
Retains nonadjacent tool call and response pairs.
Waits for the runner to store node events.
Stops storing a node's input as a user turn.
LlmAgent now calls BaseToolset.processLlmRequest when processing an LLM request.
The check now honors Gemini instance vertexai configuration.
Claude integrations now honor maxOutputTokens, set finishReason, and sanitize tool ids.
Executor state is isolated per session, preventing state from being shared across sessions.
Foreign agent thought parts are excluded when converting events.
Repeated HTTP header values are preserved instead of being lost or collapsed.
The text of inlineData artifacts is injected into instructions.
LoadMemoryTool now returns full memory entries.
OpenAPI tools now match adk-python behavior for empty-object schemas, OAuth2 exchange, and object-body parsing.
Array query parameters are sent as repeated keys.
Synchronous delegate initialization errors now trigger failover.
Telemetry spans now report tool error types.
Duplicate tracer registration is avoided.
Validation now reports when a path is missing or is not a directory.
Aborted invocations are sealed in session history.
Tool responses are normalized before afterToolCallback runs.
Base64 is decoded as UTF-8 in the browser.
In-memory artifact versions now have canonicalUri populated.
The sandbox name is persisted in the code execution context state delta.
Instruction strings containing ${...} and escaped braces are kept as literal text.
Planners now keep all leading parallel function calls.
llmRequest.model is set to the selected route model.
RoutedLlm.generateContentAsync now forwards abortSignal.
The call_llm span is ended in a finally block when runAsync exits early.
Runner now prefers an explicit appName over app.name.
VertexAiSessionService now gives Session.state a null prototype.
Partial chunks of a streamed response now share one event ID.
Falsy tool errors are preserved.
In SSE mode, the parent step loop stops after transfer_to_agent.
An explicit vertexai: false is respected even when enterprise environment variables are set.
Event listing now follows nextPageToken when retrieving a session.
Numeric log levels are mapped to Winston names.
Closes the Chrome reply envelope and prevents it from being shown.
An empty text part is rendered when a code execution result has no output.
Stringifies customMetadata values in GcsArtifactService.
Routes Gemini 3.x live audio by model family rather than the '-flash-live' spelling.
Emits one input transcription on Gemini 3.x Live.
Gemini 3.5 Live Translate is excluded from Gemini 3.x Live routing.
Keeps tool and code execution events in Memory Bank writes.
Fixes nested artifacts leaking versions into their parent.
Emits the body argument for a schema-less media type.
Scans every 2xx media type for the return schema.
Makes safeStringify total.
Closes the skill registry when the skill toolset closes.
Drops a null member from an enum when converting with toGeminiSchema.
Boolean branches in type arrays are converted to object schemas.
Lists artifacts nested under another artifact.
Loads artifacts and MCP resources when other tools are called.
Makes built-in tools resolvable by name.
Handles Cloud SQL Unix socket connections in sessions.
Stops a surviving grandchild from hanging code execution.
Stores the event timestamp with sub-second precision on MySQL.
Always emits an array for the required key in the OpenAPI argument schema.
Carries request-input resume inputs in their own type.
Propagates request metadata to agent execution.
Declares synthesized card default modes as media types.
Gracefully handles unregistered tool calls.
Makes transfer and runtime tool confirmation work across runtimes.
Configures VertexAiSessionService from the environment for vertexai:// URIs.
Makes the web build bundle and run in a browser and loadable outside Node.
An aborted node is reported as aborted, not timed out.
The dev server continues when one agent is broken, and adk run surfaces HITL prompts and errors.
An agent node can converse and finish a confirmed tool call.
The agent-transfer action is sent under the name defined by the API.
Usage metadata is retained from content-less streaming responses.
Delegated output is no longer duplicated, and structured replies are parsed.
A caller is unwound past a dynamic child that paused or failed.
Dynamic HITL children resume instead of livelocking.
A dynamic node that already settled is not run again.
The Gemini API path now consults GOOGLE_API_KEY.
getExpressModeApiKey() now honors GOOGLE_GENAI_USE_ENTERPRISE.
Human-in-the-loop confirmation is bound to the action it approves.
A reply that answers no open interrupt is refused.
The interrupt schema is emitted under the key clients read.
Events built by a node itself are stamped with the invocation id.
Node state writes are no longer rolled back mid-run.
Workflow outputs record which nodes they answer for.
An item that asks the user can pause the whole worker.
A child's pending interrupt can hold its caller.
State changes made during processLlmRequest are persisted.
Structured HITL replies are checked against responseSchema.
OpenAPI path parameters are encoded and validated.
A resumed graph can route back through a node it already ran.
Jittered retry delays stay within maxDelay.
A retryable exception can be matched by its class name.
Two route keys can share a destination node.
The START node receives the user's text, whether or not it includes an attachment.
A text reply requested by the schema is no longer reinterpreted.
The event round trip is restored.
A waiting parent resumes on its original input.
Errors identify which node failed and when a route goes nowhere.
Workflow event fields are preserved across the Agent Engine fallback path.
Node overrides are applied to an already-built node.
A finished run is no longer replayed on the next turn.
@google/adk 1119 changes
Breaking changes 7
Parses JSON bodies only and drops express.urlencoded.
Fails fast when a Vertex AI Express Mode API key cannot be used.
Rejects zip-slip entries and non-bare skill names when loading zipped skills.
Requires authentication when mounting an A2A server.
Requires confirmation before executing inline skill scripts.
AgentTool no longer propagates skipSummarization to parent EventActions.
Agent execution is aborted when the HTTP connection disconnects.
Security 10
Fixes a sibling-directory escape in the path check.
Uses a cryptographically secure source for randomUUID.
Passes -NoProfile to spawned PowerShell and /D to cmd.exe.
Prevents prototype pollution via untrusted map keys.
Fixes artifact-saving message part replacement and LLM exposure.
Adds an SSRF-safe tool for loading web pages.
Applies the SSRF blocklist to the OAuth2 token endpoint.
Prevents SSRF credential leaks via OAuth2 redirects and blocks IPv6 [::].
Prevents prototype pollution via a model-controlled JSON path during streaming.
Fixes SSRF protection for IPv4-mapped IPv6 and a dead 172.16/12 check.
New APIs and options 52
Adds bearerTokenUserBuilder for A2A authentication.
Adds getUserChoiceTool for parity with adk-python.
Adds requestInputTool for parity with adk-python.
Supports expireTime as a session-expiration option when creating a Vertex AI session.
Supports ttl as a session-expiration option when creating a Vertex AI session.
Implements anchored iterative summarization in context compactors.
Adds clone() support to BaseAgent and RoutedAgent.
Adds a tool for Gemini web grounding.
Adds a tool for few-shot examples.
Adds GlobalInstructionPlugin to scope global instructions.
Adds a tool to read MCP server resources.
Adds live streaming support to LoopAgent.
Introduces agent-controlled compaction.
Adds support for --agent_engine_id to deploy agent_engine.
Client labels are configurable in adk-js.
Adds fileData support to GcsArtifactService.
Implements the Gemini Interaction API in adk-js.
Creates a new top-level integrations package.
Introduces SessionArtifactService alongside changes to ForwardingArtifactService.
Introduces trajectory thought pruning in adk-js.
ADK JS supports Gemini 2.5 and 3.x Live Models.
Adds an OpenAPI spec operation parser and auth handler.
Adds a flag to watch agent files for changes.
Adds integration with a remote GCP Skills Registry.
Implements a REST API tool for OpenAPI.
Adds a dynamic SearchSkillsTool for LLM agents.
Introduces a core interface for a Skills Registry, along with zip extraction and local Toolset caching fallbacks.
Adds an Agent Engine Sandbox Code Executor.
Implements the Agent Registry in adk-js.
Adds customMetadata support in runAsync and runEphemeral.
Adds a Google maps tool.
listSessions now supports pagination and sorting.
Adds OpenAPI authentication helpers and credential exchangers.
Adds implementation of the Vertex AI Memory Bank service.
Adds a tool for Vertex AI RAG Engine grounding.
Adds URL context grounding for Gemini 2+.
Adds a Vertex AI Search tool.
Supports an abort parameter in the runner, agent, model, tool, and processors.
Adds Agent as a type alias for LlmAgent to keep parity with Python ADK.
Adds an auth preprocessor and updates the auth handler.
Adds base classes related to authentication.
Adds a client URL option to support custom URL options for DB connections.
Adds OAuth2-related classes for OAuth support.
Adds callbacks for context compaction and tool selection.
Adds progressive processing for model streaming.
Adds RoutedAgent.
Adds RoutedLlm.
Adds support for script execution in skills.
Defines an interface for skills.
Adds a loader for skills.
Adds a skills toolset.
Adds an unsafe local code executor.
Behavior and default changes 4
Groups appName, userId, and sessionId into a unified composite session key.
Cleans up and generalizes agent determination for LRO session resumption routing.
Uses AuthPreprocessor in LlmAgent.
Enables concurrent replacement with key deduplication.
Tooling 1
Adds A2A authentication support for the dev server and Cloud Run deploy.
Fixes and other changes 45
Stops restoring the event branch from A2A peer metadata.
Skill frontmatter validation accepts the derived allowedTools alias.
Gates the set_model_response workaround on canUseOutputSchemaWithTools.
Isolates in-memory composite keys for artifacts.
Surfaces root-cause MCP session errors instead of swallowing them.
Persists events returned by onEventCallback.
Falls back to node:crypto so randomUUID cannot throw on Node.
Validates tool callback response types and prevents state event pollution.
Detects PowerShell 7+ (pwsh) in the SHELL branch.
Treats @google/genai ApiError 404 as session not found.
Fixes handling of A2A events without content.
Preserves errorCode in A2A event metadata.
Missing in-memory artifact versions now return undefined.
Validates the effective maxLlmCalls value.
Uses the statically configured credential in OpenAPI tools.
Quotes userId in the Vertex AI sessions AIP-160 list filter.
Treats an empty toolFilter array as no filter.
Gracefully handles missing function calls during context compaction.
Formats object state and Part artifact values as JSON or text in instruction templates.
Shares the invocation cost manager so maxLlmCalls spans the whole run.
Defaults the role to 'user' when it is omitted.
Persists exchanged OpenAPI credentials via the State API.
Allows SKILL.md files containing tables to load.
Stops emitting model content with empty parts from the stream aggregator.
Suppresses empty part arrays in streaming.
Gates token-based compaction on latest prompt size rather than event sum.
Uses the proper AuthConfig type in EventActions instead of any.
Fixes an infinite loop when outputSchema and tools are combined.
Suppresses trailing empty STOP chunks with zero parts.
Filters temporary state keys when creating a session.
Temporary keys are filtered from sub-agent state deltas in AgentTool.
Array responses from function tools are wrapped to comply with the Gemini API.
MCP client sessions are closed after listTools and callTool to address a Windows libuv assertion and process leak.
Adds a method to close an MCPToolset session.
MCPToolset.getTools() now applies toolFilter.
Streaming suppresses empty STOP chunks and preserves tool calls in SSE session history.
Prevents close() from dropping the final event when the last chunk has no candidates.
Thought parts are filtered in stringifyContent and AgentTool merged text.
Handles an undefined type in enum- or const-only schemas.
Fixes the path used to serve ADK web UI source code.
AgentTool uses getOrCreateSession to allow session reuse within the same session.
Strips the prefix during MCP tool execution.
Adds support for dynamic require in ESM builds.
Fixes missing invocation IDs on ADK events created while merging parallel tool responses.
Propagates thoughtSignature to concurrent function calls in streaming.
@google/adk 0.616 changes
Security 1
Prevents path traversal in FileArtifactService.
New APIs and options 7
Adds an A2A Remote agent integration.
Adds a CLI option to serve ADK agents via A2A.
Adds an option to start the ADK API server on a free random port.
Adds a tool for loading artifacts.
Adds a tool for loading memory.
Adds a utility function for A2A integration.
Adds token-based context compaction.
Behavior and default changes 1
Supports video metadata during A2A part conversion.
Tooling 1
Adds a tool for preloading memory.
Fixes and other changes 6
MCP types can be arrays instead of being limited to strings.
Uses the correct enum values for agent card transport types.
Prints an error message when the port for the ADK API server is already in use.
Uses the LLM agent instruction when the root agent is not an LLM agent.
Preserves existing tables in the schema during session database initialization.
Persists session state correctly so previous data is not lost.
@google/adk 0.53 changes
New APIs and options 2
Adds an ExitLoopTool equivalent to those in Python and Java ADK.
Toolsets can be prefixed to avoid tool name conflicts.
Fixes and other changes 1
MikroORM drivers are lazy loaded to avoid errors when they are not used.
@google/adk 0.418 changes
Breaking changes 1
The CLI is now ESM native instead of CommonJS, affecting how it runs in a project.
New APIs and options 10
Adds a utility to convert between A2A and GenAI parts.
Adds the AdkWebClient service.
Adds ApigeeLlm to the TypeScript ADK.
Adds a database-backed session service.
Adds FileArtifactService.
Adds a getOrCreateSession helper to BaseSessionService.
Adds pauseOnToolCalls configuration.
Adds streaming and stateless execution to Runner.
Adds utilities to convert events between snake_case and camelCase.
Adds a version command to the ADK CLI.
Behavior and default changes 1
Relaxes agent naming validation.
Fixes and other changes 6
Uses the isBaseTool type guard instead of instanceof for class-instance checks.
Uses the isLlmAgent type guard instead of instanceof for class-instance checks.
Fixes state persistence in LlmAgent.
The ADK API server handles state request-body parameters.
The ADK API server handles state delta request-body parameters.
Removes the hard-coded check that prevented set tools and outputSchema.
@google/adk 0.35 changes
Deprecations 1
The MCP Session manager's header option is deprecated in favor of headers.
New APIs and options 2
The MCP Session manager adds a headers option for supplying headers.
Adds setLogger() to support custom loggers.
Behavior and default changes 1
Supports Zod v3 and v4.
Fixes and other changes 1
Changes rootAgent to use a getter, matching Python SDK behavior.
@google/adk 0.29 changes
New APIs and options 2
Adds support for creating a new agent through NPX.
Adds OpenTelemetry support.
Fixes and other changes 7
Fixes a bug that caused the ADK web server to crash during agent graph generation.
Handles empty MCP schema types during Gemini conversion.
Fixes lodash import errors for developers using the package.
Improves type inference for functional tool parameters.
Passes the header parameter to StreamableHTTPClientTransport in MCPSessionManager.
Improves the error message shown when appName is missing in the runner.
Adds graceful handling for nullable or unknown types.