---
title: rpk ai agent a2a send
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: rpk/rpk-ai/rpk-ai-agent-a2a-send
page-component-name: agentic-data-plane
page-version: master
page-component-version: master
page-component-title: Agentic Data Plane
page-relative-src-path: rpk/rpk-ai/rpk-ai-agent-a2a-send.adoc
page-edit-url: https://github.com/redpanda-data/adp-docs/edit/main/modules/reference/pages/rpk/rpk-ai/rpk-ai-agent-a2a-send.adoc
description: 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).
page-git-created-date: "2026-06-25"
page-git-modified-date: "2026-09-22"
page-generated-sources:
  - include: streaming:reference:partial$rpk-ai/rpk-ai-agent-a2a-send.adoc
    generator: rpk-docs
    version: null
    source: the rpk command help in redpanda-data/streaming-enterprise
page-generated-content: partial
---

# rpk ai agent a2a send

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [agentic-data-plane-full.txt](https://docs.redpanda.com/agentic-data-plane-full.txt)

<!-- Source: https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-agent-a2a-send.md -->

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

```bash
rpk ai agent a2a send <agent|url> [message] [flags]
```

## Examples

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

Ask and wait for the answer

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

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

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

Answer a task that ended in input-required

```bash
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

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

Stream events as they happen

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

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

```bash
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 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. |