Repository navigation
docs(a2a): document the usage extension - #982
Merged
Merged
Conversation
A2A has no usage field, so the ADKs report a task's token usage and execution stats through the usage extension: URI-namespaced task metadata keys, declared in the agent card and activated per request with the A2A-Extensions header. The A2A page explains the extension and how the CLI uses it. The Go, Rust and TypeScript ADK pages cover the card declaration, activation, the metadata keys and how a client activates it.
Closed
9 of 10 tasks
Contributor
|
🗑️ Preview environment destroyed. |
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Oct 4, 2026
## [0.9.21](0.9.20...0.9.21) (2026-10-04) ### 📚 Documentation * a2a-debugger needs adk v0.31.0 agents ([#951](#951)) ([9c3802e](9c3802e)) * **a2a:** document the usage extension ([#982](#982)) ([e8fdae2](e8fdae2)) * add typescript adk env var and dependency reference ([#974](#974)) ([5c65abf](5c65abf)) * **agents:** add code readability guidelines ([#960](#960)) ([f501b37](f501b37)) * blocking SendMessage and StreamResponse push payload ([#935](#935)) ([0b06c96](0b06c96)) * blocking SendMessage, MessageResponder, artifact events ([#934](#934)) ([d95fc53](d95fc53)) * bump operator pins to v0.27.0, add gpu to cleanup ([#963](#963)) ([c01c5da](c01c5da)) * **cli:** read not-found hints and repeated-failure match ([#900](#900)) ([98051c4](98051c4)) * **cli:** show subagents in plan mode and fill the remaining subagent gaps ([#898](#898)) ([f15ea4b](f15ea4b)) * correct adl-cli acronym naming examples ([#980](#980)) ([23a8a9c](23a8a9c)) * correct cli telemetry signals, opt-out and defaults ([#964](#964)) ([95d9c74](95d9c74)) * correct inert rust-adk config claims ([#979](#979)) ([06b08ab](06b08ab)) * correct mcp request timeout and tts download scope ([#969](#969)) ([df5a357](df5a357)) * document -32003 push notification capability gate ([#931](#931)) ([f1d1ae7](f1d1ae7)) * document /reload and the config built-in skill ([#923](#923)) ([96d6c2f](96d6c2f)) * document A2A v1.0.1 client behavior in the CLI ([#908](#908)) ([29c9481](29c9481)) * document gateway server ports and TLS refs ([#970](#970)) ([89a9e3f](89a9e3f)) * document gateway spec.a2a and agent discovery ([#953](#953)) ([28b2731](28b2731)) * document go sdk 429 quota wall and RateLimitError ([#972](#972)) ([3873cb7](3873cb7)) * document rust-adk agent card URL resolution ([#926](#926)) ([9fdac74](9fdac74)) * document sandbox.yaml and drop tools.sandbox keys ([#907](#907)) ([2d52cee](2d52cee)) * document the gateway A2A server ([#965](#965)) ([980dc65](980dc65)) * document the per-project media root ([#911](#911)) ([6865a9d](6865a9d)) * document the userspace tools.yaml policy file ([#915](#915)) ([e8eecdc](e8eecdc)) * document vendor block and pinned ADK versions ([#906](#906)) ([3d08671](3d08671)) * fix quickstart curl and prefixed model ids ([#966](#966)) ([08512df](08512df)) * gate push config methods on card capability ([#922](#922)) ([78a2ef9](78a2ef9)) * go adk artifact retention per-context cap ([#943](#943)) ([4c64837](4c64837)) * go adk client artifact extraction for a2a v1.0 ([#941](#941)) ([9cb57a6](9cb57a6)) * headless keep-alive subagents and agent defaults ([#895](#895)) ([866cbcf](866cbcf)) * ListTasks accepts proto3 default page params ([#930](#930)) ([7be4a33](7be4a33)) * max retries covers adk streaming path ([#945](#945)) ([9fc0a3e](9fc0a3e)) * note dim-at-zero icons in subagent run stats ([#913](#913)) ([26f34aa](26f34aa)) * note firefox/safari bridge auto-connect in opentask ([#976](#976)) ([56e890e](56e890e)) * note orchestrator a2a.agents[] takes plain urls ([#968](#968)) ([bd89997](bd89997)) * note proto3 param names and ignored unknown params ([#925](#925)) ([0509dbc](0509dbc)) * note pushNotifications capability gates config methods ([#927](#927)) ([a8793d7](a8793d7)) * registry cards show preferred protocol binding ([#938](#938)) ([0d9a9f5](0d9a9f5)) * rust adk blocking sendmessage and push delivery ([#939](#939)) ([783c168](783c168)) * rust-adk max artifacts 0 means unlimited ([#949](#949)) ([dd92128](dd92128)) * scope rust adk artifact paths by contextid ([#950](#950)) ([4f35230](4f35230)) * sync readme dev section with tooling config ([#967](#967)) ([ff6a220](ff6a220)) * update ADK pages for A2A v1.0.1 AgentCard ([#902](#902)) ([f474473](f474473)) * update card reference for A2A v1.0.1 shape ([#899](#899)) ([d3bdd76](d3bdd76)) * use a2a v1.0.1 jsonrpc method names ([#924](#924)) ([46859cc](46859cc)) ### 🔧 Miscellaneous * **deps-dev:** bump @types/node from 26.6.2 to 26.6.3 in the bun group ([#981](#981)) ([f5dfa81](f5dfa81)) * **deps:** bump claude-code 2.1.283 -> 2.1.285 ([#909](#909)) ([14e6ea9](14e6ea9))
Contributor
|
🎉 This PR is included in version 0.9.21 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A2A has no usage field, so the ADKs now report a task's token usage and execution stats through the usage extension. Its task metadata keys are namespaced by the extension URI. Agents declare it in their card, and clients activate it per request with the
A2A-Extensionsheader.a2a.md: a new "Usage Extension" section covers the card declaration, activation, and the two metadata keys. It says to treat missing usage as unknown, not zero. It also explains how the CLI uses the extension for A2A task tokens.adk.md: a new "Usage metadata" section covers automatic card declaration, header activation and gating, thetypes.UsageMetadataKey/types.ExecutionStatsMetadataKeykeys,include_usageon streams, and a client snippet. The task handler link and env table row point at it.rust-adk.md: a new "Usage metadata" section coversbuild()declaring the extension, gating, the key constants,Task::without_extension, andClientConfig::extensions. The builder table,A2AClientintro and env table link to it.typescript-adk.md: the usage metadata section now shows the namespaced keys, activation throughMethodContext.activatedExtensions, gating of tasks and terminal status updates, andwithUsageExtension(card)plus the clientheaders. The heading lost its(setEnableUsageMetadata)suffix, so its anchor is#usage-metadata. Nothing linked to the old anchor.Merge order
The Go ADK side is released (ADK v0.33.0). The Rust and TypeScript pages describe APIs from inference-gateway/rust-adk#227 and inference-gateway/typescript-adk#275, and the A2A page describes the CLI side from inference-gateway/cli#1529. Merge this after those PRs ship, or I can split the Rust and TS pages out.
Test plan
bun run format:checkandbun run lint:mdare clean.bun run buildis clean.