How to add an AI chat agent to your WordPress site
A step-by-step guide to putting an AI chat agent on WordPress that answers from your content, qualifies leads, and books appointments — with one script tag, no plugin required.
TL;DR
You can add an AI chat agent to WordPress in about five minutes without a plugin. Create an agent, point it at your content, and copy the one-line script tag from the Widget tab. Paste it into your theme footer or a code-snippets plugin — the deferred script won't slow your page.
Adding an AI chat agent to WordPress takes one script tag and about five minutes — no plugin, no per-seat pricing, no scripted decision tree. This guide shows how to add an agent that answers from your content, qualifies leads, and books appointments.
What do you need before you start?
- A WordPress site where you can edit the theme footer or add a snippet (any plan that allows custom HTML/JS — most self-hosted and Business-tier sites).
- 5 minutes.
- Your content: a help page, FAQ, PDF, or just your site URL.
How do you add the agent to WordPress?
Four steps, about five minutes end to end:
Step 1 — Create the agent
Sign up and create an agent from a template. Point it at your knowledge — paste a URL, upload a doc, or add FAQs. The agent grounds its answers in that content, so it won't make things up. If you want it to collect contact details or book appointments, turn on those steps in the playbook (no prompt engineering).
Step 2 — Copy your embed snippet
From the agent's Widget tab, copy the one-line embed:
<script src="https://dialogent.io/widget.js" data-agent="YOUR_AGENT_ID" defer></script>
The defer attribute matters — it keeps the widget from blocking your page load.
Step 3 — Add it to WordPress
You have three easy options, cleanest first:
- A code-snippets plugin (e.g. WPCode): add the snippet as a footer snippet set to load site-wide.
- Theme footer: Appearance → Theme File Editor →
footer.php, paste the snippet just before</body>. - Block/Custom HTML: for a single page, drop it into a Custom HTML block.
Publish, open your site, and the chat launcher appears in the corner.
Step 4 — Test and verify
Open your site in a fresh tab, ask the agent a question only your content would know, and confirm it answers correctly and captures a test lead. Dialogent marks the install as verified the first time the widget loads.
What can the agent do once it's live?
Once it's live, the same agent works on any page. Common next steps:
- Let visitors book appointments in the chat.
- Capture and qualify leads automatically, 24/7.
- Make sure it answers accurately from your knowledge base.
Prefer to see it before you build? Try the live demo, or start free and paste your first snippet in the next five minutes.
Frequently asked questions
Do I need a WordPress plugin to add the chat agent?
No. The widget is a single script tag you paste into your theme footer, a code-snippets plugin like WPCode, or a Custom HTML block. Any WordPress setup that allows custom HTML/JS works — most self-hosted sites and WordPress.com Business-tier and above.
Will the chat widget slow down my WordPress site?
No — the embed uses the defer attribute so it never blocks page rendering, and the widget initializes lazily. Your Core Web Vitals (LCP, CLS, INP) are unaffected by adding it.
How much does it cost to run the agent?
You can start free: the free plan includes 1 agent and 100 conversations per month. Paid plans are flat-priced — Starter at $29/month and Pro at $99/month — with higher agent and conversation limits. There's no per-seat pricing.
Does the same embed work outside WordPress?
Yes. The script tag is platform-agnostic — the same snippet works on Squarespace, Wix (with custom code enabled), Webflow, Shopify, or any hand-built site where you can add HTML before the closing body tag.
Ready to add an AI agent to your site?
It answers from your content, qualifies leads, and books appointments — no code required.