A2A CLI 0.5.0 Adds OAuth Sign-In With OS Keychain Storage and Lets Coding Agents Discover Other Agents Automatically
The official Agent2Agent command-line client's November 19 release adds OAuth login, optional OS-keychain token storage, a contact book, and hooks that let Claude Code or opencode discover other A2A agents mid-session.
Overview
a2a-cli, the official command-line client for Agent2Agent (A2A) agents, published version 0.5.0 on November 19, 2026. The release adds OAuth sign-in through new a2a auth commands, an option to keep OAuth tokens in the operating system’s keychain instead of a plain file, a “contact book” of trusted agents, and hooks that let coding agents such as Claude Code and opencode discover other A2A agents during a session. A2A describes itself as “an open protocol enabling communication and interoperability between opaque agentic applications,” and the project sits under the Agentic AI Foundation, per its README.
According to the project’s README, a2a is built on A2A Protocol v1.0 and also speaks v0.3, and lets a user or a coding agent “discover agents, send them messages and files, stream their replies and manage their tasks over JSON-RPC, REST, gRPC or a transport you plug in.” The README says the project “reconciles the community and SDK A2A CLIs into one standard client,” building on the command-line tool that shipped with the A2A Go SDK.
OAuth sign-in and keychain storage
The v0.5.0 release notes list “add OAuth sign-in and a2a auth commands” and “keep OAuth tokens in the OS keychain” as two of the release’s features. The new a2a auth login command signs a user into an agent and stores the resulting OAuth grant without sending a message; it learns where to sign in from the agent card’s OAuth2 or OpenID Connect security scheme, or from a 401 response’s Bearer challenge, and either opens a browser redirect to 127.0.0.1 or, with --device, prints a URL and a code to enter on another device. a2a auth list lists stored grants and a2a auth logout revokes and deletes them.
Per the command reference, the global --oauth-store flag defaults to file, which writes grants to ~/.config/a2a-cli/oauth/grants.json, while --oauth-store keychain keeps the tokens in the OS keychain instead. A separate --oauth flag controls when OAuth runs at all: it defaults to off, auto signs in automatically when an agent requires it and a terminal is attached, and cached uses only grants already stored, which the auth command docs say lets “scripts and sandboxed agents run after an a2a auth login.” The same docs note that OAuth only signs in when an agent responds with a 401; any other credential supplied via --auth, --svc-param, or a credential helper is tried first. Separately, the project’s security documentation lists oauth, oauth-clients, oauth-default-client-id and oauth-store among the settings the CLI will not read from a .env file it discovers by walking up from a cloned repository, so a repository a user clones cannot silently turn OAuth on or redirect a sign-in to a client of its choosing.
Contacts and automatic agent discovery
The release also adds a “contact book,” described in the contacts guide as a store of “named agents you trust, so you can refer to an agent by a short name in place of a card URL or identifier.” Commands include a2a contact add, list, get and remove.
Alongside contacts, the release ships “agent discovery hooks” and, for opencode specifically, a dedicated plugin file. The coding-agents guide says that in Claude Code, the a2a-cli plugin “adds hooks that run a2a hook on SessionStart, UserPromptSubmit and PostToolBatch,” while for opencode it “carries an opencode plugin, ai.opencode/plugins/a2a-hook.js, that runs a2a hook from opencode’s events.” When a URL surfaces in a conversation or in a WebFetch or WebSearch tool call, the hook looks for an agent card at that origin’s /.well-known/agent-card.json path and for an AI Catalog at /.well-known/ai-catalog.json; agents it finds are “listed as unverified,” and the coding agent is told to ask the user before delegating to them. The guide says the hook itself “makes no network requests,” deferring the actual fetch to a detached a2a hook probe process so it does not slow down a turn, and that found cards and catalogs are cached for 24 hours.
The security documentation describes guardrails on that probe: it refuses to follow a redirect from a public address to an internal one, never connects to link-local addresses — which it says covers the IPv4 cloud metadata endpoint 169.254.169.254 — and follows at most three redirects. The same document states that “card and catalog text is presented to the model as information, not instructions,” and that discovery, like the OAuth settings, is excluded from a discovered .env file, so a cloned repository cannot turn the probing on by itself.
AI Catalog support
The release notes also list “discover AI Catalog agents alongside agent cards” and “resolve --agent-card from AI Catalogs.” According to the AI Catalog guide, an AI Catalog “lists AI artifacts, A2A agents among them,” and a2a can register one and resolve --agent-card to an agent by its catalog identifier instead of a card URL; the guide labels catalog support “experimental.” Registered catalogs are kept in a store the guide says is shared with the separate ai-catalog-cli project, so a catalog registered with either tool is visible to both.
What’s not covered
The release notes do not give adoption or download figures for 0.5.0, and none of the cited sources report how many agents or catalogs the new discovery and AI Catalog features have been tested against in production. The prior release, 0.4.0, shipped November 4, 2026, and had added an interactive chat command and an install script for macOS and Linux.