Skip to main content

Canvas

Canvas lets the AI agent render structured visual panels in the widget.

When to Use Canvas

Use canvas when a plain text answer is not enough.

Examples:

  • Product grid.
  • Product detail card.
  • Image gallery.
  • Comparison table.
  • KPI/stat cards.
  • Markdown information panel.

Enable Canvas

  1. Open the integration.
  2. Enable canvas.
  3. Save the integration.
  4. Update your widget integration to provide canvas templates.
  5. Test with questions that should produce visual output.

How Canvas Works

Template Examples

Common template IDs include:

  • product_grid
  • product_detail
  • image_gallery
  • markdown_card
  • compare_table
  • kpi_stats

Only templates declared by your integration should be used.

Good Canvas Design

Keep canvas templates focused.

Good uses:

  • Show several products side by side.
  • Compare plans.
  • Display account metrics.
  • Show a structured summary.

Avoid using canvas for:

  • Long legal text.
  • Hidden or sensitive data.
  • Actions that require user confirmation unless your app handles confirmation.

Verification Checklist

  • Canvas is enabled on the integration.
  • The widget receives template definitions.
  • The AI agent uses declared template IDs only.
  • Invalid canvas payloads are rejected.
  • The rendered view looks correct on desktop and mobile.