=== Qunivex ===
Contributors: qunivex
Tags: ai, chatbot, chat widget, customer support, content generation
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your Qunivex AI agent to your site as a chat widget, and write content with it from the post editor.

== Description ==

[Qunivex](https://qunivex.com) lets you build an AI agent — system prompt, knowledge base, tools, guardrails — and deploy it anywhere. This plugin connects your WordPress site to it.

**Chat widget.** Paste your agent's Widget Public Key and the chat bubble appears on your site. Show it everywhere, or place it per-page with the `[qunivex_chat]` shortcode.

**AI content assistant.** An optional panel in the post editor that asks one of your agents for a draft, an outline, a summary or a rewrite, and lets you insert the result into your post.

You need a Qunivex account to use this plugin. Create one at [qunivex.com](https://qunivex.com).

= What gets sent where =

The chat widget loads a script from qunivex.com and visitors' chat messages are sent to the Qunivex API to be answered. Your Widget Public Key is public by design — it identifies the agent and carries no account access.

The content assistant sends the prompt you type (and, if you tick the box, the post content) to the Qunivex API from your server. Your API key is stored in your site's database and is never sent to visitors' browsers.

== External services ==

This plugin connects to the Qunivex API (https://qunivex.com), which is required for it to function.

* **Chat widget** — loads `https://qunivex.com/widget.js` on your public pages and sends visitors' chat messages, plus their browser's origin, to the Qunivex API to be answered.
* **Content assistant** — sends the prompt you write in the editor, and optionally the post content, to `https://qunivex.com/v1/chat/completions` from your server.

Terms of service: https://qunivex.com/terms
Privacy policy: https://qunivex.com/privacy

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings > Qunivex**.
3. Paste your agent's **Widget Public Key** (find it on your agent's Deploy tab in the Qunivex dashboard) and tick **Show on every page**.
4. Optionally, add an **API key** and **Agent ID** to enable the content assistant in the post editor.

Make sure your own site's domain is listed under the agent's **allowed domains** in the Qunivex dashboard, or the widget will refuse to load on it.

== Frequently Asked Questions ==

= Do I need a Qunivex account? =

Yes. The plugin is a connector; the agent itself lives in your Qunivex dashboard.

= The widget doesn't appear on my site. =

Check that your site's domain is listed under the agent's allowed domains in the Qunivex dashboard, and that the agent's widget is enabled there.

= What is an Agent ID? =

An identifier like `QXA-8MQ7KN2A`, on your project's Overview page. A project ID (`QXP-…`) also works and uses that project's main agent.

= Does the content assistant use my plan's quota? =

Yes. Each generation is one API call against your Qunivex plan's monthly allowance.

== Screenshots ==

1. The settings page.
2. The AI content assistant in the post editor.

== Changelog ==

= 0.1.0 =
* Initial release: chat widget embed (site-wide or via shortcode) and the AI content assistant.
