=== Sabriel AI ===
Contributors: sabrielagency
Tags: chatbot, ai assistant, live chat, customer support, virtual assistant
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.26
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A white-label AI chat assistant. Bring your own key for Gemini, OpenAI or Claude. Fully customizable, 9 languages, no account required.

== Description ==

Sabriel AI puts a real AI assistant on your site, styled to look like it was built for your brand, not like a widget you bolted on.

You connect **your own API key** for Google Gemini, OpenAI or Anthropic Claude. The key is stored encrypted on your site and is only ever sent to the provider you chose. There is no account to create, no service in the middle, and no data of yours passes through us.

= What the assistant can do =

* Answer questions about your business, using the details and the price list you enter in the settings
* Speak the language your visitor writes in, and switch mid-conversation if they do
* Read images your visitor attaches, and PDFs too when the engine you picked supports them
* Take voice messages: speech becomes text inside the visitor's own browser, so no audio ever leaves their device
* Know your opening hours, and tell a visitor writing at 11pm that you are closed instead of letting them wait
* Quote in your currency, with your VAT rate and your payment terms, exactly as you set them
* Hand the conversation over to a human, with WhatsApp, email and phone buttons and the message already written
* Take a written message when nobody is available, and send it to you by email
* Email the visitor a tidy summary of the conversation when they leave, and notify you at the same time
* Recognise a visitor who comes back from the same device, and pick up from what you already talked about

= What you get in the admin panel =

* **A setup wizard that does the boring part.** It reads your homepage with the AI you just connected and suggests a tagline and a tone of voice for your assistant. It also pulls your business name, website and email straight from WordPress, and your address from WooCommerce if you have it. You approve what you want and skip the rest.
* **Seven ready-made tones** — e-commerce, professional practice, salon, restaurant, medical practice, craftsperson, estate agency — as a starting point you then edit in your own words.
* **A dashboard** with visits, unique visitors, chats opened, daily average, blocked abuse attempts and your most visited pages, over the last 90 days. Counted on your own site, without cookies.
* **A system status page** that checks the things that actually break: whether your key is readable, whether the server can encrypt it, whether your site can send email at all. With a real test button for each.
* **Export and import** of the whole configuration, to move a finished setup onto the next site.

= What you control =

* **Your brand.** Logo, bot name and the widget's main colours, with a live preview while you pick them. No credit of ours appears unless you choose to switch it on.
* **Behaviour and tone.** A plain-text field where you tell the assistant how to talk and what your rules are.
* **Your price list.** One row per service, with price and short description. The assistant quotes from it instead of inventing numbers.
* **Opening hours**, including shifts that cross midnight: the plugin splits them across the two days by itself.
* **Currency and VAT**, by country, with the rate filled in for you, and your deposit/balance structure.
* **Links to your pages.** The assistant cites them naturally when they are relevant, and never invents an address that does not exist.
* **Anti-abuse limits.** How many messages one visitor gets in 24 hours — a number you set, not one we impose — how many conversation summaries a single address can receive in an hour, and disposable email addresses turned away.

= Nine languages, out of the box =

Italian, English, Spanish, French, German, Portuguese, Dutch, Russian and Indonesian: for both the assistant and the admin panel, and they can be different from each other.

= Documentation inside the plugin =

There is a full Documentation page in the admin menu, with live previews that reflect your actual configuration. You can also export it as a single HTML file and publish it on your own site for your team.

= A larger version exists =


Nothing here is locked. The paid edition is a separate plugin, not a key that unlocks code you already downloaded: none of the features listed above ship inside this download in a disabled state.

It is **not** required and this plugin does not nag you about it: everything described above works on its own, for everyone, forever. Details are on a single page inside the plugin, and at https://sabrielagency.com

== Installation ==

1. Install the plugin from Plugins → Add New, or upload the folder to `/wp-content/plugins/`.
2. Activate it. The setup wizard opens by itself.
3. Choose the assistant's language and enter your business details.
4. Pick an AI engine and paste your API key. Google Gemini offers a free tier that is enough to get started.
5. Save. The chat widget appears on your site right away.

== Frequently Asked Questions ==

= Do I need to create an account? =

No. There is no registration, no license key and no service of ours in the middle. You only need an API key from the AI provider you choose.

= Where do I get an API key? =

Google Gemini: https://aistudio.google.com/apikey | OpenAI: https://platform.openai.com/api-keys | Anthropic Claude: https://console.anthropic.com/

= What does it cost to run? =

