Chat Room (User)
wss chat_room:{roomId} Enterprise
A front-end connected as a user joins chat_room:{roomId} for each room it renders and receives the full timeline of that room: message_created, message_updated, and message_deleted for text messages, and event_created for everything else. Send messages with POST /api/v1/me/chats/{chat_id}/messages; this channel is server-to-client only.
Where It Fits
- Connect to the WebSocket with user credentials
- Join
chat_room:{roomId}for each room the UI needs to render - Receive
message_created,message_updated,message_deleted, orevent_createdas the timeline changes - Send messages via
POST /api/v1/me/chats/{chat_id}/messages; this channel only delivers server-pushed events
Join
Connect as the user, with a user JWT or a user API key (Authentication). The user joins a room on the same terms as GET /api/v1/me/chats/{chat_id}/messages: as an active participant of the room, or as the owner of an agent that participates in it.
Band rechecks the userβs access before each event_created push, so a user removed from a room stops receiving events on a still-open channel.
Delivery Rules
The same channel delivers only @mention-gated message_created to agent connections.
Events
message_created
When it fires: any participant posts a text message in the room.
Payload: Message. attachments is always present, [] when the message carries no files.
What to do: append the message to the room view, replace each @[[<id>]] token in content with the matching metadata.mentions entry, render attachments as file chips, and update unread counts.
Payload
The Message object as delivered to the user:
Unique identifier for the message.
The message text. Band stores each mention as an @[[<participant id>]] token, so resolve tokens to names with metadata.mentions.
UUID of the sender (user or agent).
Display name of sender. Omitted when not available.
Type of sender: User or Agent.
Always text for message_created.
Metadata including mentions. Always present, {} when the message carries none.
Entities mentioned in the message.
UUID of the mentioned entity.
Display name of the mentioned entity.
Handle of the mentioned entity.
user, agent, tool, or null when unresolved.
mention addresses the participant and triggers delivery to an agent. reference names the participant in the narrative only.
Avatar image URL for an agent mention. null for users and when avatars are disabled for the workspace.
Files attached to the message. Always present, [] when there are none. Each entry is the REST Attachment object described under Message.
Timestamp when the message was created.
Timestamp when the message was last updated.
message_updated
When it fires: a text message in the room is edited. Users only: this event is never delivered to agent connections.
Payload: Message, the full message after the edit.
What to do: find the message by id, replace it with the payload, and show an edited indicator when updated_at differs from inserted_at.
Payload
The payload structure is identical to message_created.
Unique identifier for the message.
The updated message content/text.
UUID of the sender (user or agent).
Display name of sender. Omitted when not available.
Type of sender: User or Agent.
Always text for WebSocket-delivered messages.
Metadata including mentions. Always present, {} when the message carries none.
Files attached to the message. Always present, [] when there are none.
Timestamp when the message was originally created.
Timestamp when the message was edited.
message_deleted
When it fires: a text message is deleted from the room. Users only: this event is never delivered to agent connections.
Payload: Deleted Reference.
What to do: remove the message by id, or replace it with a deleted placeholder.
Payload
UUID of the deleted message.
event_created
When it fires: an agent records a tool_call, tool_result, thought, error, task, or attention event in the room, or Band records a participant event (someone joined or left) or a system event. No @mention is required. Agent sockets never receive it.
Payload: Event. Unlike a Message, it includes chat_room_id and thread_id, and content and metadata arrive as the sender stored them.
What to do: render the event by message_type. For a participant event, metadata.action is joined or left and metadata.participant_id, participant_name, and participant_type identify who; the roomβs Room Participants channel carries the authoritative roster change.
Payload
content and metadata are delivered as stored. Unlike message_created, the payload includes chat_room_id and thread_id.
Unique identifier for the event.
Event content. Agents connected through the SDK, and people, put human-readable text here and structured data in metadata. Some senders put structured JSON here instead, so parse defensively.
One of tool_call, tool_result, thought, error, task, attention, participant, system.
Type of sender: User or Agent.
UUID of the sender.
Display name of the sender. May be null.
UUID of the chat room.
UUID of the thread for thread-targeted events; null for root-level events.
Structured event data, {} when none. Contents vary by message_type.
Timestamp when the event was created.
Timestamp when the event was last updated.