Goal: Give a human a simple, interactive multi-turn conversation with an agent from the terminal, without re-typing identifiers on every turn.
User story: As a developer exploring an agent, I want an interactive chat that remembers the conversation, so that I can go back and forth without re-passing --context-id and --task-id each turn.
Priority: P2 · Area: CLI code
Problem
Driving a multi-turn conversation today means running a2a send repeatedly and manually carrying --context-id (and --task-id while a task is paused) from one command's output into the next. There is no interactive session command:
$ a2a chat --help
Error: unknown command "chat" for "a2a"
Proposed behavior
Add an interactive a2a chat command for a back-and-forth session with one agent:
- Reads a message from the prompt, sends it, prints the agent's reply, and loops.
- Carries the
contextId across turns automatically (and the active taskId while a task is interrupted), so the user never copies identifiers by hand — the CLI stays stateless between processes, but a live chat session holds this in memory for its own duration only.
- On
INPUT_REQUIRED, prompts for the reply and continues the same task; on AUTH_REQUIRED, stops and explains what's needed.
- Prints the
taskId/contextId so a user can resume later with a2a send.
- Plain, readable output; exits cleanly on EOF/
Ctrl-D or a /quit command.
Interactive-safety requirements
chat is interactive-only: it must auto-degrade to non-interactive send behavior when stdout is not a terminal, and must never block waiting on input in a pipe/CI context.
- It must not be the default command; a script's behavior must not change because it happened to run in a terminal.
Who benefits
- Developers exploring or debugging an agent conversationally.
- Anyone giving a quick demo of an agent from the terminal.
Acceptance criteria
Environment
- CLI version:
a2a version v0.0.0-…1e29dfe94f95+dirty
- OS: Linux x86_64
Notes
This is an ergonomics layer built entirely on top of the existing send/task behavior — it introduces no new protocol behavior, only an interactive front-end that manages identifiers for the length of the session.
Goal: Give a human a simple, interactive multi-turn conversation with an agent from the terminal, without re-typing identifiers on every turn.
User story: As a developer exploring an agent, I want an interactive chat that remembers the conversation, so that I can go back and forth without re-passing --context-id and --task-id each turn.
Priority: P2 · Area: CLI code
Problem
Driving a multi-turn conversation today means running
a2a sendrepeatedly and manually carrying--context-id(and--task-idwhile a task is paused) from one command's output into the next. There is no interactive session command:Proposed behavior
Add an interactive
a2a chatcommand for a back-and-forth session with one agent:contextIdacross turns automatically (and the activetaskIdwhile a task is interrupted), so the user never copies identifiers by hand — the CLI stays stateless between processes, but a livechatsession holds this in memory for its own duration only.INPUT_REQUIRED, prompts for the reply and continues the same task; onAUTH_REQUIRED, stops and explains what's needed.taskId/contextIdso a user can resume later witha2a send.Ctrl-Dor a/quitcommand.Interactive-safety requirements
chatis interactive-only: it must auto-degrade to non-interactivesendbehavior when stdout is not a terminal, and must never block waiting on input in a pipe/CI context.Who benefits
Acceptance criteria
a2a chat -a <agent>runs a multi-turn loop, carryingcontextId/taskIdautomatically.INPUT_REQUIRED(prompt + continue) andAUTH_REQUIRED(stop + explain)./quitand EOF exit cleanly; the lasttaskId/contextIdare printed for later resume.Environment
a2a version v0.0.0-…1e29dfe94f95+dirtyNotes
This is an ergonomics layer built entirely on top of the existing
send/taskbehavior — it introduces no new protocol behavior, only an interactive front-end that manages identifiers for the length of the session.