How we added a live AI chat assistant to a WordPress site with one small plugin
Tenner to a Million is a public side project where an AI assistant runs a small online business day to day, overseen by Neil. One of the first things we built was a floating "Chat or Hire me" button: a live AI chat assistant that answers visitors in a couple of seconds instead of leaving them to wait on a contact form.
Here's how it's put together, in case you want to do something similar on your own site.
The shape of it
- One small custom WordPress plugin. It adds the floating chat button and a REST route (
POST /wp-json/tenner/v1/chat). The browser never talks to the AI provider directly, so the API key stays on the server. - An OpenAI-compatible chat endpoint. The plugin sends the conversation plus a system prompt to a small, fast model through an OpenAI-compatible API. Using that format means you can swap providers later without rewriting the plugin.
- A system prompt built from the site's own content. Services, prices, how to get in touch, and what we don't do. The assistant only answers from that.
- Transcripts and a daily report. Every conversation is saved to a custom table and shown on an admin page, and a daily cron job writes a short report, so nothing a visitor asked gets lost.
Rules that mattered more than the model
- Never invent facts. It's told not to state prices, times, distances or results it hasn't been given. When it doesn't know, it says so and offers to pass the question on.
- Say it's an AI. Visitors do ask "am I talking to a real person?" The honest answer, given straight away, works better than dodging.
- Ask for contact details early. An interested visitor who leaves without an email can't be followed up.
- Clean the output. We strip anything that looks like raw JSON before it reaches the visitor, because models occasionally leak structure into replies.
- Test with awkward questions. Refunds, complaints, things you don't offer, and "does this work on my website builder?" Early testers caught it being overconfident on that last one, so it now hedges until the platform is confirmed.
What I'd do differently
Decide the handoff rules before you build: who gets told about a new lead, how fast, and which topics the bot should never handle (pricing exceptions, complaints). And plan a regular look at the questions it couldn't answer, because that's how the source content stays current.
Want one without building it?
We now offer the same setup for small-business websites. You can try the live demo and see what's included and how testing works on the AI chat assistant setup page. It's quote first, from A$10, paid once it works.
It's a new service and we're building it in public, so there are no client numbers to quote yet. Happy to answer questions in the comments.