=== Agenistrator ===
Version: 1.0.0
Stable tag: 1.0.0
Tested up to: 7.0
Tags: ai, chatbot, assistant, admin, automation
Author: Maximum.Software
Author URI: https://maximum.software/
Contributors: maximumsoftware
Donate link: https://github.com/sponsors/maximum-software
Requires at least: 5.3
Requires PHP: 7.4
License: GPL-3.0-only
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Agentic AI assistant for WordPress admin dashboard. Chat naturally to manage your website, search and edit content, analyze data and complete tasks.

== Description ==

Agenistrator is an AI-powered automation tool that brings the full power of large language models directly into your WordPress admin dashboard. Through a simple chat interface, you can delegate complex administrative tasks to an intelligent assistant that acts on your behalf, eliminating repetitive work and dramatically accelerating your workflow. Instead of hunting through menus and settings pages or getting bogged down with manual data entry, just tell the agent what you need and it handles the rest.

When given a complex task, the assistant automatically plans its approach, creates a step-by-step strategy, and executes it autonomously. It monitors its own progress and course-corrects if it gets stuck, so you can hand off multi-step workflows and trust that they will be completed reliably.

The assistant can search across your website content, modify WordPress settings through natural conversation, create custom plugins tailored to your specific needs, adjust theme styles, manage users and permissions, conduct online research and generate content from it, analyze user comments, and much more. All of this is accomplished through a single, unified interface: a natural language conversation. The full scope of what you can achieve is limited only by your imagination.

= Important Warning =

**This plugin is experimental.** It provides powerful capabilities by equipping large language models with tools for not only retrieving information from your website, but also for making changes to it and interacting with the outside world.

By default, only read-only tools are enabled to significantly reduce the risk of unintended consequences. However, the full power of LLMs can only be unleashed by enabling write tools, which requires explicit action on your part.

The performance of your assistant is highly dependent on the quality of the AI model used. If you are not seeing the desired results, try switching to a different model.

**Risks:** Usage of this plugin exposes users and other parties to both obvious and non-obvious risks, including but not limited to:

* Significant API costs from heavy AI provider usage
* Loss of data
* Reputational damage
* Unintended changes to your website
* Unforeseen negative outcomes

**Disclaimer:** The developers of this plugin accept no responsibility for actions taken by any AI model through this plugin, whether due to prompt injection attacks, AI model hallucinations, or any other reasons. Use at your own risk.

= Use Cases =

* Get quick answers about your WordPress installation and content
* Create new posts and pages through natural language descriptions
* Update existing content with specific modifications
* Search and retrieve information about your site's content
* Manage comments, categories, and tags
* Upload and organize media files
* Generate reports and analytics about user comments
* Install, activate, and configure plugins and themes
* Create custom plugins and themes with AI assistance
* Manage WordPress users and permissions
* Monitor site health and debug issues
* Execute calculations and data transformations
* Configure the assistant's own settings and models

= Key Features =

**Always-Available Chat Assistant**
* Access the assistant from anywhere in your WordPress admin via a floating chat icon
* Expand to full screen for complex tasks, or minimize to continue working
* Your conversation history is preserved so you can pick up where you left off
* Only available to administrators
* Each user has their own private chat thread

**Choose Your AI Provider**
* Works with OpenAI, Anthropic (Claude), and OpenRouter
* OpenRouter gives you access to hundreds of models from different providers with a single API key
* Configure multiple providers and switch between them as needed

**Smart Content Search (Optional)**
* Enable semantic search to find content by meaning, not just keywords
* The assistant understands what you're looking for, even if you don't use exact words
* Runs in the background without interrupting your workflow
* Disabled by default to avoid surprise API costs - the plugin works great without it

**Comprehensive WordPress Management**
* Over 100 built-in tools covering all major WordPress admin functions
* Enable or disable individual tools to match your comfort level
* Read-only tools enabled by default; write tools require explicit activation
* Multisite-aware: respects site admin boundaries and restricts sensitive tools to super admins

**Reliable Multi-Step Task Handling**
* The assistant plans complex tasks before executing and tracks its own progress
* Built-in self-monitoring detects and stops unproductive loops
* Handles long-running operations gracefully without timing out
* Rate limiting prevents API errors during intensive workflows

**Your Data Stays Private**
* The plugin runs entirely within your WordPress installation
* Your conversations and site data are stored in your WordPress database
* The plugin only transmits your content to AI providers you explicitly configure
* Problem reports are only transmitted when you explicitly decide to share them with developers

= What Can Agenistrator Do? =

The assistant comes with over 100 built-in tools organized into categories:

* **Content** - Create, edit, search, and manage posts, pages, and custom post types
* **Comments** - Review, approve, edit, and manage user comments
* **Organization** - Manage categories, tags, and custom taxonomies
* **Media** - Upload, organize, and manage images, videos, and files
* **Users** - Create and manage user accounts, roles, and permissions
* **Plugins** - Search, install, activate, and even create custom plugins
* **Themes** - Search, install, activate, and customize themes
* **Menus** - Create and organize navigation menus
* **Settings** - Configure site options and monitor site health
* **Scheduling** - Manage scheduled tasks and automated jobs
* **Debugging** - Read error logs and diagnose issues
* **Web** - Send emails, fetch web content, and download files
* **Advanced** - Calculations, data transformations, and system operations (for power users)

