For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent UI

Create an Agent UI / FlexMessage (LINE Flex Message / Flex card) and bind it to an Agent to display Web Chat replies as information cards, and learn how cards and questions appear on other conversatio

1. What Is Agent UI?

Agent UI lets Agents display information cards or interactive options in conversations. This page introduces FlexMessage, which combines text, images, and buttons in cards to make information easier to read.

When you select Add Agent UI, you can choose FlexMessage, Quick Reply, or Quick Menu.

Agent UI type selection showing FlexMessage and Quick Menu
First, choose the type you want to create

Use Case

A customer service manager wants to show colleagues how a receipt card looks. She creates a Receipt template card with fictional items and amounts, binds it to a test Agent, and asks the Agent in Web Chat to display a fictional sample receipt. After the Agent calls the card tool, the conversation displays the items, total, and payment number so she can check the layout.

2. Card Fields and Buttons

You can set a Default Value for each card field or enter an AI Prompt to tell the Agent what the field should display. Fields without an AI prompt use their default values.

What Can Card Buttons Do?

  • URL button: Opens a specified URL, such as a product information page.

  • Prompt button: Sends a message to the Agent to continue the conversation, such as “View other products.”

A button's result depends on its destination or the capabilities configured for the Agent. Test buttons before making them available to users.

3. Create an Agent UI (FlexMessage)

1

1. Open the Agent UI Page

In the left menu, click AI Features → Agent UI, then click Add Agent UI. Choose FlexMessage to open the settings page.

2

2. Enter Basic Information

Field
Description

Display Name

A name used to identify the card in the admin interface, such as “Fictional Receipt Card”

Tool Name

An English name the AI uses to identify the tool, such as demo_receipt_card

Description

The card's purpose, such as “Display a fictional sample receipt”

Prompt

When to use the card, such as “Use this card when the user asks for a fictional sample receipt”

Use an English identifier for the tool name without spaces or Chinese characters. Clearly describe when to use the card in the prompt to help the Agent decide when to call it.

3

3. Select a Template and Configure Fields

Click a template to preview it, then click Apply This Template. Built-in templates include Restaurant, Apparel, Hotel, Local Search, Real Estate, Social, TODO app, Transit, Receipt, Shopping, Menu, and Ticket. You can also select Custom and paste FlexMessage JSON.

After applying the template, adjust the Default Value and AI Prompt under AI Field Settings. Start with fixed fictional data to check the layout, then gradually add fields that need dynamically generated content.

Receipt card editor with basic information and a card preview
Basic information and preview for a Receipt card
4

4. Save the Card

Click Save in the upper right. Return to the list to see the card you created.

4. Bind the Card to an Agent

1

1. Open Agent Settings

Go to AI Features → AI Assistants and open the Agent you want to configure. Use Agent Mode to configure Agent UI.

2

2. Select a Card

On the settings page, click Agent UI, then Select Agent UI. Select the card and click Confirm. The added card appears under Agent UI in Use.

Agent UI in Use showing the fictional receipt card and the Select Agent UI button
Confirm that the card has been added to the Agent

Find the Card to Add

When there are many cards, enter a name or ID in the search box at the top of the Select Agent UI window and press Enter to search. Turn on Only mine to list only the cards you created. The switch is off by default, and filtering never goes beyond the cards you could already see.

Select Agent UI window with a search box and an Only mine switch at the top
Narrow the list with the search box and the “Only mine” switch
3

3. Save and Test

Click Save, then open the Agent's test conversation or Web Chat. Enter “Please display a fictional sample receipt” and confirm that the Agent calls the card tool and the card content is correct.

Fictional Receipt card in Web Chat showing items, the total, and a payment number
The Agent displays a fictional receipt card in the conversation; amounts are for demonstration only

5. Example Uses

You can adapt templates into information cards for product catalogs, accommodation, courses, or event tickets. Prepare the content and working links first, then configure the card fields and prompts. To check inventory, orders, or booking status, configure the corresponding data sources and tools first.

