Integrate agents using the Agent-to-Agent protocol for standardized communication between AI agents
Key Point | Summary |
---|---|
Objective | Standardize conversation between AI agents (regardless of vendor) using JSON-RPC 2.0 |
Base format | Each call is a JSON object with jsonrpc:"2.0" , id , method and params |
Main methods | message/send • message/stream • tasks/get • tasks/cancel • tasks/pushNotificationConfig/{set|get} • tasks/resubscribe • agent/authenticatedExtendedCard |
Required IDs | messageId (UUID v4) within each message and id /taskId /callId to track request and task |
First-class features | Multi-turn conversations (contextId ) • File upload (parts[] type file with Base64 + MIME) • Push notifications via pushNotificationConfig • Authentication via x-api-key or Authorization: Bearer |
Task lifecycle | submitted → working → completed / failed / canceled , reported in result.status.state |
Request Structure
Typical Response
Initial Request
SSE Events
file
type in parts
:
data:mime/type;base64,
header.
Only the pure Base64 content should be included in the bytes
field.contextId
:
First message
Subsequent message
State | Description |
---|---|
submitted | Task has been received and is in the queue |
working | Task is being processed |
completed | Task completed successfully |
failed | Task failed during processing |
canceled | Task was canceled by the user |
Unique IDs
messageId
, id
, etc.)Multi-turn
contextId
for continuous conversationscontextId
in all subsequent messages of the same conversationFiles
bytes
fieldmimeType
Streaming
: ping
) appropriatelyEventSource
connection when final: true
CORS
Access-Control-Allow-Origin: *
) for browser testing