Add an AI chat agent to your ProcessWire site
Hazelchat answers your visitors from the pages and documents you approved, shows the sources under every answer and passes enquiries on to you. A free module adds it to every page of your ProcessWire site: copy one folder, click Install and paste one code in the admin. No template editing, nothing to host and no AI provider keys.
Version 1.0.0 for ProcessWire 3.0.200 and newer. The Free plan includes 50 answers a month on one website, with no card, and stays free.
Works with ProcessWire 3.0.200 and newer, whatever your templates look like. Since 2023, ProcessWire installs modules from its admin only in debug mode, so you copy the module's folder to your server once.
What you need
- ProcessWire 3.0.200 or newer, on PHP 7.3 or newer.
- A way to copy a folder into
/site/modules/(your host's file manager, FTP or SFTP) and a superuser account in the ProcessWire admin. If a developer looks after your site, send them the steps. - A Hazelchat account. The module needs the hosted Hazelchat service; the Free plan includes 50 answers a month on one website, with no card.
Add Hazelchat to ProcessWire in five steps
-
In Hazelchat
Prepare your agent
Add your content, check the details and try your agent. Under Website → Install on your website, add your website's domain.
-
In Hazelchat
Copy the installation code
Copy the installation code. It holds your public widget key, which is not a password.
-
On your server
Copy the module folder
Download Hazelchat.zip, unzip it and copy the
Hazelchatfolder into/site/modules/. Copying it alone loads nothing on your site. -
In ProcessWire
Install it and paste the code
In the admin, open Modules, click Refresh, then Install next to Hazelchat. Its settings open: paste the code into Installation code and click Submit. If you pasted a Hazelchat script into a template before, remove it so the chat loads once.
-
On your site
Switch it on and test it
Back in Hazelchat, click Publish and switch on (or Switch on if your published agent is unchanged). Hazelchat checks that the script is on your website before the agent goes live. Then open your website, ask a question in the chat, return to Hazelchat and click Yes, I saw this answer.
Send this to your developer
Your site is built and deployed by someone else? Copy this message, put your installation code where it says so, and send it to them.
Please add the Hazelchat chat to our ProcessWire site:
1. Copy the "Hazelchat" folder from
https://hazelchat.co/downloads/processwire/Hazelchat.zip
into /site/modules/ (or git clone
https://github.com/hazelchat-co/processwire-hazelchat
into /site/modules/Hazelchat).
2. Modules → Refresh, then Install next to Hazelchat.
3. In its settings, paste:
[our installation code from Hazelchat]
and submit. The setting is kept in the database.
Guide: https://hazelchat.co/integrations/processwire/
What the module does
It adds one script to the pages of your site and nothing else. Your content, answers, enquiries and billing all stay in your Hazelchat workspace.
The module adds https://app.hazelchat.co/widget.js, with your public key, just before </body> on the page each visitor opens, including your 404 page. The admin, AJAX requests, templates whose content type is not HTML, pages that a template renders inside another page, and output without </body> stay as they are. The script address is fixed in the module and cannot be changed in its settings. Only a valid key is saved: anything else, such as an API key, is refused when you click Submit. Only superusers, or roles you give module-admin, can change it. The module keeps only the key and one switch in its module settings, adds no fields, templates, pages or tables, makes no requests from ProcessWire to Hazelchat and sends nothing. It is free software under the MIT licence; its admin texts are in English.
Visitor consent
The chat sets no cookies and keeps only a reference to the conversation until the tab is closed. If you want visitors to allow the chat first, turn on Wait for my consent manager in the module's settings.
With PrivacyWire, the module puts the chat in PrivacyWire's Functional cookies group. Nothing from Hazelchat loads until a visitor allows Functional cookies; PrivacyWire then starts the chat on the same page. If PrivacyWire's banner does not offer Functional cookies, the chat starts only for visitors who accept all cookies, and the module's settings say so.
With another consent tool, the chat stays closed and sends no chat requests until your consent tool runs this line (it also works when the tool replays a stored choice as the page loads):
(function (start) { document.readyState === 'loading' ? document.addEventListener('DOMContentLoaded', start) : start(); })(function () { window.dispatchEvent(new CustomEvent('hazelchat-consent', { detail: true })); });
Send detail: false when a visitor withdraws consent. If your site must block even the script download, use PrivacyWire or let your consent tool block that script too. For ready settings for common cookie banners, see cookie banners.
If the chat does not appear
No Hazelchat under Modules?
Check that the folder is
/site/modules/Hazelchat(notHazelchat/Hazelchat), then click Refresh again. You need a superuser account to see Modules.Check the code
Paste the whole installation code, or only its 64-character key. Anything else is refused with one sentence when you submit.
Using PrivacyWire?
With Wait for my consent manager on, the chat appears only after a visitor allows Functional cookies. Allow them yourself in the banner and look again.
Leave the script alone
If a caching or optimising module or service rewrites your pages, exclude
https://app.hazelchat.co/widget.jsfrom combining or delayed loading.Content-Security-Policy
If your server or a module sends one, allow
https://app.hazelchat.coinscript-src,connect-srcandframe-src.A second domain
The Free plan serves one website. A second ProcessWire site on another domain needs a plan with more websites.
Change or remove
New widget key
If you rotate the key in Hazelchat, paste the new code into the module's settings and click Submit.
Pause the chat
Switch Hazelchat off in your workspace. It stops answering straight away, even on cached pages.
Remove it from the site
Empty Installation code and click Submit, or uninstall the module under Modules and delete its folder. Your Hazelchat account and plan are not affected.
Updates and changes
Download the newer Hazelchat.zip, replace the /site/modules/Hazelchat folder with it, and click Refresh under Modules. Your settings stay.
1.0.0 (November 2026): adds the Hazelchat chat to every page of a ProcessWire 3.0.200+ site from one installation code in the module's settings; optional wait for your consent manager, including PrivacyWire's Functional cookies group.
ProcessWire is a trademark of its makers. Hazelchat is not affiliated with or endorsed by them; the name is used here only to say which software the module works with.
Let your ProcessWire site answer from its own pages.
Questions? Email hello@hazelchat.co. We answer within one business day. Not on ProcessWire? See all the ways to install Hazelchat.