An Agent can have multiple cards bound to it. Clearly describe when each card should be used and test them individually to confirm that the Agent selects the right card for each question.

6. Agent UI Question Tool (ask_user_question)

In addition to FlexMessage cards, you can use the Agent UI Question Tool to let the Agent list options for users to answer. Add this built-in tool in the Agent's Tools settings. For instructions, see Configure Tools for an Agent.

How options appear in Web Chat is determined by the conversation platform's Question Set Option Display Mode.

7. On Conversation Platforms Other Than Web Chat

The same Agent can be published to Web Chat and other conversation platforms at the same time. Web Chat displays cards and question options. WhatsApp, Telegram, LINE, Messenger, and Instagram have no question interface, and WhatsApp and Telegram cannot display cards. When the Agent replies with a card or a question, customers on these platforms receive readable text instead, and the conversation can continue after they reply.

Use Case

The customer service manager of a fictional coffee shop publishes a booking Agent to both Web Chat and WhatsApp, and adds the Agent UI Question Tool to the Agent. The system prompt says that when a customer wants to book a trial class, the Agent first asks “Which time slot would you like to book?” with the options morning, afternoon, and evening, and also allows customers to type their own time slot. Website visitors see clickable options in Web Chat. WhatsApp customers receive a text message listing the question and numbered options, and reply directly with the option text “Afternoon,” after which the Agent can confirm the booking time slot.

In a Web Chat conversation, the Agent asks a question listing three options, morning, afternoon, and evening, with a field below to enter another answer
Question options in Web Chat

What Each Platform Receives

Conversation platform
FlexMessage card
Question

Web Chat

Displays the card

Displays clickable options

LINE

Displays the Flex card

Text with the question and numbered options

Messenger, Instagram

Converted to the platform's native card

Text with the question and numbered options

WhatsApp, Telegram

Converted to text: lists the text and button names in the order they appear on the card, with URLs attached to link buttons; card images are not sent

Text with the question and numbered options

Using the scenario above as an example, the question text a WhatsApp customer receives looks like this:

  • When a question allows free-form input, the line “You can also type your answer directly.” is added at the end; for multiple-choice questions, “You can select multiple options.” is added. These two hints are displayed in the conversation's language, or judged from the question's text when no language information is available.

  • When a reply contains both text and a card or question, the customer receives them in their original order.

  • When multiple questions are asked at once, each is listed and numbered separately starting from 1.

  • When a customer replies with just a number, the Agent may not match it to the option with that number, even if there is only one question, and may treat the number as the answer itself (for example, interpreting “2” as two o'clock). We recommend asking customers to reply with the option text directly, either in the system prompt or in the question.

How Long Replies Are Sent

  • WhatsApp: A single text message is limited to 4096 characters. A reply over the limit is automatically split into multiple messages sent in order, breaking between paragraphs where possible so that each card and each question stays complete within a single message. The same applies to ordinary long replies without cards or questions. Replies within 4096 characters are still sent as one message.

  • LINE: When the question fits, it is merged into the preceding text message and sent together. LINE allows at most 5 messages per reply. When a reply containing a question exceeds 5 messages, the remaining messages are sent afterward as push messages, so the question is never cut off.

Microsoft Teams, Email, Slack, LINE WORKS, Team+, and Viber currently do not convert cards or questions into the text described above. If the Agent is also published to these platforms, test what customers actually receive when the Agent replies with a card or question.

8. FAQ

What if the card does not appear?

Confirm that the Agent uses Agent Mode and that the card is bound and saved. Then check whether the prompt clearly describes when to use the card. The Agent decides whether to call the card based on the conversation, so test with specific questions.

Can the card query external systems on its own?

No. Cards display content. Querying external systems requires separately configured tools or data sources. Writing “retrieve the bill” in a field prompt alone does not establish an integration.

Last updated

Was this helpful?