Rich content trust
Rich content — product cards, offer carousels, media tiles — renders in the widget only when it originates from a successful, verified tool execution. The LLM cannot fabricate structured cards from plain text.
Trust model
Section titled “Trust model”| Source | Renders in chat? |
|---|---|
Tool result with valid result_transform | Yes |
| Tool result without transform (raw JSON) | No — text summary only |
| LLM-generated JSON in message text | No — stripped |
| Knowledge base citations | Text + citation links only |
| Failed tool call | Error message; no cards |
This prevents prompt-injection attacks that try to inject fake product listings or phishing links as structured UI.
Pipeline
Section titled “Pipeline”flowchart LR A[User message] --> B[LLM selects tool] B --> C[Tool executes against your API] C --> D{Success?} D -->|Yes| E[result_transform maps JSON to card schema] D -->|No| F[Text error — no rich content] E --> G[Sanitize URLs and fields] G --> H[Render in widget]result_transform
Section titled “result_transform”Tools declare how API JSON maps to card fields:
{ "result_transform": { "type": "carousel", "mapping": { "items": "$.offers", "title": "$.name", "image_url": "$.image", "link_url": "$.booking_url" } }}Only fields defined in the transform schema are rendered. Unknown fields are dropped.
URL sanitization
Section titled “URL sanitization”| Check | Action |
|---|---|
javascript: URLs | Blocked |
| Non-HTTPS links (production) | Blocked unless allowlist configured |
| Off-domain images | Allowed if HTTPS; flagged in logs |
| HTML in text fields | Escaped — no inline HTML in cards |
Configure an optional image/link domain allowlist under Tools → Rich content → Trust policy.
Visitor visibility
Section titled “Visitor visibility”Visitors never see:
- Raw tool API responses
- Credential headers or tokens
- Internal tool error stack traces
They see user-friendly text and sanitized cards.
Dashboard verification
Section titled “Dashboard verification”Use Tools → Test to preview rich content output before attaching to an assistant. The preview shows exactly what the widget will render.