Skip to main content

Command-line interface for the Agent-to-Agent (A2A) protocol

Project description

a2a-cli

A command-line interface for the Agent-to-Agent (A2A) protocol v0.3.
Send messages, stream responses, inspect agent cards, and manage tasks — from your terminal, against any A2A-compatible server.


Install

pip install a2a-cli

Requirements: Python 3.10+


Quick start

# List all agents on a server
a2a list --agent http://localhost:8080/a2a

# Inspect an agent
a2a card --agent http://localhost:8080/a2a/my-agent

# Send a message
a2a send "What is the capital of France?" --agent http://localhost:8080/a2a/my-agent

# Stream the response live (SSE)
a2a stream "Summarize this for me" --agent http://localhost:8080/a2a/my-agent

# Check a task
a2a get <task-id> --agent http://localhost:8080/a2a/my-agent

# Cancel a running task
a2a cancel <task-id> --agent http://localhost:8080/a2a/my-agent

Set A2A_AGENT so you don't repeat --agent every time:

export A2A_AGENT=http://localhost:8080/a2a/my-agent
a2a send "hello"
a2a card

Commands

a2a list

List all agents exposed by an A2A server.

a2a list --agent http://localhost:8080/a2a
                        Exposed Agents
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                ┃ URL                                      ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ greeter             │ http://localhost:8080/a2a/greeter         │
│ support_agent       │ http://localhost:8080/a2a/support_agent   │
│ weather_reporter    │ http://localhost:8080/a2a/weather_reporter│
└─────────────────────┴──────────────────────────────────────────┘

a2a card

Fetch and display the agent card (/.well-known/agent-card.json).

a2a card --agent http://localhost:8080/a2a/greeter
╭──────────────────────── Agent Card ────────────────────────╮
│ greeter                                                     │
│ Version:     1                                              │
│ URL:         http://localhost:8080/a2a/greeter              │
│ Description: Agent workflow for greeter                     │
│                                                             │
│ Skills:                                                     │
│   • greeter  Agent workflow for greeter                     │
╰─────────────────────────────────────────────────────────────╯

Use --json for the raw agent card JSON:

a2a card --agent http://localhost:8080/a2a/greeter --json

a2a send

Send a message and display the result.

a2a send "hello world" --agent http://localhost:8080/a2a/my-agent
╭──────────────────────── A2A Task ──────────────────────────╮
│ Task ID: dcc14eac-364d-42e3-95f3-69f2c2b0f47c              │
│ State:   completed                                          │
│                                                             │
│ Output:                                                     │
│   Hello! You said: hello world                              │
╰─────────────────────────────────────────────────────────────╯

Options:

Flag Description
--json Print raw JSON response
--quiet, -q Print only the response text (great for scripting)
--context-id Conversation context ID for multi-turn exchanges
--task-id Continue an existing task
# Scripting — just the output text
a2a send "hello" --agent http://localhost:8080/a2a/my-agent --quiet

a2a stream

Send a message and stream the response live via SSE.

a2a stream "Write a summary" --agent http://localhost:8080/a2a/my-agent
● working
● completed
  Here is the summary...

Use --json to print raw SSE events:

a2a stream "hello" --agent http://localhost:8080/a2a/my-agent --json

a2a get

Fetch the current state of a task by ID.

a2a get dcc14eac-364d-42e3-95f3-69f2c2b0f47c --agent http://localhost:8080/a2a/my-agent
╭──────────────────────── A2A Task ──────────────────────────╮
│ Task ID: dcc14eac-364d-42e3-95f3-69f2c2b0f47c              │
│ State:   completed                                          │
│                                                             │
│ Output:                                                     │
│   Hello! You said: hello world                              │
╰─────────────────────────────────────────────────────────────╯

a2a cancel

Cancel a running task.

a2a cancel dcc14eac-364d-42e3-95f3-69f2c2b0f47c --agent http://localhost:8080/a2a/my-agent
Canceled task dcc14eac-364d-42e3-95f3-69f2c2b0f47c

Global options

Flag Description
--agent, -a Agent URL. Falls back to A2A_AGENT env var
--header, -H Extra request header, repeatable: "Authorization: Bearer <token>"

Protocol

Implements A2A v0.3:

  • message/send — synchronous request/response
  • message/stream — streaming via SSE
  • tasks/get — task status and output
  • tasks/cancel — cancel a running task
  • Agent card discovery at /.well-known/agent-card.json

Tested with


License

Apache 2.0 — conductor-oss/a2a-cli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conductor_a2a_cli-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conductor_a2a_cli-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file conductor_a2a_cli-0.1.0.tar.gz.

File metadata

  • Download URL: conductor_a2a_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for conductor_a2a_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c244521aa94fa89ac0e75f1f72c56919029aa675fb80042389bf9da30ae8f03
MD5 b5edd8fdac7107f42adb5b2a2b598c7d
BLAKE2b-256 073b3a881d6b252cf0e6dfded3a5bbe937cd054b6ca526d038fd507acd23f92c

See more details on using hashes here.

File details

Details for the file conductor_a2a_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for conductor_a2a_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1369e13c5179d820ee4f2db11f09a5b13faf634f8edfab6c26498cdd805dc71a
MD5 99c6072a7b6fcd532458fca105f48eaa
BLAKE2b-256 2a58ea04db44e7e2aae4189dd2614a3a99cbfd88d82d521c5a92f76bf582c3d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page