Subchapter 1.13
references/server-driven-messages.mdMarkdown860 BView on GitHub
Read Autonomous responses (opens in a new tab) for scheduled, webhook, email, and agent-triggered turns, message schemas, response hooks, and client streaming status.
Choose saveMessages to persist messages and request a model response, or persistMessages to update context without starting a turn. Use onChatResponse to react to turns regardless of their trigger. For webhooks that need a quick acknowledgement, consult the documented submitMessages path.
Before reading conversation history or calling saveMessages from non-chat entry points, await waitUntilStable and handle a timeout without proceeding as if the conversation were stable. Prefer the functional form when calls can queue, so each update uses the latest history.
saveMessages