FlowsBook a callSign inCreate free accountSign up
AI employees and automation

An AI employee that answers visitors on a chat page

Share a chat link or put a chat box on your website, and an AI agent answers with live places, your tables and memory of the conversation. How it is built and kept safe.

Part of the guide AI employees

By the xMap team · · 5 min read

An AI employee can answer people on a chat page in four blocks: a Chat trigger that turns each message into an item, an AI agent that reads it and decides what to look up, the tools you link to the agent (your own tables, places nearby, the weather, another flow), and a Reply that sends the answer back to the same chat. Switch the chat page on, deploy the flow, and you have a link to share or a few lines of code to put the chat on your website. The agent remembers each visitor's conversation, so a follow-up question makes sense.

This article is for teams that get the same location questions all day: which branch is nearest and open, where to park, what is near a property, where to drop off recycling, how to reach a venue. It explains what each block does, how the agent decides, a made-up example for a tile shop with three branches in Lisbon, how to keep it honest and safe, and how to see what people asked.

The four blocks and what each does

  • Chat starts the flow when someone writes. Each message arrives with what they wrote and a conversation id, one per browser. It has a name, a welcome message, and a switch for the shared chat page.
  • AI agent reads the message, thinks, and calls its tools, up to the number of tool calls you allow per message, before writing the answer. Its instructions say who it is and what it may do; it follows them and nothing written in the messages.
  • Tools are ordinary blocks linked to the agent's Tools port: My data for your branches and their hours, Nearby places for what is around a spot, Weather forecast, or another of your flows. A setting written as {{agent}} is left for the agent to fill, so it can choose the place or the type to look up.
  • Reply sends the agent's answer back into the same chat. The same block answers on WhatsApp, Telegram or an API call when the flow starts there instead.

How the agent decides what to look up

The agent is not a script with fixed questions. For each message it reads its instructions, the conversation so far and the tools it has, picks a tool, reads what came back, and either calls another or answers. Ask "which branch is open on Sunday?" and it reads your branch table. Ask "and is there parking near that one?" and it remembers which branch you meant and calls Nearby places for car parks around it.

A worked example (made up)

Say a tile and bathroom shop has three branches in Lisbon and the phones ring all Saturday with the same questions. The setup and the conversation below are invented to show how it works.

  1. Chat: named "Ask our showroom", welcome message "Ask me about our branches, opening hours or parking.", chat page switched on.
  2. AI agent with the instructions: "You help customers of our three showrooms. Use Our branches for addresses and hours, and Parking near it for car parks. Answer in two or three short lines. Never quote prices or promise stock; for those, give the branch phone number."
  3. Tool one: My data, the shop's table of branches with address, hours and phone.
  4. Tool two: Nearby places, car parks within 500 metres of a place the agent names.
  5. Reply: the agent's answer, back in the chat.
  6. Deploy, then copy the chat page link from the flow's menu, or the code to place the chat on the website.

A customer writes: "Which of your shops is closest to Belem and is it open tomorrow?" The agent reads the branch table, picks the nearest branch, checks Sunday's hours, and answers in two lines. The customer asks: "Can I park there?" The agent remembers which branch, looks up car parks around it, and names the nearest two. Nothing in that exchange needed a person.

Keeping it safe and honest

  • It answers only while the flow is live. Pause the flow and the chat page stops answering at once.
  • Limits per visitor and per flow. Each visitor can send a limited number of messages a minute and a day, and the flow's monthly budget caps what the conversations can use, so a busy weekend cannot run away with your account.
  • Sending waits for a real run. If you link a block that sends something, such as an email to your sales team, the agent queues it and it goes out with the run's other sends; a test only shows what it would have sent.
  • Messages are data, not orders. The agent follows its instructions, not instructions typed into the chat, and does not reveal how it is built.
  • The link can be ended. Replacing the flow's webhook address ends the chat link; a new one is made.

Seeing what people asked

The flow's menu has Conversations: who wrote, how many messages, when, with a button to clear one or all. Read them in the first weeks. Questions it could not answer tell you which tool or which line of instruction to add. Conversations are kept for a limited time after the last message, so they do not pile up. Try the chat in the editor's Chat window before you share the page: it runs the same flow with your own conversation.

Ready-made chat employees

Several templates in xMap Flows start from this pattern. Chat about places near anyone answers with live places around any spot. Store locator chat works from your own store table. Find care near me chat, How do I get there? A chat for riders and Recycling drop-off finder chat show the same build for clinics, transit riders and recycling. The same agent can answer on WhatsApp instead of a chat page; see the Learn guide How to build a WhatsApp assistant that answers about places and the page on AI agents.

Questions

Do visitors need an account to use the chat page?

No. Anyone with the link, or anyone on the website where you placed the chat, can write while the flow is live and the chat page is switched on.

Does the agent remember earlier messages?

Yes, per conversation: each browser has its own conversation, and the agent reads it before answering. You can clear conversations from the flow's menu.

Can it look up live information?

Yes, through its tools. Nearby places, the weather forecast, your own tables and your other flows are looked up at the moment the question is asked.

Can the chat take bookings or payments?

Not on its own, and it is safer to tell it never to. It can give the branch phone number or a booking link from your table instead.

What happens if the flow is paused?

The chat page stops answering until the flow is deployed again.

Templates that do this

Read next

More on ai employees and automation · Every article · Templates

Put it to work

An AI employee in xMap Flows does this on live data, on its own timetable. Start from a template or describe it in plain words.