Each tool can be individually enabled or disabled. Read-only tools are enabled by default; tools that modify data require explicit activation.

== Installation ==

1. Upload the plugin zip file to `/wp-content/plugins/agenistrator`, or install directly through the WordPress plugins screen
2. Activate the plugin through the 'Plugins' screen
3. A chat icon will appear in the corner of your WordPress admin area
4. Go to **Agenistrator > Settings** to configure your AI provider and select a model
5. (Optional) Enable semantic search by selecting an embedding model
6. Customize which tools are enabled based on your needs
7. Click the chat icon and start chatting with your AI assistant!

== Frequently Asked Questions ==

= How much does this cost? =

Agenistrator itself is free. However, it requires an API key from an AI provider (OpenAI, Anthropic, or OpenRouter), which typically charge based on usage. Costs vary by provider and model - more capable models generally cost more per message. Start with a spending limit on your provider account to avoid surprises.

= Will this break my website? =

Agenistrator is designed with safety in mind. By default, only read-only tools are enabled - the assistant can view and search your content but cannot make changes. Write tools (that create, edit, or delete content) must be explicitly enabled by you. The assistant also respects WordPress permissions - it can only do what your user account is allowed to do.

= Can I undo changes the assistant makes? =

Changes made by Agenistrator are the same as changes you would make manually through WordPress. Posts and pages support WordPress revisions, so you can revert content changes. For other operations, consider making a backup before enabling write tools for the first time.

= What AI models does this plugin support? =

Agenistrator works with any compatible model from OpenAI, Anthropic (Claude), or OpenRouter. Available models are automatically discovered from each provider. The plugin filters out models that don't support the features it needs, showing you only compatible options.

= Why isn't the assistant giving good results? =

More capable models generally provide better results for complex tasks. If you're using a smaller or free-tier model and experiencing issues, try switching to a more powerful model. The quality of your results is directly related to the capabilities of the AI model you choose.

= What is semantic search? =

Semantic search finds content by meaning rather than just keywords. For example, searching for "vacation photos" could find a post titled "Our Trip to Hawaii" even though the exact words don't match. This feature is optional and requires an embedding model from OpenAI or OpenRouter (Anthropic doesn't offer embedding models). Semantic search is disabled by default to avoid surprise API costs.

= Is my data safe? =

Your API keys, chat history, and content embeddings are stored in your WordPress database and are not transmitted externally by the plugin. When you chat with the assistant, your messages and relevant context are sent to your configured AI provider. The plugin also fetches model metadata from models.dev and tokenizer data (both cached locally).

= What permissions does the assistant have? =

The assistant can only perform actions that:
1. You have enabled in the tool settings (read-only tools are on by default, write tools are off)
2. Your WordPress user account has permission to do
3. Are implemented as tools in the plugin

= How do I get started? =

1. Sign up for an account with OpenAI, Anthropic, or OpenRouter
2. Get your API key from their dashboard
3. Go to **Agenistrator > Settings** in WordPress
4. Add your provider and enter your API key
5. Select a chat model and start chatting!

**Tip**: OpenRouter gives you access to hundreds of models from multiple providers with a single API key.

= Can I use multiple AI providers? =

Yes! You can configure multiple providers and switch between them. This is useful for comparing models or using different providers for different tasks.

= How do I report a problem? =

You can generate a diagnostic report directly from the chat widget. Reports include your chat thread, site info, and configuration (API keys are automatically excluded). You can download reports for your own review or optionally send them to help developers fix issues. For direct support, use the WordPress.org support forum.

== Screenshots ==

1. Animated GIF showing the chat interface accepting natural language commands and performing tasks
2. Status dashboard showing configured AI models, embeddings count, and available tools overview
3. Provider settings with multiple AI providers configured
4. Model selection for chat and embeddings with recommendations and context window settings
5. Tool management interface showing read-only and read-write tools with enable/disable controls
6. Embeddings management for semantic search with sync controls
7. UI settings with chat position selector and the floating chat widget

== Changelog ==

= 1.0.0 =
* Initial release

== Privacy & Data ==

**What is stored locally (in your WordPress database):**
* Your API keys (stored securely in your WordPress database)
* Your chat history with the assistant
* Content embeddings (if enabled)
* All plugin settings and configuration

**What is sent to your AI provider:**
* Your conversation history
* Tool call output (can contain your data)
* Site pages and posts (only if you enable semantic search)

The plugin connects to models.dev to fetch model information (cached locally). Some tools can fetch external URLs or send emails if you enable them.

**Your AI provider's privacy policy applies** to data sent to them. Consult OpenAI, Anthropic, or OpenRouter's privacy policies for details.

== Requirements ==

* WordPress 5.3 or higher
* PHP 7.4 or higher
* MySQL 5.7.8+ or MariaDB 10.2.7+
* An API key from OpenAI, Anthropic, or OpenRouter
* Administrator access (the plugin is only available to administrators)

**Multisite:** Site administrators can manage their own sites. System-level tools (file access, database queries, debug logs) require super admin access.
