A2A Protocol Endpoints
message/send
Send synchronous messages to A2A agents and receive immediate responses
POST
Overview
Themessage/send method is the primary way to communicate with A2A agents synchronously. Send a message and receive a complete response in a single HTTP request.
Synchronous Communication: This method blocks until the agent provides a complete response. For streaming responses, use
message/stream instead.Request
Headers
Must be
application/jsonYour API key for authentication
Path Parameters
Unique identifier of the target agent
Body Parameters
JSON-RPC version, must be
"2.0"Unique identifier for this request (for response correlation)
Must be
"message/send"Message parameters object
Response
Success Response
JSON-RPC version, always
"2.0"Result object containing the agent’s response
Request ID (matches the request ID)
Error Response
JSON-RPC version, always
"2.0"Error information
Request ID (matches the request ID)
Examples
Multi-turn Conversation Example
File Upload Example
Best Practices
Message IDs
Message IDs
- Always use UUID v4 for
messageIdfields - Keep request IDs unique for proper correlation
- Store
contextIdfrom responses for multi-turn conversations
File Uploads
File Uploads
- Use Base64 encoding without data URL prefix
- Specify correct MIME types for proper handling
- Keep files under 5MB for optimal performance
Error Handling
Error Handling
- Always check for
errorfield in responses - Implement retry logic for transient errors (5xx codes)
- Validate JSON-RPC format before sending requests