1b84231: Add guardrail_triggered server-to-client WebSocket event, emitted when a guardrail is triggered during the conversation.
New callback: onGuardrailTriggered on Callbacks — fires when the server detects a guardrail violation.
const conversation = await Conversation.startSession({
agentId: "your-agent-id",
onGuardrailTriggered: () => {
console.log("A guardrail was triggered");
},
});
For the client to receive events, it must be enabled on the "Advanced" tab of the agent's settings.
2e37cd9: Add type discriminant property to TextConversation and VoiceConversation, enabling discriminated union narrowing. Add startSession overloads that narrow return type based on textOnly option.
Fetched April 7, 2026