The form guide puts your AI agent next to the questions on a web form.
It finds the labelled fields on your page and adds a small help icon beside each label. When a visitor clicks an icon, a short chat opens about that one question. The agent explains the question in one to three sentences without being asked, and the visitor can ask follow-up questions.
You can also let the agent fill in a field. The visitor describes their answer in their own words ("I quit smoking two years ago"), presses Done, and the agent writes the right value into the field. We call this extraction mode.
It works with any form: one you wrote yourself, a form from your website builder or CMS, or a form drawn by a framework such as React or Vue.
Use it when people get stuck on questions like "what counts as a pre-existing condition?" or "am I a smoker if I vape?", and you want help right beside the question. If you want a general chat window instead, use the webchat. The two can sit on the same page.
Quick start#
- In the Subcontext dashboard, open Agents and choose your agent. Make sure it is live (it has a production version).
- Open its Channels tab, then Form guide, and press Enable.
- Copy the snippet shown under Add to your website. It looks like this:
<script
id="formguide-embed-script"
src="https://js.subcontext.com/formguide-latest.js"
data-agent-id="YOUR_AGENT_ID"
data-base-url="https://subcontext.com"></script>
- Paste it into your page, just before
</body>. - Reload the page. Every labelled field now has a help icon.
Before you start: set up your agent#
You need three things in place in the Subcontext dashboard.
| What you need | Where to do it | What happens if it's missing |
|---|---|---|
| A live agent | Agents, open the agent, and promote a version to production. | No icons appear. The console shows Agent not available (404: Agent not available). |
| The Form guide channel switched on for that agent | Agents, open the agent, Channels tab, Form guide, press Enable. | No icons appear. The console shows Agent not available (403: Form guide is switched off for this agent). |
| An active subscription | Billing | If your subscription lapses past its grace period, your agents stop answering everywhere, including the form guide. |
Your agent id is a long id that looks like 3f2a1c9e-.... It appears in two
places:
- in the snippet on the agent's Channels, Form guide page, and
- in your browser's address bar when you open the agent
(
https://subcontext.com/agents/<agent id>).
About the channel switch:
- The switch controls the form guide on your own websites. Pages that Subcontext hosts for you (such as your mini-site, or a quote form on it) are not affected by it.
- The webchat has its own switch (Web). Turning on one does not turn on the other.
- Switching it off doesn't close a help panel a visitor already has open.
Unlike some other Subcontext embeds, the form guide has no publishable key and no list of allowed websites. It only needs the agent id. See Privacy and security for what that means.
Example pages#
The example pages are complete web pages that show the form guide in use, from the simplest install up. You can read, copy or download each one.
In this section
- Install the form guide Add the form guide with the paste-in snippet, with attach() in JavaScript, or inside a Subcontext quote form.
- Form guide options The snippet's attributes and attach() options, panel styles, icons, theme and wording.
- How it finds your fields Which fields get a help icon, how the guide finds their labels and help text, and how to choose which fields get help.
- Filling in fields, methods and events Let the agent fill in fields, control the guide from your own code, and listen for its events.
- Privacy and troubleshooting What the form guide sends and stores, privacy and security, the content security policy to allow, and how to fix problems.
- Form guide examples Complete example pages to copy, from the simplest install to letting the agent fill in fields.