Specification

The Robotelos Conversation Protocol (MCoP), version 1: the exact rules for clients, servers and agents.

The Robotelos Conversation Protocol (MCoP) lets clients talk to agents through a server. Clients send commands. The server decides what is accepted, records the result as events in a journal, and streams those events to every client that follows the conversation. The same messages work over HTTP with Server-Sent Events, WebSocket and gRPC.

This specification gives the exact rules. The concept pages explain the same ideas in plain language; where the two differ, this specification prevails.

Conformance language

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY and OPTIONAL are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in capitals.

Overview

MCoP is built on five ideas:

  1. Commands go in, events come out. A client never writes to the journal. It proposes a command, and the server records the events the command causes.
  2. The journal is the single source of truth. Every client’s view is the journal reduced to a state. Two clients that have seen the same positions have the same view.
  3. Commands are idempotent. A command carries an identity and a payload digest. Retrying the same command never applies it twice.
  4. Agents propose, the server decides. Agent output is a proposal. Authorization, approvals and the customer-visible record belong to the server.
  5. Clients resume from a cursor. A client that disconnects asks for the events after its last position, and the server either serves them or asks for a new snapshot.
A conversation, step by step Sequence of an MCoP conversation: initialize, create the conversation, subscribe, send a message, the agent asks for approval, the client answers, and the outcome is recorded. Client Server Store Agent 1 initialize version, limits, principal 2 command create_conversation receipt ACCEPTED 3 subscribe snapshot at the current cursor 4 command submit_message append message receipt ACCEPTED 5 Reply(history) turn: approval for run ls 6 obligation v1 open frames: message, obligation 7 answer_obligation v1 + digest Resume(approved)
One conversation from start to finish. Steps 1 to 7 are described in the Client API part of this specification.

The parts of the protocol

Read the part that matches what you build.

APIForPages
Client APIConnecting a person, a terminal or an application to a conversationBase protocol, Transports, Schema, Data model, Commands, Delivery, Approvals
Shared rulesEvery implementationRoles and ownership, Security, Versioning, Conformance

Each page starts with a short note for adapter authors, so the protocol can be explained to someone who does not need every rule.