Skip to content

A2A CLI

Agent2Agent Protocol Logo

Discover, message, and manage A2A agents from your terminal.

Latest release License: Apache-2.0

The A2A CLI (a2a) is the official command-line client for A2A (Agent2Agent) agents, maintained by the A2A Project Team.

a2a CLI demo: build a server from a script, then discover and message it

Why the A2A CLI

The a2a CLI is one consistent way to work with A2A agents — no throwaway scripts or raw-JSON parsing just to talk to an agent.

  • AI coding agents delegate work to A2A agents through one command surface, driven from a bundled skill descriptor — no custom plugins per harness.
  • Developers inspect and drive any deployed agent from the terminal — fetch a card, send a message, stream updates, list or cancel tasks, one readable command each.
  • Automation and CI call agents from a stable, scriptable surface: protocol-native JSON (-o json) and predictable exit codes, no client library required.

The CLI handles the underlying complexity. It negotiates the transport (JSON-RPC, REST, or gRPC) from the agent's card, waits for a task to finish unless you tell it not to, and behaves the same across agents and languages.

Installation

Homebrew (macOS / Linux)

brew tap a2aproject/a2a-cli https://github.com/a2aproject/a2a-cli
brew install a2a

WinGet (Windows)

winget install a2aproject.a2acli

Prebuilt binaries — download an archive from the latest release, extract it, and put the a2a binary on your PATH.

From source

go install github.com/a2aproject/a2a-cli@latest
# go install names the binary `a2a-cli`; rename it to `a2a`
mv "$(command -v a2a-cli)" "$(dirname "$(command -v a2a-cli)")/a2a"

Usage

# Discover an agent's card
a2a card get https://agent.example.com

# Send a message and wait for the result
a2a send -a https://agent.example.com "Hello, what can you do?"

# Stream events as they arrive
a2a send -a https://agent.example.com --stream "Summarize this document"

See the full command reference for all commands, flags, configuration, and server mode.

Cookbook

Learn the CLI by example. The cookbook is a short, hands-on course — each lesson is a small folder you can run on its own, building from your first A2A server up to streaming, configuration, and the full message and task lifecycle:

  1. Build a quick A2A server — turn an ordinary script into an A2A server with --exec, then send it a message.
  2. Discover and talk to an agent — read an agent's card, save it, and send a text message.
  3. Configure the CLI — flags, environment variables, and .env files, and how to tell which one won.
  4. Messages and tasks — build multi-part messages, stream replies, and follow a task through its lifecycle.

Agent Skill

Give your AI coding agent the ability to drive a2a directly. The a2a-cli Agent Skill teaches harnesses like Claude Code, Cursor, and Codex to delegate work to A2A agents from the command line.

Install it into your agent with skills:

npx skills add https://github.com/a2aproject/a2a-cli --skill a2a-cli

The skill drives the a2a binary, so install the CLI first. The descriptor lives at skills/a2a-cli/SKILL.md.

Agent Plugin

Prefer a plugin-aware client? The Agent Plugin bundles the same skill as one installable unit (Agent Plugins 1.0.0, skills-only). Install it with skills:

npx skills add https://github.com/a2aproject/a2a-cli/tree/main/agent-plugin/skills/a2a-cli -g

Like the skill, it drives the a2a binary — install the CLI first.

About the Project

Several community and SDK-provided A2A CLIs existed across languages, but they diverged in command names, flags, output shapes, and transport handling. This project reconciles them into one standardized CLI — built for long-term stability and cross-transport consistency. It builds on the CLI from the A2A Go SDK.

The Specification (SPEC.md) captured that reconciliation — command taxonomy, output contracts, polling/streaming rules, and exit codes — and served as the roadmap.

Custom Transport Plugins

The CLI speaks JSON-RPC, REST and gRPC out of the box. Additional transport bindings can be added without recompiling by dropping an a2a-transport-<name> binary on your PATH. The CLI launches the plugin as a local proxy that speaks a standard A2A binding and forwards to the custom protocol, so --transport <name> works uniformly for built-ins and plugins:

$ a2a transport list
$ a2a send --transport slimrpc --endpoint slim://agents.example/agent "hello"

Authoring a plugin in Go is a few lines with the devkit/clitransport package — you provide an a2aclient.Transport, it produces a CLI-compatible plugin. See the transport plugin guide and the runnable echo plugin example.

How to Contribute & Provide Feedback

We welcome review and input from engineers and the community:

  1. Read the Specification (SPEC.md) for background.
  2. Open an issue or pull request to share suggestions, questions, or edge cases.

You can also help by sharing how you use the tool. See the Contributing guide; conformance details live in the Compliance Checklist (COMPLIANCE.md).

License

The A2A CLI and Specification are open-source and licensed under the Apache License 2.0.

About

The official command-line interface for interacting with A2A (Agent2Agent) compatible agents.

Resources

Code of conduct

Contributing

Security policy

Stars

98 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages