=== Kelma Chat ===
Contributors: kelma
Tags: chatbot, ai chatbot, live chat, chat widget, customer support
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your Kelma AI chat agent to WordPress. Answers visitors from your own content, captures leads, books meetings, and hands off to your team.

== Description ==

[Kelma](https://kelma.chat) is an AI chat agent that learns your website and documents, then answers your visitors' questions in your brand's voice — capturing leads, booking meetings and handing off to your team when it matters.

This plugin adds your Kelma agent to your WordPress site with no code. You paste your **Agent ID** once and the widget appears on every page.

**Featherweight & private by design**

* The widget loads **asynchronously** and runs in its own sandboxed iframe, so it **never blocks your page** from rendering — your Lighthouse score doesn't move.
* The loader is only a few kilobytes gzipped — 10–20× lighter than the big incumbents.
* **No cookies, no third-party trackers, no data selling.**

**Features**

* Answers from your own site content and documents
* Captures leads straight to your inbox
* Books meetings and hands off to a human
* Fully on-brand — colours, avatar, welcome message
* Optional: hide the widget for logged-in administrators

You'll need a free Kelma account. [Create one at kelma.chat](https://kelma.chat).

== Installation ==

1. In WordPress, go to **Plugins → Add New → Upload Plugin** and upload `kelma-chat.zip`, then **Activate**.
2. Go to **Settings → Kelma Chat**.
3. Paste your **Agent ID** (find it in your Kelma dashboard under **Embed & share** — it's the `data-kelma` value in your snippet).
4. Save. Visit your site in a private window to see the widget.

== External services ==

This plugin connects your site to **Kelma** (https://kelma.chat), a third-party AI chat service, so the chat widget can run on your pages. You need a free Kelma account and an Agent ID for it to do anything.

What it loads and when:

* On the front end of your site, the plugin adds a script tag that loads the widget loader from `https://kelma.chat/embed.js`. This happens on every page view where the widget is shown.
* When a visitor opens and uses the chat, the widget (running in a sandboxed iframe from kelma.chat) sends the visitor's messages and the technical data needed to run the conversation (such as the page URL, an anonymous visitor identifier and your public Agent ID) to Kelma's API, and receives the AI replies.

The plugin itself does not send any data to Kelma from your server — it only outputs the loader tag; all chat communication happens in the visitor's browser, between the visitor and Kelma.

Your use of the Kelma service is governed by:

* Terms of Service: https://kelma.chat/terms
* Privacy Policy: https://kelma.chat/privacy

== Frequently Asked Questions ==

= Where do I find my Agent ID? =
In your Kelma dashboard, open your agent and go to **Embed & share**. Your Agent ID is the `data-kelma="…"` value in the snippet.

= Will this slow down my site? =
No. The widget loads asynchronously in a sandboxed iframe and adds no render-blocking time.

= Does it set cookies or track my visitors? =
No cookies and no third-party trackers. Kelma keeps a little state in the visitor's own browser purely to continue the conversation.

= Can I hide the widget from myself while editing? =
Yes — enable "Hide for logged-in admins" in the settings.

== Changelog ==

= 1.0.0 =
* Initial release: settings page for your Agent ID, async embed injection, hide-for-admins option.
