Every agent is now a CLI: a2a use
`a2a use <agent>` turns any published agent into typed terminal commands — real flags from the card's JSON Schema, @file and stdin support, and a setup handshake for keys and config.
Every agent is now a CLI: a2a use
Last night we published a blog post through our own blog agent. It took a 90-line scratch script: fetch the card, read the skills by eye, guess the payload envelope, hand-wire the auth header, retry until it parsed.
The post went up. The script went in the trash — like every scratch script written against every agent, everywhere, every day.
That tax is gone. As of a2a-pack 0.1.101:
a2a use blog-openapi-agent
a2a blog-openapi-agent create-blog-post --title "Hi" --content @post.mda2a use <agent> turns any published agent into typed terminal commands. This very post was published that way — the scratch script's replacement announced by the replacement itself.
What a2a use does
One command, three things:
- Fetches the agent's card — every skill with its real JSON Schema input,
plus the agent's consumer-setup manifest.
- Runs the setup handshake — diffs what the agent needs (API keys, config)
against what you've stored, prompts only for what's missing, secrets without echo. Configuration surfaces as an install-time prompt with field names, not a runtime 500.
- Mounts the skills as typed subcommands — from then on, `a2a <agent>
<skill> --flag value, with generated --help`, enforced required flags, and real types.
$ a2a use blog-openapi-agent
blog-openapi-agent https://blog-openapi-agent.a2acloud.io
✓ API base URL (OPENAPI_BASE_URL)
✓ bearerAuth bearer credential (BEARERAUTH_TOKEN)
commands:
a2a blog-openapi-agent list-blog-posts
a2a blog-openapi-agent create-blog-post
a2a blog-openapi-agent get-blog-post
...Files and pipes are first-class
Any string flag accepts @file to read contents, and @- to read stdin. Structured fields take inline JSON or @file.json.
a2a blog-openapi-agent create-blog-post \
--title "Release notes" \
--content @notes.md \
--tags '["release","cli"]'Your shell is the integration. Results print as clean JSON, so agents compose with jq, xargs, CI pipelines, and cron like any well-behaved Unix tool.
Where the types come from
The agent card is a contract, not a description. Skill method signatures compile to JSON Schema at decoration time and publish on the card. And as of this release, OpenAPI-generated agents publish each operation's *true* parameter and request-body schema — no more body: any. The CLI renders that schema as flags; nothing is guessed.
For skills that keep a loose shape, a2a call is the schema-free escape hatch:
a2a call blog-openapi-agent get_blog_post parameters='{"slug":"cloud-dev"}'
a2a call some-agent some-skill --json @args.jsonWhy this matters if you publish agents
Publishing an agent now means shipping a CLI to every consumer, for free. No client library to write, no docs page explaining payload shapes, no "see the examples folder." The card you already publish *is* the interface — a2a use just makes every terminal honor it.
Discovery to invocation is now four lines:
pip install -U a2a-pack
a2a agents # find something useful
a2a use <agent> # mount it
a2a <agent> <skill> --help # you already know the restTry it
pip install -U a2a-pack, pick any agent from a2a agents, and a2a use it. If it declares setup, you'll be prompted once. Then its skills are yours.
Full reference in the docs. And yes — this post went up with a2a blog-openapi-agent create-blog-post --body @post.json, on the very first release of a2a use. As agents republish their refreshed schemas, that --body dissolves into real per-field flags — --title, --content @post.md.