Page tools: the AI agent acts on your website
Your site's own functions and forms become actions the AI agent can take for visitors, and track() tells it what they just did.
Version 1.11 of the chat widget lets the AI agent do things on your website, not just answer: add a product to the cart, look up an order, open a booking form, fill in a sign-up form. You choose the actions in your site's code, and the agent uses them when a visitor asks.
What's new#
- Page tools. Give the widget a function with a name, a description and the input it takes, through the
toolsoption,registerTool()or the React kit'suseHelpAITool. The agent calls it, your function runs in the visitor's browser, and the agent answers with the result. - Forms with no code. Add
toolnameandtooldescriptionto a<form>and the agent fills it in for the visitor. It never fills in a password, and it tells the visitor which fields still need them. - Ask first. Mark a tool
consequentialHint: true, such as a refund or a checkout, and the visitor approves it before it runs. - WebMCP. In browsers with WebMCP, the agent also uses the tools your page registers with the browser. Page tools use the same shape, so one definition works for both.
- Runs once. A call runs only in the tab that sent the message, and a reload, Stop or a new message marks it Not completed instead of running it again.
- Report what visitors do.
track('plan_viewed', { plan: 'pro' })counts the event in your analytics and tells the agent about it with the visitor's next message. - See every call. Each call shows as a step in the Inbox, and Analytics → AI Model lists the tools each reply used.
Your backend doesn't change: registering a tool is all it takes. Start with What page tools are and how they work (opens another site) in the Help Center.