=== AI Chatbot, Live Chat & Lead Generation for WordPress ===
Contributors: robofyaichatbot
Tags: chatbot, ai chatbot, live chat, lead generation, google gemini
Requires at least: 5.6.0
Tested up to: 6.7.2
Requires PHP: 7.4
Stable tag: 2.0.5
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a WordPress AI Chatbot to your site powered by Google Gemini. Manage AI agents, knowledge bases, live chat, and analytics from your dashboard.

== Description ==

**Robofy** is a WordPress AI Chatbot plugin that lets you deploy an intelligent ai chatbot for website visitors in minutes — no coding required.

Powered by Google Gemini, it creates AI agents that understand your site's content and answer visitor questions automatically. Manage everything from your WordPress admin panel: create agents, train them on your content, customize their appearance, and view conversation analytics.

**Core Features:**

* Create and manage multiple AI chatbot agents
* Train agents on your own content (pages, posts, WooCommerce products)
* Automatically crawl your website to build the knowledge base
* Live chat inbox — view and review all conversations
* Customizable chatbot appearance (colors, avatar, layout)
* Configure AI behavior and response style
* Message statistics with date-range charts
* One-click embed — auto-injects chatbot into your site footer
* Copy-paste embed code (script or iframe) for custom placement
* Sign up with email/password or passwordless magic link (OTP)
* Persistent sessions — no repeated logins required
* Automatic token refresh on session expiry
* WooCommerce support — include product data in knowledge base
* Compatible with Yoast SEO, Rank Math, and AIOSEO for richer content extraction
* 20+ supported languages

**Knowledge Base Sources:**

* WordPress pages and posts
* WooCommerce products (price, SKU, categories)
* Manual website URL crawling
* Direct content upload

**Live Chat & Inbox:**

* Browse all chat sessions per agent
* Read full conversation history between visitors and the AI

**Stats & Analytics:**

* Per-agent message counts
* Daily breakdown charts powered by Chart.js
* Custom date range selection

== External Services ==

This plugin communicates with the Robofy backend API to provide AI chatbot functionality.

* **API Base URL:** https://core.robofy.ai (configurable in config.php)
* **Widget URL:** https://agents.robofy.ai
* **Data sent:** authentication credentials, agent configuration, knowledge base content, stats queries
* **When data is sent:** on every admin action that requires API communication, and when the chatbot widget loads on the frontend
* **Privacy policy:** https://www.robofy.ai/privacy-policy
* **Terms of service:** https://www.robofy.ai/terms-of-service

This plugin also loads Chart.js for statistics visualisation in the admin dashboard.

* **Service URL:** https://cdn.jsdelivr.net/npm/chart.js
* **Data sent:** None — this is a client-side charting library; no data is transmitted
* **Privacy policy:** https://www.jsdelivr.com/privacy-policy-jsdelivr-net

By using this plugin you agree to Robofy's terms of service and privacy policy.

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/
2. Activate the plugin through the Plugins menu
3. Navigate to "AI Chatbot" in your admin sidebar
4. Log in or create a Robofy account
5. Create your first agent and embed it on your site

== Frequently Asked Questions ==

= Does this work with WooCommerce? =

Yes. The plugin detects WooCommerce and lets you add product data (price, SKU, categories, tags) to your chatbot's knowledge base.

= Which AI model powers the chatbot? =

The chatbot is powered by Google Gemini via the Robofy backend.

= Can I use a custom API endpoint? =

Yes. Open config.php and change the value of PLUGIN_API_BASE_URL.

= Will my login session persist across page reloads? =

Yes. Authentication tokens are stored in the WordPress database and refreshed automatically before they expire.

= Can I preview the chatbot before publishing it? =

Yes. Each agent has a built-in playground iframe where you can test it before enabling the frontend embed.

= How do I add my site's content to the chatbot? =

From the agent management page, use the Knowledge Base tab to browse and link your WordPress pages, posts, or WooCommerce products. You can also crawl a URL directly or upload custom content.

== Changelog ==

= 2.0.5 =
* Renamed "Appearance" tab to "Playground" on the Agent Management page
* Fixed bug: "Validation failed. Please check your request" error when saving appearance settings
* Combined Appearance and Playground into a single tab

= 2.0.4 =
* Added live chat inbox with full conversation history
* Added Knowledge Base management (link/delink content)
* Added WordPress content browser (pages, posts, WooCommerce products)
* Added website URL crawling for knowledge base
* Added chatbot appearance customization
* Added AI settings configuration
* Added one-click frontend embed toggle
* Added embed code snippets (script and iframe)
* Added account plan limits display
* Improved stats dashboard with Chart.js charts and date-range picker
* SEO plugin support: Yoast SEO, Rank Math, AIOSEO

= 2.0.0 =
* Initial release – Authentication, onboarding, agent CRUD, and stats.

== Upgrade Notice ==

= 2.0.4 =
Major update adding inbox, knowledge base management, appearance settings, and embed controls.

