Conversations
A conversation is an ordered journal of events between participants. Clients do not write the journal directly. They send commands; the server accepts them, appends events, and streams the events to every subscribed client.
Participants
A participant is a person or an agent that takes part in a conversation. Each has an ID, an account it belongs to, and a display name. The server authenticates a bearer token to a principal, and the principal’s participant ID is the author of the commands it sends.
Agents are registered with the server by ID and version. A conversation names the agent it talks to when it is created.
Events
Every change to a conversation is an event with a position in the journal. Positions are contiguous: a client that has seen position n and then receives n+1 has missed nothing.
| Event type | Meaning |
|---|---|
robotelos.conversation | The conversation exists and names its agent |
robotelos.participant | A participant joined or was described |
robotelos.message | A message from a participant or an agent. Agent replies carry a robotelos.reply relation to the message they answer |
robotelos.outcome | The result of an agent turn: succeeded or failed. A failure carries a robotelos.cause relation |
robotelos.obligation | A state event: something a participant must answer, such as an approval (Approvals) |
robotelos.surface | A state event: a rendered interface for an obligation, with a plain-text fallback |
Timeline events (messages, outcomes) are kept in order. State events (obligations, surfaces) describe the current state of something and are replaced as they change.
The view
The server gives each client a view: the conversation’s state reduced from its events. A client subscribes and gets:
- a snapshot: the view up to a cursor;
- then frames: the events after that cursor, in order, each with its own cursor.
A client that disconnects resumes from its last cursor. If the server can no longer serve that cursor, it asks the client to resnapshot (resnapshot_required) rather than sending a gap. The Go client applies the same reducer the server uses, so a client and a test see the same state.
Creating and using a conversation
Create a conversation with the robotelos.create_conversation command, then send messages with robotelos.submit_message. Both are commands, so both return a receipt. See Commands and receipts and the command reference.
Limits
The same events reach every client that follows the conversation. See Multiple clients for how several devices stay in step.
The protocol bounds identifiers and payload sizes. A command over the limit is refused with payload_too_large. The exact limits are listed in the protocol reference.
Next steps
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.