AI Agent Overview
The AI Agent is a floating support bubble that appears on your customer's pages. When an end-user asks a question, the bot can directly answer it using your connected knowledge bases. Besides answering questions, it can also guide users by picking the best existing Flow or Tooltip from your library, or generating a brand-new Flow on the fly if no existing content fits.
Dual Capabilities
The AI Agent operates with two distinct but complementary capabilities to provide comprehensive support:
1. Direct Knowledge Base Answers
By securely ingesting your existing help documentation, the agent can instantly provide direct textual answers to user queries. Instead of forcing users to switch tabs or search a separate help center, the chatbot synthesizes relevant information and delivers it right within the product context.
2. Interactive Flow Generation
When text isn't enough, the agent goes a step further. It continuously maps your live application's structure and can generate real-time, step-by-step walkthroughs. These interactive guides point exactly to where users need to click, ensuring they can accomplish their tasks without leaving their workflow.
Prerequisites
- The tenant must be on the Pro or Enterprise plan.
- The Site must have completed mapping (
Settings → Sites → Enable AI Creation). The AI agent can't be created or published on a site whosemappingStatusis anything other thanCOMPLETED.
How it works
- End-user asks a question in the chat drawer.
- Knowledge Base & Matcher — the bot first searches connected knowledge bases to provide a direct textual answer. In addition, it ranks every PUBLISHED Flow + Tooltip for the site and picks the single best match to guide the user. If the question contains an existing item's name verbatim, that match is selected without an LLM call. Otherwise an LLM call ranks the candidates and either returns a winner or returns
null. - Reuse vs. generate — if a flow match is found, the chat emits a
MATCHED_CONTENTmessage, navigates the user to the target page if needed, and starts the existing experience. If no match, the bot generates a new Flow using the same grounded pipeline the dashboard's AI generator uses (compressed app map + system prompt + target validation) and publishes it under the "No users" audience. - SDK triggers — the new content is rendered to the asking user via imperative
flowRunner.startFlow(id)orcontentManager.showContent(id)calls. Audience evaluation is bypassed for the asking user only.
What gets stored
- ChatSession rows for every (chatWidgetId, endUserId) pair.
- ChatMessage rows for every turn — user message, status updates (
ANALYZING,MATCHED_CONTENT,GENERATED_CONTENT,NAVIGATING,COMPLETED), and any errors. Each message has its owntokensUsed+modelfor cost accounting. - ChatFeedback rows when the end-user votes up or down on an answer.
- SupportTicket rows when the end-user downvotes and opens a ticket.
- Flow / Tooltip rows for any AI-generated content (with
source: "AI"and audience = "No users" so they never auto-show to other users).
Visibility note: "No users" audience
AI-generated content is published under the "No users" audience preset. This means:
- It will never auto-show to any end-user via normal targeting rules.
- It can be triggered imperatively by the chat (for the asking user only) or replayed manually from the chat panel's "↻ Restart walkthrough" pill.
- It appears in the library with the AI source badge and you can re-target it manually if you want it to auto-show.
Credit usage
Every chat turn consumes AI credits. Two LLM calls happen per turn at most:
- A matcher call (small, ~500–800 tokens).
- A generator call (large, several thousand tokens) — only when the matcher returns null.
The fast-path skips the matcher call entirely when the question contains an existing item's name. If the tenant has insufficient credits, the bot emits an INSUFFICIENT_CREDITS message and the owner gets a debounced email notification.