On this page
You need a Halochime workspace and about five minutes. Nothing to install on your server.
- Create a workspace and an agent. Give it knowledge: paste text, import pages from your site, or upload PDF, .txt or .md files.
- Open the agent, add your website under Where it runs (for example
example.com) and switch on Published. - Go to Install in the dashboard, copy your snippet and paste it before
</body>on your site. - Use Check my site on the Install page to confirm the snippet, the key and the domain are right.
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>data-key is the agent's public key. It is safe to show in your page source: it only starts the agent on your allowed domains.
- The script defines a
<talkfront-widget>element and adds it to<body>. Its markup and styles live in a Shadow DOM, so your CSS can't break the widget and the widget can't change your page. - The tag is
async: your page never waits for it. It loads the agent's settings, shows a small launcher, and only connects voice or chat when a visitor opens it. - It starts only on hostnames in the agent's allowed domains.
example.commatches only that host;*.example.commatches its subdomains but notexample.comitself, so add both if you use both. - Drafts only load inside your dashboard. Publish the agent to go live.
- Visitors can talk or type in their own language: realtime voices and text chat cover 12 languages. Classic voices reply in English.
- With each conversation we keep the page it started on, as origin and path only. Query strings and fragments are dropped because they can carry tokens.
Replace pk_your_public_key with your agent's key, or copy the ready-made version from the Install page in your dashboard.
HTMLPaste the tag before </body> on every page.
- Open the HTML of your pages. If your site has a shared footer or layout file, use that so every page gets it.
- Paste the snippet just before the closing
</body>tag. - Upload or publish the change. The chat button appears in the corner of the page.
<!doctype html>
<html lang="en">
<head>
<!-- ... -->
</head>
<body>
<!-- your page -->
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>
</body>
</html>Next.jsAdd it once with next/script in the root layout.
- App Router: open
app/layout.tsx. Pages Router: openpages/_app.tsx. - Import
Scriptfromnext/scriptand render it once withstrategy="afterInteractive". - Deploy. The widget stays on screen while visitors move between pages.
import Script from "next/script";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://halochime.vercel.app/widget.js"
data-key="pk_your_public_key"
strategy="afterInteractive"
/>
</body>
</html>
);
}ReactPaste it into index.html (Vite or Create React App).
- Vite: open
index.htmlin the project root. Create React App: openpublic/index.html. - Paste the snippet just before
</body>, then build and deploy as usual. - Can't edit the HTML file? Render the small component below once, near the top of your app. It adds the script a single time.
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>
</body>WordPressInstall the Halochime plugin and paste your public key.
- Download the Halochime plugin (
halochime-wordpress.zip). Keep the file zipped. - In your WordPress admin, go to Plugins › Add New Plugin › Upload Plugin, choose the file, select Install Now, then Activate.
- Go to Settings › Halochime, paste your public key and select Save settings.
pk_your_public_keyThe plugin can hide the widget from logged-in administrators, and removes its settings when you delete it.
Without the plugin: paste the snippet into the Footer box of a header and footer plugin such as WPCode, or before </body> in your child theme's footer.php.
On WordPress.com, uploading plugins needs a plan that allows them.
ShopifyPaste it into your theme's theme.liquid, or turn on the Halochime app embed.
- In your Shopify admin, go to Online Store › Themes.
- Next to your current theme, select the … button, then Edit code.
- In the Layout folder, open
theme.liquid. - Paste the snippet just above
</body>and select Save.
{% comment %} ...the rest of your theme... {% endcomment %}
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>
</body>
</html>Installed the Halochime app from an install link? Skip the code: go to Online Store › Themes › Customize › App embeds, turn on Halochime widget, paste your public key (pk_your_public_key) and select Save. It keeps working when you switch themes. Halochime support can send you an install link.
Shopify checkout pages don't use your theme, so the widget doesn't show there.
If you switch themes later, add the snippet to the new theme too (not needed with the app embed).
WebflowSite settings, Custom code, Footer code.
- Open your site's Site settings and go to Custom code.
- Paste the snippet into Footer code (it runs before
</body>on every page). - Select Save changes, then Publish the site.
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>Webflow only runs custom code on sites with a paid Site or Workspace plan.
WixSettings, Custom Code, Body - end.
- In your site's dashboard, open Settings. Under Development & integrations, select Custom Code.
- Select + Add Custom Code, paste the snippet and name it, for example "Halochime".
- Under Add Code to Pages, choose All pages and Load code once.
- Under Place Code in, choose Body - end, then select Apply.
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>Wix runs custom code only on published sites with a connected domain.
SquarespaceCode Injection, Footer.
- Open the Code Injection panel. In the current editor it is under Website › Pages › Custom code; on older sites it is under Settings › Advanced.
- Paste the snippet into the Footer field.
- Select Save. It runs on every page of your site.
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>Squarespace offers Code Injection on its Core, Plus and Advanced plans (and some older plans).
Google Tag ManagerA Custom HTML tag on All Pages.
- In your container, go to Tags › New.
- Select Tag Configuration › Custom HTML and paste the snippet.
- Select Triggering › All Pages, name the tag and select Save.
- Select Submit, then Publish.
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>Tags added by Tag Manager run in the browser, so "Check my site" can't see them. Open your site and look for the chat button instead.
Once the script has loaded, window.Halochime has these methods:
Offer help at the right moment
Call offerHelp when your page knows the visitor may be stuck. reason is a short word or two for the agent (up to 60 characters, like checkout_failed); message is what the bubble says (up to 120 characters). Leave out the message to use the default one from your settings. The bubble never shows while the chat is open, and each reason shows at most once per page in a visit, so calling it again is safe.
window.Halochime = window.Halochime || { q: [] };
// After your payment form reports an error:
window.Halochime.q.push(["offerHelp", {
reason: "checkout_failed",
message: "Payment didn't go through? Tap here and we'll help.",
}]);You can also offer help without code: under Page help, add rules like “address contains /pricing, after 20 seconds”. Turn on Show visitors where things are there too, and the agent can scroll to a button or link on the visitor's page and highlight it when they ask where something is. It only sees the names of buttons, links and fields, never what visitors type, and it leaves out password and card fields.
Call it before the script loads
The tag is async, so your code may run first. Push calls onto a queue instead: the script runs them in order once it is ready, and after that the same push runs them straight away.
window.Halochime = window.Halochime || { q: [] };
// Works before and after widget.js has loaded:
document.querySelector("#help-button").addEventListener("click", () => {
window.Halochime.q.push(["open"]);
});Open it from your own button
<button type="button" onclick="Halochime.open()">Talk to us</button>
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key" async></script>Pages rendered on your server can pass the identity token on the tag instead of calling identify:
<script src="https://halochime.vercel.app/widget.js" data-key="pk_your_public_key"
data-identity-token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." async></script>On a page where your users are signed in, such as a customer portal, tell the agent who it is talking to. Your server signs a short-lived token for the user and the widget passes it on. The agent then knows who it is talking to, treats the facts you include as true, and never reads them out unprompted.
Claims
A JWT signed with HS256 (no other algorithm is accepted), header {"alg":"HS256","typ":"JWT"}.
Sign on your server
// On your server. npm install jsonwebtoken
import jwt from "jsonwebtoken";
export function halochimeToken(user) {
return jwt.sign(
{
sub: String(user.id),
name: user.name,
email: user.email,
attributes: { plan: user.plan, open_orders: user.openOrders },
},
process.env.HALOCHIME_IDENTITY_SECRET,
{ algorithm: "HS256", expiresIn: "1h" }, // adds iat and exp
);
}Pass it to the widget
// After your user signs in (token comes from your server):
window.Halochime = window.Halochime || { q: [] };
window.Halochime.q.push(["identify", { token }]);
// When they sign out:
window.Halochime.q.push(["logout"]);- The token applies to the next conversation the visitor starts. Sign a fresh one on each page load.
- If a token is missing, expired or wrong, the conversation still starts, as an anonymous visitor. Visitors are never blocked.
- Signed-in visitors show as verified in webhook events, and your user id is sent to your actions in the
X-Halochime-Visitorheader.
06
Actions
Actions let the agent call your HTTP API during a conversation, for example to check an order, find a free booking slot or look someone up in your CRM. For HubSpot, GoHighLevel, Zoho CRM, Cal.com, a booking link or your own Postgres or MySQL database there are ready-made integrations (see below), so you don't need to build an API.
Define an action
Open your agent and go to Actions. Each action has:
The request we send
- GET: arguments go in the query string. POST: arguments are a JSON body.
- Your headers, plus
X-Halochime-Conversation(the conversation id) and, when the visitor is signed in with an identity token,X-Halochime-Visitor(your user id fromsub). - Redirects are not followed for POST. Private, loopback and link-local addresses are refused.
Content-Type: application/json
Authorization: Bearer <your token>
X-Halochime-Conversation: c0a8f2d4-6b1e-4f7a-9c3d-2e5b8a1f4d70
X-Halochime-Visitor: user_1042
{"order_number":"4471"}X-Halochime-Visitor to only return the signed-in user's own data. Without it, treat the caller as anonymous.Your response
Answer with a 2xx status and a short JSON or text body. The agent reads the first 4,000 characters and puts the answer in its own words. Any other status, or no answer within the timeout, is reported to the agent as a failure, so it tells the visitor it couldn't check. Every call is saved in the conversation's transcript.
{"order_number":"4471","status":"shipped","eta":"2026-10-28"}Ready-made integrations
In the dashboard, Integrations lets owners and admins connect a service with their own credentials and pick which agents may use it. Each one gives the agent a few tools, next to your own actions (your action wins if a name is the same).
sub of the visitor's identity token. The AI can never set it, and the query refuses to run for a visitor who is not signed in. For a visitor who is not signed in, a CRM lookup only says whether a contact exists, never their details. Use a database user that can only read.07
Webhooks
We POST a signed JSON event to your URL when something happens, so your server, Zapier or n8n can update your CRM, alert your team or start a workflow. Add endpoints in Settings › Webhooks.
Events
An endpoint can get every event, including ones we add later, or only the ones you pick.
The request
Every body has the same envelope. created is in unix seconds; times inside data are ISO 8601 in UTC.
{
"id": "evt_...",
"type": "conversation.ended",
"created": 1793001600,
"workspace_id": "Wk3n9QpX2rT7vB1mY8sL4dF6hJ0cA5eG",
"data": { }
}Payloads
The transcript holds the visitor's and the agent's messages only (up to the last 500). visitor.verified is true when an identity token signed them in, and attributes are the facts from that token. summary can be null.
collected is what was gathered from the conversation: name, email, phone, topic, outcome (answered, message_taken, not_answered or other), follow_up_needed and sentiment (positive, neutral or negative), plus your own fields under custom, keyed by the field key you set on the agent. A value is null when it wasn't mentioned, and collected itself is null when nothing could be collected. Dates are YYYY-MM-DD when a full date was given, otherwise the visitor's own words.
{
"id": "evt_Qm2Xr8LbT1vN0aYk3dWfE5sJ",
"type": "conversation.ended",
"created": 1793001600,
"workspace_id": "Wk3n9QpX2rT7vB1mY8sL4dF6hJ0cA5eG",
"data": {
"conversation": {
"id": "c0a8f2d4-6b1e-4f7a-9c3d-2e5b8a1f4d70",
"mode": "voice",
"channel": "web",
"started_at": "2026-10-26T09:58:26.000Z",
"ended_at": "2026-10-26T10:00:00.000Z",
"duration_sec": 94,
"ended_reason": "visitor_left",
"summary": "The visitor asked whether their order can still be changed. The agent explained the 2 hour window and offered a callback.",
"handoff_requested": true,
"page_url": "https://example.com/orders",
"page_title": "Your orders",
"dashboard_url": "https://halochime.vercel.app/app/conversations/c0a8f2d4-6b1e-4f7a-9c3d-2e5b8a1f4d70"
},
"agent": {
"id": "5d1c7e9a-0b3f-4e2d-8a6c-1f9e3b7d5a20",
"name": "Support agent"
},
"visitor": {
"id": "user_1042",
"name": "Alex Rivera",
"email": "alex@example.com",
"verified": true,
"attributes": {
"plan": "pro",
"open_orders": 1
}
},
"collected": {
"visitor_name": "Alex Rivera",
"email": null,
"phone": "+1 555 0100",
"topic": "changing an order",
"outcome": "message_taken",
"follow_up_needed": true,
"sentiment": "neutral",
"custom": {
"order_number": {
"label": "Order number",
"type": "text",
"value": "4471"
},
"new_size": {
"label": "New size",
"type": "choice",
"value": "M"
}
}
},
"transcript": [
{
"role": "assistant",
"content": "Hi, how can I help today?",
"created_at": "2026-10-26T09:58:26.000Z"
},
{
"role": "user",
"content": "Can I still change my order?",
"created_at": "2026-10-26T09:58:35.000Z"
},
{
"role": "assistant",
"content": "Orders can be changed within 2 hours. Shall I ask the team to call you?",
"created_at": "2026-10-26T09:58:40.000Z"
},
{
"role": "user",
"content": "Yes please.",
"created_at": "2026-10-26T09:58:57.000Z"
}
]
}
}Test events sent from Settings use the same shape with invented data and "test": true inside data.
Verify the signature
Each endpoint has its own signing secret (whsec_...). Reveal it in Settings › Webhooks. To check a request:
- Read
tandv1from theHalochime-Signatureheader. - Compute HMAC-SHA256 of
<t>.<raw body>with your secret, as hex. - Compare it with
v1in constant time. - Reject the request if
tis more than 5 minutes old, which stops replays.
import crypto from "node:crypto";
import express from "express";
const app = express();
const secret = process.env.HALOCHIME_WEBHOOK_SECRET; // whsec_...
function verifyHalochime(rawBody, header, secret, toleranceSec = 300) {
const parts = Object.fromEntries((header ?? "").split(",").map((p) => p.trim().split("=")));
const t = Number(parts.t);
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(parts.v1 ?? "", "hex");
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}
// Read the raw body: parsed and re-serialized JSON would not match the signature.
app.post("/halochime", express.raw({ type: "application/json" }), (req, res) => {
const raw = req.body.toString("utf8");
if (!verifyHalochime(raw, req.get("Halochime-Signature"), secret)) {
return res.sendStatus(400);
}
const event = JSON.parse(raw);
res.sendStatus(200); // answer first, then do the work
// event.id is the same on every retry: skip ids you have already handled.
console.log(event.type, event.data);
});
app.listen(3000);Retries and delivery log
- Answer with any 2xx status within 10 seconds. Do slow work after you answer.
- If you don't, we try again after 2 seconds and then after 10 more: 3 attempts in all, with the same event id. Use the id to skip duplicates.
- We don't follow redirects. Use your endpoint's final URL.
- URLs must be
https://on the public internet. Private, loopback and link-local addresses are refused. - Every attempt is listed under its endpoint in Settings with the status code, time and payload, for 30 days. Pause an endpoint with its switch; roll its secret if it leaks.
- Public key. Safe in your page source. It only starts the agent on its allowed domains, and drafts only load inside your dashboard.
- Secrets. Identity secrets and webhook signing secrets belong on your server. Action headers are stored encrypted and never leave our server.
- Outgoing requests. Actions, webhooks and page imports only reach the public internet: private, loopback and link-local addresses are refused after DNS lookup.
- Abuse. Each visitor IP can start up to 10 sessions per 10 minutes.
Content Security Policy
If your site sends a Content-Security-Policy header, add these sources to the directives you already have:
script-src https://halochime.vercel.app;
connect-src https://halochime.vercel.app wss://*.livekit.cloud https://*.livekit.cloud;
style-src 'unsafe-inline';connect-srccovers our API and the real-time voice and chat connection.style-src 'unsafe-inline'is needed because the widget's styles sit in a<style>tag inside its Shadow DOM.- Voice needs the microphone. If you send a Permissions-Policy header, allow it:
microphone=(self). Visitors are always asked before the microphone turns on.
09
Limits
What Halochime does today, so you can plan around it.
Ready to try it on your site?
Start free. No card needed.