Agentic Data Plane
Preview

rpk ai agent a2a send

Send a text message to an agent over A2A and print the reply.

The message comes from the positional argument, or from stdin when the argument is omitted or "-" (so you can pipe a prompt in).

By default the call blocks until the agent replies. Replies that spawn a long-running task print the task id so you can follow up with rpk ai agent a2a task get|watch|cancel. For work that may outlive --timeout (default 5m), prefer --stream or --no-block so the task id is in hand from the start.

Conversation state: every reply prints a context-id (stderr in the default format, part of the JSON in -o json). Pass it back via --context-id to continue the same conversation. When a task ends in state input-required, answer it by sending again with both --task-id and --context-id from the reply.

Output: the agent’s reply text goes to stdout; ids and state go to stderr as key: value lines so pipes stay clean. Use -o json for the full A2A response (message or task object). With --stream, json and yaml both emit one JSON event per line (JSONL).

Exit codes: 0 success or input-required, 4 task failed/canceled/ rejected, 1 anything else.

Usage

rpk ai agent a2a send [flags]

Examples

This section provides examples of how to use rpk ai agent a2a send.

Ask and wait for the answer

rpk ai agent a2a send financial-advisor "What moved the S&P 500 today?"

Continue the conversation from a previous reply’s context-id

rpk ai agent a2a send financial-advisor --context-id CTX "Why?"

Answer a task that ended in input-required

rpk ai agent a2a send financial-advisor --task-id TASK --context-id CTX "Account A-17"

Pipe the prompt from a file, get the full JSON reply

cat prompt.txt | rpk ai agent a2a send financial-advisor -o json

Stream events as they happen

rpk ai agent a2a send financial-advisor --stream "Give me a market summary"

Fire-and-forget: submit, then poll with task get

rpk ai agent a2a send financial-advisor --no-block "Deep analysis please"

Flags

Value Type Description

--context-id

string

continue an existing conversation (printed by a previous send).

--no-block

bool

return immediately with the submitted task instead of waiting for completion.

--stream

bool

stream the reply as A2A events (message/stream) instead of waiting for the final result.

--task-id

string

continue an existing task (for example, answer an input-required task).

--timeout

duration

abort the call after this long (0 to wait forever).

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.