A chat widget that lands in one person's inbox is a modest build: a WebSocket server, a script tag visitors load, an agent page, canned replies and an emailed transcript. The weekend goes on dependability: reconnects on bad networks, offline messages that become email, push notifications on a phone, and spam control on a public endpoint. You also lose the Marketplace integrations and the AI Agent. If you need several agents and mobile apps, self-hosting Chatwoot is shorter than building.
Before you buildLiveChat has no free plan, only a 14-day trial. If you just need a widget on a small site, a free tier from another provider may be enough; this build only pays off if you want to own the conversations.
Build me a website chat widget with an agent inbox to replace LiveChat. Requirements: - Node.js 22 + TypeScript: Fastify with `@fastify/websocket`. The visitor widget is one vanilla JS file served at /widget.js; the agent inbox is a small React page built with Vite. `npm start` serves http://localhost:4870 with the inbox at /agent. - Storage: better-sqlite3 in ./data/chat.db: visitors (random id, first seen, current page, user agent), conversations (status open / closed, visitor email), messages (sender, body, created_at, read_at) and canned replies (shortcut, text). - Widget: embed with `<script src="https://HOST/widget.js" async></script>`. A floating button, a message list, a typing indicator, and reconnects with backoff that keep the visitor id in localStorage. The widget script loads only on origins listed in ALLOWED_ORIGINS in .env. - Offline: when no agent has the inbox open, the widget asks for an email address and sends the message as an offline message. Send it to me with nodemailer SMTP (settings in .env) and let me answer from the inbox, which then emails the reply to the visitor. - Agent inbox: open conversations with unread counts, live updates over WebSocket, reply, close, a private note, the visitor's current page, and canned replies inserted by typing `/shortcut`. - Notifications: Web Push (`web-push`, VAPID keys in .env) when a visitor writes, and a visitor option to receive the transcript by email when a conversation closes. - Safety: escape every message when rendering, reject messages over 2,000 characters, limit each visitor and IP with `@fastify/rate-limit`, and protect the inbox with one password in .env (signed cookie). - Single user. No accounts, no telemetry, local-first. Outbound calls: SMTP and the push services only. - Out of scope: several agents, routing, bots or AI replies, Messenger, WhatsApp and SMS, file uploads, visitor tracking beyond the current page. - README: the embed snippet, running behind a reverse proxy that passes WebSockets (a Caddy example), generating VAPID keys, the iOS Home Screen requirement for push, and backing up ./data.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own LiveChat.
Add suggested replies to the chat inbox in this folder. Requirements: - DOCS_DIR in .env points at a folder of Markdown files with my help content. - On each new visitor message, split the docs into chunks, pick the 3 closest by embedding (any OpenAI-compatible endpoint in .env) and ask the model for a draft answer with the source file name. - Show the draft in the reply box, never send it automatically, and mark it "draft from docs". - If the docs do not contain the answer, show "no draft" instead of a guess. - Cache embeddings in SQLite keyed by file hash. Update the README with what text leaves the machine.
Add Telegram replies to the chat inbox in this folder. Requirements: - A Telegram bot (token and my chat id in .env) that posts each new visitor message, with the conversation number and visitor page, to my chat. - Replying to that bot message in Telegram sends my text to the visitor; `/close 12` closes conversation 12. - Use long polling, not a webhook, so no extra public endpoint is needed. Ignore any other chat id. - Messages sent from Telegram appear in the inbox history marked "via Telegram". - Update the README with how to create the bot.
Add a second agent to the chat inbox in this folder. Requirements: - Replace the single password with agent accounts (email, name, password hash with argon2) created by an admin page; the first account is admin. - Conversations have an assignee; "Take" assigns it to me and other agents see who has it. - Typing indicators and replies show the agent's name to the visitor. - Notifications go to the assignee, or to everyone while a conversation is unassigned. - Sessions in signed cookies with a 7-day expiry and a log-out-everywhere button. Update the README.
A chat widget sits on your storefront all day, and visitors notice when it hangs or swallows a message. LiveChat sells that dependability, plus agent apps, canned replies and integrations, so a shop owner can answer from a phone without running a server.
Estimate · Runs on a $5 VPS with Caddy for HTTPS. Email at this volume fits a free SMTP tier. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Essential | $25 | $19 | 60 days of chat history, 50 live visitors tracked, 3 proactive campaigns, 10,000 API calls a month, 1 AI Agent with 10 AI resolutions a month, 5 AI reply suggestions per user, 1 team, 3 workflow rules with 300 runs, 2 GB of storage plus 50 MB per user. |
| Growth | $99 | $79 | Unlimited chat history, 400 live visitors, 30 proactive campaigns, 20,000 API calls, 10 AI Agents and 200 AI resolutions a month, 50 reply suggestions per user, up to 10 teams, chat supervision and takeover, shared canned responses, team reports, 15 GB of storage plus 100 MB per user. |
| Enterprise | custom | — | Custom AI Agents and workflows, SOC 2 Type 2, SSO and audit logs, white-label widget, SLAs, a dedicated team. |
No free plan: every plan starts with a 14-day trial that needs no credit card.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Mobile apps for agents, with push notifications you can trust, The Marketplace of 200-plus integrations, including Shopify and CRMs.
About $25 a month on the Essential plan per seat, $300 a year (checked 2026-10-19).
Mobile apps for agents, with push notifications you can trust; The Marketplace of 200-plus integrations, including Shopify and CRMs; The AI Agent that answers from your help content, with metered resolutions; Teams, chat takeover, supervision and performance reports; Channels beyond the website widget, such as WhatsApp, Messenger and SMS. If any of those matter to you, keep paying.
Yes: Chatwoot (open source), Live Helper Chat (open source), Libredesk (open source).