Skip to main content
By default, Agents reply with plain text. With the right prompt, Fliqr AI converts structured JSON into rich messages — buttons, quick replies, media, carousels, and more — and adapts them per channel.

Why rich responses matter

Text-only answers often dump links. Rich messages keep customers in the chat: tap a button, browse a carousel, or view an image inline.
Support varies by channel. Fliqr AI maps message types where possible; unsupported types fall back gracefully.

Instruct the Agent

Append strict JSON rules to your system prompt. Require a messages array using the Messenger-style message schema Fliqr AI understands.

Example: text + quick replies

Rich messages + actions

You can combine rich output with tool use:
  1. Agent calls a function or MCP tool
  2. Agent formats the result as rich JSON (cards, buttons)
  3. Fliqr AI renders the message on the channel
Keep one responsibility clear in the prompt: fetch data with tools, then format the customer-facing JSON.
Always include a concrete JSON example in the prompt. Models follow examples more reliably than abstract schema descriptions.

Test checklist

  • Playground returns parseable JSON only
  • Buttons/quick replies appear on a real channel test
  • Fallback text exists if JSON parsing fails
  • Handover still works when the user asks for a human

Next

Prompt engineering

Broader prompt patterns, including JSON output.

Human handover

Route out when rich AI replies are not enough.