Back

Developers

Build Audiont into your website

The integration is one script tag. The agent runs in your visitors’ browsers, reads each page the way a screen reader does and acts on it there, so nothing changes on your server and there is no API to connect.

Install: one script tag

Open your agent’s Install tab, add your domain under Allowed websites and save, then copy the code. It is one line, with your agent’s own key:

<script src="https://api.audiont.com/v1/widget.js" data-key="pk_live_…" async></script>

Paste it just before </body> on every page where visitors should see the agent (inside <head> works too). Most website builders have a site-wide “custom code” or “footer code” setting: use that, so it is on every page at once. Copy it from the dashboard rather than typing it, and don’t put it in an “embed” or “HTML block” that places it inside a frame: the agent can’t run inside a frame.

The script also reads the key from data-p-key, or from ?key= in its own address, for platforms that strip attributes or accept only a script URL. Always load it from Audiont’s address: a bundled or copied widget.js breaks, because it finds Audiont’s server from where it was loaded. In a single-page app, add it once, in the root layout or index.html; it stays on screen as visitors move between pages.

Step by step: add the voice agent to your website

The key and your allowed websites

Every agent has one key, the pk_live_… value in its install code. It is public by design: anyone can see it in your page’s source. What protects your agent is its Allowed websites list, since the code does nothing on any other site, together with Audiont’s limits per visitor and per day. There is no secret key to keep on your server: the dashboard uses your sign-in.

Subdomains are included, so yourshop.com also covers www.yourshop.com. Addresses shared by many websites, such as a hosting platform’s own subdomain, can’t be added; add your own domain instead. A website you add works at once; there is no approval step.

Changing the agent’s settings never changes its key. Replacing the key (Install tab, Key and access) stops the old one at once, so update every site that uses it in the same sitting.

Content Security Policy

If your site sends a Content Security Policy header, allow Audiont’s server address for scripts and connections. Allow only that address, not a wildcard. The widget needs no inline scripts or styles: it builds its interface in a shadow DOM.

script-src https://api.audiont.com;
connect-src https://api.audiont.com;

Browsers give the microphone only to secure pages, so voice needs HTTPS (or localhost while developing). Without it, visitors can still type.

Platforms and frameworks

The agent works on websites that let you add your own JavaScript to every page. “Tested” here means tested in Audiont’s own automated browser tests, on sample sites built for testing: no platform has been tested on a live customer website yet.

  • Tested in Audiont's test suitePlain HTML websites with several pages; server-rendered sites (PHP, Django, Flask, Laravel, Rails, ASP.NET, Spring, Express); React and Vue single-page apps; Rails with Turbo; htmx.

  • Partly testedNext.js, Angular, Google Tag Manager (the loader is tested; Tag Manager itself wasn't run).

  • Not yet testedWordPress and WooCommerce, Shopify storefronts, Wix, Squarespace, Webflow and other website builders. The steps should work where the platform lets you add custom code, but that hasn’t been proved.

  • Not supportedShopify checkout, thank-you and customer account pages; pages inside a frame from another website; mobile apps (the agent runs in web browsers).

Every platform, and what to know about each

Control it from your page’s JavaScript

Once loaded, the widget exposes window.PVoice:

// open it (and start listening, in voice mode)
PVoice.open()
// send a request as text
PVoice.ask('Track my order')
// stop speaking, listening and acting
PVoice.stop()
// close the panel
PVoice.close()
// remove it from the page (consent withdrawn)
PVoice.destroy()
// …and forget this tab's conversation
PVoice.destroy({ forget: true })

After destroy(), adding the script tag again starts a fresh assistant. Use it when a consent manager withdraws consent, or when your app removes the assistant on sign-out.

Mark buttons that need a yes, or don’t

Add data-p-confirm to any element the agent must always ask about before clicking, or data-p-safe to one it wrongly treats as irreversible. data-p-safe can’t clear paying, ordering, deleting or transferring, or a form with a password, card or one-time-code field, and the agent’s “confirm every form” setting outranks it. The agent never types into password, card-number or one-time-code fields, whatever you set.

The agent finds buttons the way a screen reader does, so a button that is only an icon is hard for it to recognise. A visible name or an aria-label fixes that, for your human visitors too.

Where it stops

It works on what a visitor can see and do in the page, and has no access to your systems behind it. It leaves to the visitor: payment and booking widgets from other sites, CAPTCHAs, file uploads, and passwords, card numbers and one-time codes, which it never types. Placing an order, paying, booking, deleting or sending a form waits for the visitor’s yes to that exact action.

Each time a visitor says something and the agent answers, a few credits from the owner’s plan are used. When they run out, the agent pauses until they reset or more are added. Nothing is charged beyond the plan unless the owner chooses to add credits. Plans and credits

Test before visitors do

The Test tab lets you talk to your agent on a sample business website before it goes anywhere near yours. Once the code is on your site, the Install tab’s status changes to “Installed, not yet verified” when a page loads it, and “Verified and active” after a conversation there. On your live page, the browser console’s lines starting with [Audiont] say what the widget is waiting for.

Give your website a voice

Create an agent, try it on a sample website, then paste one line into your site.

<script src="…/v1/widget.js" data-key="pk_live_…" async></script>