npm / @a2a-js/sdk
@a2a-js/sdk
What changed in @a2a-js/sdk 0.3 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
14 breaking9 security76 new APIs and options1 performance14 behavior and defaults48 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@a2a-js/sdk 1130 changes
Breaking changes 11
Clients must send the protocol Major.Minor version with each request, using a header or request parameter; unsupported versions result in VersionNotSupportedError.
The error hierarchy is unified and now has transport-specific subclasses, changing how applications may handle transport errors.
Agents must reject operations that require undeclared capabilities, including push notifications, streaming, extended agent cards, and required extensions.
HTTP query parameter names must use camelCase to match Protocol Buffer field JSON serialization.
The operation requires authentication using a scheme declared in the public Agent Card; agents may tailor returned content to the authenticated client's identity or authorization level.
A2A-specific gRPC errors must include ErrorInfo in status.details, with the A2A error type as reason and the protocol domain.
HTTP responses for A2A-specific errors must include ErrorInfo in error.details, identifying the A2A error type and protocol domain.
JSON serializations must use camelCase field names rather than Protocol Buffer snake_case names; enum values use their ProtoJSON string names.
RequestContext now uses SendMessageRequest instead of individual properties and exposes its metadata to AgentExecutor.
Streaming responses must contain exactly one task, message, statusUpdate, or artifactUpdate field.
JSON bindings must represent timestamps as ISO 8601 UTC strings ending in Z; clients and servers must parse and generate them correctly.
Security 9
The client caches the extended Agent Card only after signature verification.
Uses the same canonicalized payload for signing and verification.
Implementations must scope task and resource access to the authenticated caller and check authorization before operations that could reveal out-of-scope resource existence.
Custom protocol bindings must address security in their specifications and document authentication integration and credential transmission.
Implementations are expected to use encrypted transport, validate inputs, protect and rotate credentials, monitor security events, limit abuse, and protect user data.
Production deployments must use encrypted communication for HTTP-based bindings; TLS is required for gRPC.
Webhook callers and receivers have security responsibilities, including authentication, delivery retries, URL validation, HTTPS, idempotent processing, and rate limiting.
Agent Cards can include JWS signatures; signing and verification exclude this field and use a canonicalized Agent Card payload.
Client-side SSE event size is bounded to prevent memory exhaustion.
New APIs and options 64
Adds database-backed stores for tasks and push notifications.
Introduces the server SettleByTaskId method.
Event bus keep-alive states are configurable, allowing developers to control which states keep the bus alive.
Service parameter listing the extension URIs the client wants to use for a request.
For JSON-RPC requests, service parameter names are transmitted as HTTP headers; keys are case-insensitive and multiple values should be comma-separated.
Service parameter identifying the protocol version used by the client; unsupported versions result in VersionNotSupportedError.
Describes optional agent support for streaming, push notifications, extensions, and extended agent cards.
Defines a self-describing agent manifest containing identity, capabilities, supported interfaces, skills, and security requirements.
Agents declare extended Agent Card support with this capability; unsupported or unconfigured operations must return their respective errors.
Represents an RFC 7515 JSON Web Signature of an AgentCard.
Declares a supported protocol extension, including its URI, description, requirement status, and optional parameters.
Declares an agent URL, protocol binding, and protocol version, allowing the same functionality to be exposed through multiple bindings.
Defines the provider organization and URL for an agent.
Describes an agent skill, including its identifier, capabilities, supported media types, and optional security requirements.
Defines API key authentication by specifying its location and parameter name.
Artifacts represent task outputs and include an identifier, one or more content parts, and optional descriptive information, metadata, and extensions.
Operations return immediately with a Task or Message; when they return a Task, processing continues in the background and clients retrieve updates through polling, streaming, or push notifications.
Defines authentication scheme and optional credentials for push notifications.
Defines authorization code flow endpoints and scopes, with an optional PKCE requirement.
Creates a task push notification configuration that sends task updates to a webhook and persists until task completion or explicit deletion.
Permanently deletes a task push notification configuration; deletion is idempotent and stops further webhook notifications.
Defines the OAuth device code flow for input-constrained devices and CLI tools where users authenticate on another device.
An Agent Card can advertise support for an authenticated extended card that clients retrieve with credentials.
Clients can fetch the authenticated extended Agent Card from this endpoint using an Authorization bearer token.
Agents declare supported extensions in AgentCard capabilities, while clients opt in through binding-specific mechanisms such as headers, metadata, or request parameters.
Retrieves a potentially more detailed Agent Card after authentication when the public card declares extendedAgentCard support.
Retrieves a task's push notification configuration, including its webhook URL and notification settings.
Defines a strongly typed gRPC binding using Protocol Buffers over HTTP/2 with TLS and the A2AService service.
Lets GetTask limit the number of recent history messages returned; zero requests no messages, and an unset value imposes no client limit.
Defines HTTP authentication schemes and an optional bearer-token format hint.
Defaults to false; when false, artifacts must be omitted from returned tasks, reducing payload size.
Defines an HTTP-based JSON-RPC 2.0 binding with PascalCase methods, JSON request and response bodies, and Server-Sent Events for streaming.
Maps A2A errors to the JSON-RPC error object, with numeric codes, human-readable messages, and typed detail objects in data.
Lists active push notification configurations for a task and may support pagination.
Lists tasks with optional filtering and cursor-based pagination, allowing clients to discover and manage tasks across contexts and statuses.
Adds an option to include artifacts in returned tasks; it defaults to false to reduce payload size.
Adds a timestamp filter for tasks whose status was updated at or after the supplied ISO 8601 timestamp.
Part includes an optional MIME-type field available for every part type.
Messages are for communication and task interaction, while task outputs should be returned as Artifacts; clients must not rely on Messages for reliable delivery of critical information.
A message part can include a JSON schema in metadata to describe the requested structured data format.
Defines mutual TLS authentication for an agent security scheme.
Defines OAuth 2.0 authentication using configured flows and an optional authorization server metadata URL.
Defines OAuth 2.0 flow configuration, including authorization code, client credentials, implicit, password, and device code flows.
Defines OpenID Connect authentication through a provider metadata discovery URL.
Accepts a cursor from a previous ListTasks call to retrieve the subsequent page of results.
Push notifications use a StreamResponse payload with exactly one task, message, status update, or artifact update; agents attempt delivery at least once.
A message part can carry uploaded file content in the raw field, alongside filename and mediaType.
Clients should use this Message field to explicitly reference related tasks in follow-up requests.
When unset or false, SendMessage waits for a terminal or interrupted task state; true returns after task creation. The setting has no effect for direct Message responses or streaming operations.
Defines a discriminated union for API key, HTTP, OAuth 2.0, OpenID Connect, and mutual TLS security schemes.
Sends a message and streams real-time updates using Server-Sent Events.
REST streams use SSE JSON data events and proceed from an initial task or message through updates until the task reaches a terminal or interrupted state.
Adds a state bag and ServerCallContextBuilder to ServerCallContext.
SSE wire-format helpers are exported from the public entry point for use by SDK consumers.
Provides a typed wrapper for streaming task, message, status-update, or artifact-update responses; exactly one response field must be present.
Subscribes to an existing non-terminal task and streams its current Task followed by status and artifact updates; the stream ends when the task reaches a terminal state.
Agent Cards declare supported protocol combinations in preference order; clients select the first supported transport and use its URL.
Agents can transition a task to this state to delegate fulfillment of an authorization request to the client.
Defines streaming events for generated or updated artifacts, including support for appended content and final chunks.
Adds a gRPC resource wrapper associating push notification configuration data with a task and its resource name.
Defines task lifecycle states including input-required and auth-required interrupted states, plus rejected and the terminal completed, failed, and canceled states.
Defines streaming events that notify clients when a task's status changes.
An artifact part can refer to a downloadable file by URL, with filename and mediaType.
Opt-in v0.3 backward compatibility supports staged migrations.
Performance 1
Servers should send Cache-Control and ETag headers for Agent Cards; clients should honor HTTP caching and use conditional requests when cached cards expire.
Behavior and default changes 13
The SDK is generally available, and the v1.0 line is stable.
The SDK implements the full v1.0 specification across JSON-RPC, HTTP+JSON/REST, and gRPC.
For gRPC, service parameters are transmitted as metadata keys; keys are normalized to lowercase and multiple values should be comma-separated.
The HTTP+JSON binding transmits service parameters as HTTP headers; repeated values should be comma-separated in one header field.
Groups related tasks and messages into a conversational context; agents may generate it when absent, but must return it and must reject client-provided values they cannot accept.
Extensions should include version information in their URI; breaking changes require a new URI, and unsupported versions are ignored unless required, in which case the agent returns an error without falling back.
Required fields should be validated, optional fields distinguish omitted values from explicitly set defaults for defaulting and Agent Card signature canonicalization, and unrecognized fields should be ignored.
Agents may serve concurrent streams for a task; each active stream must receive the same events in order, and closing one stream must not affect others or the task lifecycle.
Must always be present in ListTasks responses and must be an empty string when there are no more results.
Clients may choose any protocol declared by an agent and should implement fallback logic for alternative protocols.
Custom protocol bindings should use a URI identifier, with a new URI for breaking changes so clients can distinguish incompatible versions.
Agents should declare all supported protocols in their AgentCard, and custom protocol bindings should be identified by a URI; breaking binding changes require a new URI.
Task IDs are server-generated for new tasks; a supplied ID must reference an existing task, otherwise the agent returns TaskNotFoundError. Client-provided IDs for creating tasks are unsupported.
Fixes and other changes 32
JSON-RPC dispatch now uses A2A-Version.
JSON-RPC errors are returned with HTTP 200.
JSON-RPC response versions are now validated.
The server adds optional media type validation against the agent's defaultInputModes.
Status or artifact event metadata now propagates to the task.
When creating push notification configs through REST, taskId is now correctly set from path parameters.
Avoids mutating the caller's message configuration.
Guards terminal state transitions and makes cancelTask atomic.
Scopes the manager by tenant and owner to match TaskStore.
Accepts JSON-RPC calls with omitted params.
Rejects empty task IDs with RequestMalformedError.
Preserves HeadersInit in authenticating fetch.
Preserves historyLength=0 rather than treating it as absent.
Preserves call context for tenant requests.
Rejects invalid REST listTasks pageSize values.
Rejects invalid status filters with RequestMalformedError.
Missing push notification configs now return 404/-32001.
Rejects whitespace-only taskId values.
Stamps the resolved taskId onto sendMessage push configs.
Rejects missing required extensions before mutating task history.
Array and string fields now receive null and undefined checks during v0.3 translation.
Input and output parameters are now serialized for listTasks.
Tasks are no longer filtered when task state is unspecified.
Push notification configurations are cloned before storage, preventing stored configurations from sharing the caller's object.
Global error branding fixes instanceof checks across bundle entry points.
The server now sends the full Task on every v0.3 push trigger.
Calls the context builder in the compatibility layer.
Normalizes legacy cards when creating from an agent card.
Awaiting _handleProcessingError lets errors surface from blocking drains.
Null values are preserved when using protobuf Struct.
The resubscribe route now supports GET.
The client cancels the SSE stream on teardown to avoid leaking connections.
@a2a-js/sdk 0.332 changes
Breaking changes 3
A JSON-RPC response id mismatch now causes an error to be thrown.
REST transport now uses ProtoJSON, changing the format used for REST communication.
Removing the EventEmitter dependency enables use in the Edge Runtime.
New APIs and options 12
A gRPC client is implemented, adding gRPC client functionality for developers.
A gRPC server is implemented, adding gRPC server functionality for developers.
Adds a REST client for communicating with A2A servers.
AgentCardResolver was introduced.
Client interceptors were implemented.
Server-side support for extended cards was added.
Client-side support for extendedAgentCard was added.
Client-side support for extension headers was added.
Server-side http+json support was implemented.
Server-side authentication support was added.
Server-side support for extensions was added.
A transport-agnostic client was introduced.
Behavior and default changes 1
Transport protocol name comparison is now case-insensitive.
Fixes and other changes 16
POST requests to pushNotificationConfigs now properly parse the ProtoJSON body.
Fixes push configuration being lost after normalization for REST transport.
AgentCardResolver now supports proto-based AgentCard instances.
SSE errors preserve the typed error as their cause, allowing developers to access it.
SSE stream parsing no longer uses the ReadableStream async iterator.
Generated types now use proto default values, aligning their defaults with the protocol.
Added typesVersions to support legacy module resolution.
Passes ServerCallContext to getAuthenticatedExtendedAgentCard for REST.
Exports transport-agnostic errors from the client.
Errors occurring in non-blocking sendMessage are now handled.
cancel/task now returns the expected 'cancelled' task status.
Enables issuing a follow-up task on a non-blocking request.
Validates JSON-RPC params.
Validates JSON-RPC request IDs according to the spec.
Ensures push notifications are delivered in order.
Ensures user messages are added to existing tasks.