Goal: Let a user save an agent's file artifacts to local disk with one command, instead of only seeing them summarised in the terminal.
User story: As a developer whose agent produced files, I want task download to save the artifacts to disk, so that I can use the generated files directly instead of extracting base64 from JSON by hand.
Priority: P2 · Area: CLI code
Problem
The task command group covers get, list, subscribe, cancel, and push-config, but there is no way to save a task's file artifacts to disk. task get and send only render/report artifacts (and a file part currently shows as [binary N bytes]), so a caller who wants the actual bytes has no supported command.
task download does not exist today:
$ a2a task download --help
Work with tasks
Usage:
a2a task [command]
Proposed behavior
Add a2a task download <taskId> that writes the task's artifacts to disk:
a2a task download <taskId> [--output-dir <dir>] [--artifact <id>]
- Writes each file artifact to
--output-dir (default: current directory), using the artifact's name and media type; falls back to a safe generated name when none is provided.
--artifact <id> (repeatable) downloads only the named artifact(s); default downloads all.
- Data/text artifacts are written too (e.g.
.json/.txt), so nothing is silently skipped.
- Reports each path written; refuses to overwrite unless
--force (or writes uniquely-named files).
- Works across transports and honours
-o json (emit the list of written paths as structured output).
Who benefits
- Developers pulling generated files (reports, images, data) from an agent without hand-parsing JSON.
- CI jobs that archive an agent's outputs as build artifacts.
- AI coding agents that need the produced files on disk to continue a workflow.
Acceptance criteria
Environment
- CLI version:
a2a version v0.0.0-…1e29dfe94f95+dirty
- OS: Linux x86_64
Notes
task list, task subscribe, and task push-config already exist — this request is scoped to the one missing member of the group, task download. The rendering of file parts by name/media-type/size is tracked separately and complements this command.
Goal: Let a user save an agent's file artifacts to local disk with one command, instead of only seeing them summarised in the terminal.
User story: As a developer whose agent produced files, I want task download to save the artifacts to disk, so that I can use the generated files directly instead of extracting base64 from JSON by hand.
Priority: P2 · Area: CLI code
Problem
The
taskcommand group coversget,list,subscribe,cancel, andpush-config, but there is no way to save a task's file artifacts to disk.task getandsendonly render/report artifacts (and a file part currently shows as[binary N bytes]), so a caller who wants the actual bytes has no supported command.task downloaddoes not exist today:Proposed behavior
Add
a2a task download <taskId>that writes the task's artifacts to disk:--output-dir(default: current directory), using the artifact's name and media type; falls back to a safe generated name when none is provided.--artifact <id>(repeatable) downloads only the named artifact(s); default downloads all..json/.txt), so nothing is silently skipped.--force(or writes uniquely-named files).-o json(emit the list of written paths as structured output).Who benefits
Acceptance criteria
a2a task download <taskId>writes all artifacts to disk and prints the paths.--output-dirand--artifactselection work.-o jsonemits the written paths as structured output; exit code reflects success/failure.--artifact, and a missing task.Environment
a2a version v0.0.0-…1e29dfe94f95+dirtyNotes
task list,task subscribe, andtask push-configalready exist — this request is scoped to the one missing member of the group,task download. The rendering of file parts by name/media-type/size is tracked separately and complements this command.