alert component (canvas.alert, v1) shows a short notice during a conversation. It renders inline in a side rail (default safe-area-right).
Alerts are display-only; the only interaction a backend normally receives is a dismiss.
alert has no settings beyond enabled (default true); see Enabling and configuring components:
Component Behavior
The PAL shows an alert for important notices, warnings, or success confirmations; general reading material belongs in thetext component.
- Only one alert shows at a time; a new alert replaces the previous.
- The PAL updates an active alert in place (
update_component) rather than showing a duplicate.
Alerts are always user-dismissible. There is no non-dismissible option.
Arguments
The PAL invokescanvas_show_alert:
| Field | Type | Required | Description |
|---|---|---|---|
severity | string | ❌ | Visual tone. One of info, success, warning, error. Defaults to info if absent. |
body | string | ✅ | The message itself. 1–1200 characters. |
title | string | ❌ | Short heading above the body. 1–120 characters. |
auto_dismiss_seconds | integer | ❌ | Auto-dismiss the alert after this many seconds (1–120). The alert stays manually dismissible regardless. |
layout | object | ❌ | Placement hint. preferred_slot: one of safe-area-right, safe-area-left. The client may adapt it for viewport, keyboard, and safety constraints. |
display_mode | string | ❌ | Render mode. Always inline. |
layout and display_mode are shared runtime controls on every Canvas action. Unknown arguments are rejected (additionalProperties: false).
Example invocation
Interactions
Alerts are lifecycle-only: they never producesubmit or skip; allowed types are dismiss, clear, error, and heartbeat. Each reaches the conversation webhook as a canvas.interaction event:
dismiss event
created_at is UTC with microsecond precision and no offset suffix (no trailing Z); don’t parse it as strict RFC 3339.properties envelope is identical for every type; only type and value change:
type | When it fires | value |
|---|---|---|
dismiss | The alert was dismissed, either by the user clicking close or by the auto_dismiss_seconds timer. Exactly one dismiss fires per alert, even if the timer and a click race. | {} |
clear | The alert was removed programmatically: the PAL cleared it or the conversation moved on. | {} |
error | The client failed to render or run the alert. | Client-defined diagnostic object. Treat it as opaque. |
heartbeat | State signal a client may emit while the alert is on screen. The hosted renderer does not post these to the webhook; they only appear from a custom renderer that sends them. | Client-defined state object. Safe to ignore in webhook handlers. |
error and heartbeat, value is a free-form object capped at 16 KB serialized; don’t build logic on its shape.
Posting Interactions from a Custom Renderer
Custom renderers report the dismiss via the conversation-scoped, public interactions endpoint (no API key while the conversation is active):| Field | Type | Required | Description |
|---|---|---|---|
interaction_id | string | ✅ | Max 128 characters. Reuse the same value on network retries; Tavus dedupes, so the webhook fires once. |
tool_call_id | string | ✅ | Max 128 characters. |
component | string | ✅ | canvas.alert |
component_version | string | ✅ | v1 |
type | string | ✅ | One of the allowed interaction types. |
value | object | ✅ | The interaction value ({} for dismiss). |
metadata | object | ❌ | Up to 4 KB. |
GET for interaction history, is in the interactions API reference.
