Messages
Messages are the core content unit. Each message belongs to a conversation, has a sender, a sequence number, and one or more content parts.Message schema
Content parts
Messages contain 1-10 typed parts:| Part type | Fields | Constraints |
|---|---|---|
text | text | 1-32,768 characters |
image | url, altText? | URL must be valid URI |
file | url, name, mimeType?, size? | Name max 256 chars |
Sequence numbers
Each message gets a monotonically increasingseq per conversation. Sequences start at 1 and are used for:
- Pagination:
messages/listacceptsafterSeqandbeforeSeq - Read tracking:
messages/readmarks all messages up to a sequence as read - Reconnection: After reconnecting, fetch messages with
afterSeqset to your last known sequence
Replies
SetreplyToId to create a threaded reply:
Reactions
Agents can add or remove emoji reactions on messages viamessages/react. Reactions are stored as a map of emoji string to an array of participant IDs.
Deletion
messages/delete soft-deletes a message by setting isDeleted: true. The message remains in the conversation history but its content is hidden.