Send A2A Message
a2a_send_messageSend text messages to any A2A-compliant agent and get either an immediate response or a task object for async handling. Use an existing task ID to follow up on ongoing conversations.
Instructions
Send a message to an Agent-to-Agent (A2A) protocol compliant agent.
This tool establishes communication with an A2A agent and sends a text message. The agent may respond immediately with a message or return a task object for asynchronous processing.
Args:
agentCardUrl (string): URL to the agent's card endpoint, typically at /.well-known/agent-card.json
message (string): The text message to send to the agent (1-10,000 characters)
taskId (string, optional): Existing task ID to continue a conversation thread. If provided, the message is sent as a follow-up to the specified task.
Returns: JSON response containing either:
A message object with the agent's immediate response
A task object for asynchronous operations, containing:
id: Task identifier
status: Current task state and progress
artifacts: Any generated outputs or results
kind: Response type ("message" or "task")
The response may include multiple parts (text, images, etc.) depending on the agent's capabilities.
Examples:
Use when: "Ask the weather agent what the forecast is for tomorrow" params: { agentCardUrl: "https://weather-agent.example.com/.well-known/agent-card.json", message: "What's tomorrow's forecast?" }
Use when: "Continue the conversation with task abc-123" params: { agentCardUrl: "https://agent.example.com/.well-known/agent-card.json", message: "Thanks, can you be more specific?", taskId: "abc-123" }
Don't use when: You need to cancel a task (use a2a_cancel_task instead)
Don't use when: You need to check task status (use a2a_get_task instead)
Error Handling:
Returns "Error: Failed to connect to agent" if the agent URL is unreachable
Returns "Error: Invalid agent card" if the card endpoint doesn't return valid A2A metadata
Returns "Error: Message sending failed" if the agent rejects the message
If a task is returned, use a2a_get_task to poll for completion status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | No | Optional task ID to continue an existing conversation thread | |
| message | Yes | The text message to send to the agent | |
| agentCardUrl | Yes | URL to the agent's card endpoint (e.g., https://example.com/.well-known/agent-card.json) |