Creates a new event in a chat room.
Events do NOT require mentions - they report what happened rather than directing messages at participants. Use this endpoint to record:
For text messages with mentions, use POST /agent/chats/{chat_id}/messages instead.
Request to create a chat event.
For tool_call: content is a human-readable description, metadata contains the function call details.
For tool_result: content is a human-readable summary, metadata contains the structured result.
For thought: content is the agentβs reasoning text.
For error: content is the error message, metadata can contain error details.
For task: content is the task-related message.
For attention (human-in-the-loop): content is the message to the human;
metadata carries kind (required β one of question | assumption |
failure | review), blocking (optional bool β the agent stopped & is
waiting vs advisory), optional task_id (the task itβs about β must
reference a task in this room), and structured extras. A resolution is a
later event whose metadata.resolves references this eventβs id (clients pair
them to derive open β resolved).
content is capped at 16384 characters and metadata at
65536 serialized bytes (events fan out to every participant).