Skip to main content
The message command group provides functionality to send messages to A2A agents and receive responses, with support for streaming, sessions, and authentication.

send

Send a message to an agent and receive a response.
handler message send <agent_url> <text> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent to send the message to
text
string
required
Message text to send to the agent

Options

--stream
flag
Stream responses in real-time. Short form: -s
--context-id
string
Context ID for conversation continuity. Use this to continue a previous conversation thread.
--task-id
string
Task ID to continue. Allows you to resume or continue an existing task.
--continue
flag
Continue from saved session. Uses the context ID and task ID from the last interaction with this agent. Short form: -C
--push-url
string
Webhook URL for push notifications. The agent will send updates to this URL.
--push-token
string
Authentication token for push notifications. Sent with webhook requests.
--bearer
string
Bearer token for authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for authentication. Overrides saved credentials. Short form: -k

Examples

handler message send http://localhost:8000 "What is the weather?"

Response Format

Successful responses include:
  • Context ID: Unique identifier for the conversation context
  • Task ID: Unique identifier for the task
  • State: Current state of the task (e.g., completed, working, auth-required)
  • Text: The agent’s response message
Use --continue to automatically resume your last conversation with an agent without manually specifying context and task IDs.
If you receive an auth-required state, you need to set credentials using handler auth set or provide them inline with --bearer or --api-key.

stream

Send a message and stream the response in real-time. This is a convenience alias for message send --stream.
handler message stream <agent_url> <text> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent to send the message to
text
string
required
Message text to send to the agent

Options

Same as message send (except --stream is automatically enabled):
  • --context-id - Context ID for conversation continuity
  • --task-id - Task ID to continue
  • --continue / -C - Continue from saved session
  • --push-url - Webhook URL for push notifications
  • --push-token - Authentication token for push notifications
  • --bearer / -b - Bearer token (overrides saved)
  • --api-key / -k - API key (overrides saved)

Examples

handler message stream http://localhost:8000 "Write a poem about technology"
Streaming is useful for long-running responses where you want to see output as it’s generated rather than waiting for the entire response.

Session Management

Handler automatically saves session state (context ID and task ID) after each message. Use the --continue flag to resume conversations:
# First message
handler message send http://localhost:8000 "Hello"
# Session saved automatically

# Continue conversation
handler message send http://localhost:8000 "What did I just say?" --continue
See session commands for managing saved sessions.