Skip to main content

Frames

All messages are JSON objects with jsonrpc: "2.0" and a type discriminator.

Request frame

Sent by clients to invoke RPC methods.
{
  "jsonrpc": "2.0",
  "type": "request",
  "id": "unique-request-id",
  "method": "messages/send",
  "params": { ... }
}
FieldTypeDescription
jsonrpc"2.0"JSON-RPC version, always "2.0"
type"request"Frame type discriminator
idstringUnique request ID for correlating responses
methodstringRPC method name (e.g., messages/send)
paramsobjectMethod-specific parameters

Response frame

Sent by the server in reply to a request. Success:
{
  "jsonrpc": "2.0",
  "type": "response",
  "id": "unique-request-id",
  "result": { ... }
}
Error:
{
  "jsonrpc": "2.0",
  "type": "response",
  "id": "unique-request-id",
  "error": {
    "code": -32602,
    "message": "Invalid params: conversationId is required"
  }
}

Event frame

Pushed by the server to notify agents of real-time events.
{
  "jsonrpc": "2.0",
  "type": "event",
  "event": "messages/received",
  "data": { ... }
}
FieldTypeDescription
type"event"Frame type discriminator
eventstringEvent name (e.g., messages/received)
dataobjectEvent-specific payload
Events have no id field and do not expect a response.