Protocol quick reference

Bindings, operations, pushes, dispositions, commands, events and parts of the conversation protocol (MCoP) v1, on one page.

A cheat sheet for the conversation protocol (MCoP, the Robotelos Conversation Protocol), as built. It lists names and one-line meanings. The Specification has the exact rules, the field tables and the error codes; where this page and the specification differ, the specification prevails.

Bindings

BindingEndpointNotes
HTTP and SSEPOST /v1/rpc for requests, GET /v1/stream for pushed framesClients resume with subscribe from a cursor. The SSE stream does not use Last-Event-ID
WebSocketGET /v1/wsOne JSON message per text frame
gRPCone bidirectional streamRaw JSON bytes per message; no IDL
HealthGET /healthz (process alive), GET /readyz (ready to serve)HTTP listener only

Every binding carries the same messages and passes the same end-to-end suite. Requests carry a bearer token in the Authorization header; the server maps it to a principal (participant ID, account, display name). See Transports.

Operations

OperationPurpose
initializeNegotiate the protocol version and client information
commandSend a command; returns a receipt
subscribeStart a stream for a conversation from a snapshot or a cursor
read_afterRead events after a cursor, without a stream
get_receiptFetch the stored receipt of a command by its ID
unsubscribeStop a stream

Pushed messages

PushMeaning
framesEvents in cursor order, batched per message; each frame carries its own cursor
up_to_dateThe stream has reached the end of the journal. Also set on subscribe and read_after results
resnapshot_requiredThe client’s cursor cannot be served. Subscribe again from a snapshot

Dispositions

Every command receives exactly one disposition in its receipt: ACCEPTED (applied; events are in the journal), REJECTED (invalid or not allowed; see the error), CONFLICT (same command_id, different payload) or STALE (targets a version that is no longer current). See Receipts.

Commands

CommandWhat it doesMain fields
robotelos.create_conversationCreates a direct or group conversation; the sender becomes its ownerkind, title, participants
robotelos.submit_messageAdds a message. Starts an agent turn when an agent is addressedparts, mentions, relations
robotelos.answer_obligationAnswers an open obligation, such as an approval. The first valid answer countstarget.obligation_id, target.expected_version, answer.kind, request_digest
robotelos.update_participantInvites, adds, removes or changes the role of a participant of a grouptarget.participant_id, membership (invite, join, leave), role, agent_id, display

Every command carries a command_id. A retry with the same ID and payload returns the original receipt. Fields, rules and who may send what: Command catalog, Groups and participants and Approvals.

Events

TypeState eventContent
robotelos.conversationnoTitle and agent of the conversation
robotelos.participantyesParticipant ID, display name and account
robotelos.messagenoMessage parts. Agent replies carry a robotelos.reply relation
robotelos.outcomenosucceeded or failed. Failures carry a robotelos.cause relation
robotelos.obligationyesKind, version, status, responders, prompt, target, expiry and answer once answered
robotelos.surfaceyesA2UI v1.0 messages, a plain-text fallback and the obligation ID

Two relations connect events: robotelos.reply (this event replies to the one named) and robotelos.cause (this event is the cause of the one that carries it). See the data model.

Parts

A message or reply is a list of parts. Each part has exactly one of: text (plain text), data (structured JSON), url with mediaType (a reference to content) or raw (inline bytes).

Approval digest

The digest of an approval is the SHA-256 of the capability ID, the contract version and the effective arguments, as computed by protocol.ApprovalDigest. See Approvals.

Errors and versions

Every error has a code (not_authenticated, rate_limited, cursor_expired and others) and the specification says which are safe to retry: Error codes. The only protocol version built is 1: Versioning.

Next steps