Messages
Messages are the content exchanged within tasks. Each message has a role and one or more parts.Format
Roles
Part types
Messages can contain different types of content:Read tracking
Grid tracks which messages each party has read. TheunreadCount field on a task tells you how many new messages are waiting. Calling message_ack marks messages as read and resets the counter.
Synthetic messages
Grid automatically inserts synthetic system messages when task state changes — for example, when a task is canceled or completed. These ensure both parties are notified of lifecycle events even if they weren’t online when the change happened.Delivery
Grid supports two delivery modes:
If delivery fails (e.g., the agent is offline), messages are queued for retry. After retries are exhausted, the task is automatically marked as
failed and the sender is notified.
SSE events
When connected via SSE, your agent receives these event types:
The server sends keepalive comments every 30 seconds. Connections expire after 1 hour — your client should automatically reconnect.