You pay your AI provider for what the assistant actually uses, at their published rates. The plugin adds nothing on top. A small business site typically spends very little per month.

= Is my API key safe? =

It is encrypted before being written to your database, and it is never shown again in the admin panel once saved. It is only sent to the provider you selected, over HTTPS.

= Can I change AI provider later? =

Yes, at any time, without losing anything. Each provider keeps its own key.

= Does it work in my language? =

The interface ships in nine languages. The assistant itself replies in whatever language the visitor writes in, whichever one that is.

= Does it slow down my site? =

The widget loads its own small stylesheet and script and nothing else. There are no external fonts and no third-party trackers. The only server the site ever contacts is the AI provider you configured, and only when a visitor writes in the chat. See "External services" below.

== External services ==

This plugin relies on one external service, and only on one: the AI provider you choose. Nothing is sent anywhere until you configure it.

**The AI provider you choose.** To answer a visitor, the plugin sends the conversation (the visitor's messages, any attachment, and the business information you entered (price list, opening hours, contacts) to the provider you selected, using your own API key. It is sent only when a visitor writes in the chat, and only to the one provider that is active. No copy is sent anywhere else.

* Google Gemini: terms https://ai.google.dev/gemini-api/terms | privacy https://policies.google.com/privacy
* OpenAI: terms https://openai.com/policies/ | privacy https://openai.com/policies/privacy-policy
* Anthropic Claude: terms https://www.anthropic.com/legal/commercial-terms | privacy https://www.anthropic.com/legal/privacy

The plugin never contacts any server belonging to Sabriel Agency, and collects no usage statistics.

**Reporting a problem (optional, and only if you ask for it).** The System status page has a form that emails a bug report to the plugin author, through your own site's mail system. It carries what you write, the address you give for a reply, your site address and the technical summary shown on that same page. Nothing is sent unless you fill that form in and submit it.

== Privacy ==

**What leaves your site, and where it goes.**

When a visitor writes in the chat, their message, together with any attachment and the business information you entered (price list, opening details, contacts), is sent to the AI provider **you** selected, using **your** API key. That is how the assistant answers: without that request there would be no reply.

How that data is handled, and for how long it is kept, is decided by that provider, not by this plugin. Their terms apply:

* Google Gemini: https://ai.google.dev/gemini-api/terms
* OpenAI: https://openai.com/policies/
* Anthropic Claude: https://www.anthropic.com/legal/commercial-terms

**Visit statistics (you can switch them off).** To count returning visitors without writing a cookie, the widget builds a short code from a few browser characteristics (screen size, language, time zone, platform) and sends it to your own site together with the page address. It never leaves your site and it is not readable back into those characteristics, but in the EU this still counts as accessing the visitor's device: if you do not ask for consent, turn the option off in Settings → Limits. The chat works exactly the same either way.

**What stays on your site.** The visit counters are stored in your own WordPress database. The name, email and past conversations a visitor types into the chat stay in that visitor's own browser and are never written to your database: the assistant recognises someone returning on the same device because the browser tells it, not because the site kept a record. Nothing is sent to Sabriel Agency.

**Emails.** The conversation summary is sent to the visitor's own address and to the address you configured, through your site's normal mail system.

**Removing everything.** Deleting the plugin from the Plugins screen removes its settings, its visit counters and its scheduled tasks. Anything belonging to your customers is only removed if you first switch on "Also delete customer data" in Settings: it is off by default, so uninstalling in order to reinstall never loses anything. It also clears leftover data from the paid edition, if the site ever ran it.

== Screenshots ==

1. The chat widget on a live site, in the colours of the business.
2. The customization page: logo, bot name and colours, with the live preview.
3. The AI engine page: three providers, your own key, and the price of every model.
4. Settings: business details, price list and page links.
5. The setup wizard, which reads your homepage and suggests a tone of voice.
6. System status: what is configured, what is missing, and a real test for each.
7. The documentation, built into the plugin and exportable as a single HTML file.

== Changelog ==

= 1.0.26 =
* Fixed, from a full restaurant test: the bot now knows your WooCommerce products properly — variants, attributes, tags, categories, price and stock all reach it, so "dishes without sauce" or "a black hoodie" can finally be answered instead of listing everything.
* Fixed: a shift running past midnight is still stored split (the calendar needs that), but the bot no longer reads it out split. It says Monday 15:00-02:00 instead of Monday until 00:00 and Tuesday from 00:00, which made customers think you close at midnight.
* Fixed: when a requested time cannot fit a whole appointment, the assistant said it was "outside our opening hours" — untrue when the time is inside them — and offered nothing. It now says an appointment does not fit and names the closest free times, one before and one after.
* Fixed: a quote PDF came out with no logo, silently, whenever the logo was a WebP, SVG or AVIF file. Those are converted now.
* Fixed: a link written with an empty label printed the bare address, brackets and all, in the middle of a sentence. The assistant is also told not to attach links that have nothing to do with the question.
* Fixed: the Knowledge panel kept the bot's own summary of a page, so after you correct it you can still see what it had written. It did this for keywords already, not for summaries.
* Fixed: security notices about readme.html and license.txt were cached for 12 hours, so adding the rule to .htaccess appeared to change nothing. The check now runs again after every save, and there is a link to re-run it on the spot.
* Fixed: admin notices inside the setup wizard no longer spill outside their coloured background, and the NEW badge no longer breaks onto two lines.

= 1.0.25 =
* Fixed: the assistant sometimes copied, word for word, the Italian sample sentences written inside its own instructions — the line it says before running a website audit, the wording of the appointment reason, and a dozen more. Those samples are now written as descriptions of what to say, not as ready-made Italian sentences, so there is nothing left to copy. The language rule also states explicitly that it covers the text the assistant puts inside an appointment or a quote, which the customer reads in the confirmation card and in the PDF.

= 1.0.24 =
* Fixed: the assistant could still answer in Italian to a customer writing in English, even with "the bot speaks every language" on. Everything the engine reads — the instructions, your business details, your price list, your page texts — is written in Italian, and nothing told it that this was not an example to copy. The language rule is now the very first thing the engine reads, it says in so many words that the language of the instructions must never decide the language of the reply, and it is recalled once more at the end.

= 1.0.23 =
* Fixed: the bot did not reliably obey the language settings. With "the bot speaks every language" on, it would answer in the configured language anyway, especially when the customer opened with a plain "hello"; with the switch off, it would sometimes follow the customer's language instead of the one you chose. The instructions sent to the AI contained five separate rules about language that contradicted each other, and the switch only turned one of them on and off. There is now a single rule, built from your setting, and it applies from the customer's very first message.
* Fixed: three of those instructions named Italian by hand: the fallback for an unreadable message, the sample greeting and the punctuation rule. On a site set to any other language they pulled the bot towards Italian. The fallback is now the language you chose, and the rest follows the language in use.

= 1.0.22 =
* Added Gemini 3.5 Flash-Lite to the model list. The recommended model does not change: 3.1 Flash-Lite still costs less.
* The plan comparison listed two things as missing that this edition actually has: there is no Sabriel AI credit in the chat footer, and updates arrive from WordPress.org like any other plugin. Both are now listed as included.
* The manual pointed to the wrong tab for the visit-statistics switch, and printed its label in English inside the other eight languages.
* The reset warning on the Customization page listed settings this edition does not have.
* The manual's contents list was missing an entry, and its section headings now use the same icons as the rest of the plugin.
* New: an optional "Powered by Sabriel AI" credit under the chat, off by default. It is your choice, it changes nothing else, and the appearance reset leaves it alone.
* Importing a configuration exported from the complete edition no longer writes appearance values this edition has no control for: they are skipped, and what your site already had is left alone.

= 1.0.21 =
* Spam turned away by the "send us a message" box is now counted in Analytics, as it already was for the emailed conversation copy. It used to be turned away silently.
* The prompt used to read your homepage is now written in English.

= 1.0.20 =
* Every fix from a full line-by-line review of the code was brought over from the paid edition. Among them: a price list restored from an exported configuration could make the public chat return a fatal error; the Bot name field froze on the first save; an unreadable API key was reported as working while the bot stayed silent.

**Version numbers between 1.0.12 and 1.0.19 belong to the separate paid edition and were never released here. Nothing has been removed from this list.**

The full history of this edition, from 1.0.8 onwards, is in `changelog.txt` inside the plugin folder.

== Upgrade Notice ==

= 1.0.26 =
Eight fixes from a full restaurant test: WooCommerce variants, night shifts, booking times, PDF logo and more.

= 1.0.25 =
Removes the Italian sample sentences the assistant could copy word for word into a reply.

= 1.0.24 =
Completes the language fix: the assistant no longer drifts into Italian because the instructions are written in Italian.

= 1.0.23 =
Fixes the bot ignoring your language settings: it now follows them from the customer's first message.

= 1.0.22 =
Adds Gemini 3.5 Flash-Lite and corrects the plan comparison, which understated what this free edition includes.
