=== Agenistrator ===
Version: 1.0.1
Stable tag: 1.0.1
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, manage users and permissions, write and delete files inside your site's uploads directory, 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
* Write and delete files inside the uploads directory
* Generate reports and analytics about user comments
* Install, activate, and configure plugins and themes
* 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), OpenRouter, and Ollama Cloud
* 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 manage 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 sandboxed file operations in the uploads and temp directories (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.

== 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)

Some tools can fetch external URLs or send emails if you enable them.

== External Services ==

This plugin connects to external services to provide chat assistant functionality. **You must configure at least one AI provider** for the plugin to work. Your conversations and site content are only sent to providers you explicitly configure. The plugin also retrieves model metadata and tokenizer data from external services (see models.dev and OpenAI Tokenizer Data sections below).

= OpenRouter =

OpenRouter is an API gateway that provides access to hundreds of AI models from multiple providers (OpenAI, Anthropic, Google, Meta, and others) through a single API key.

**Data sent:** When you send a message to the assistant, your conversation history, tool outputs, and relevant site content are sent to OpenRouter's API, which routes requests to the underlying model provider. If you enable semantic search with an OpenRouter embedding model, your site's posts and pages are sent to generate embeddings.

**When:** Data is sent each time you interact with the chat assistant (if OpenRouter is your configured provider) and when embedding synchronization runs (if you've selected an OpenRouter embedding model).

* [OpenRouter Terms of Service](https://openrouter.ai/terms)
* [OpenRouter Privacy Policy](https://openrouter.ai/privacy)

= Anthropic =

Anthropic provides large language models (Claude) for chat completions. Anthropic does not offer embedding models.

**Data sent:** When you send a message to the assistant, your conversation history, tool outputs, and relevant site content are sent to Anthropic's API.

**When:** Data is sent each time you interact with the chat assistant (if Anthropic is your configured provider).

* [Anthropic Terms of Service](https://www.anthropic.com/legal)
* [Anthropic Privacy Policy](https://www.anthropic.com/privacy)

= OpenAI =

OpenAI provides large language models for chat completions and embedding models for semantic search.

**Data sent:** When you send a message to the assistant, your conversation history, tool outputs, and relevant site content are sent to OpenAI's API. If you enable semantic search, your site's posts and pages are sent to generate embeddings.

**When:** Data is sent each time you interact with the chat assistant (if OpenAI is your configured provider) and when embedding synchronization runs (if you've selected an OpenAI embedding model).

* [OpenAI Terms of Use](https://openai.com/policies/terms-of-use)
* [OpenAI Privacy Policy](https://openai.com/privacy)

= Ollama Cloud =

Ollama Cloud is a hosted inference service operated by Ollama that runs large open-weight models on datacenter GPUs. It exposes an OpenAI-compatible API and offers a free tier. Ollama Cloud does not offer embedding models.

**Data sent:** When you send a message to the assistant, your conversation history, tool outputs, and relevant site content are sent to Ollama Cloud's API.

**When:** Data is sent each time you interact with the chat assistant (if Ollama Cloud is your configured provider).

* [Ollama Terms of Service](https://ollama.com/terms)
* [Ollama Privacy Policy](https://ollama.com/privacy)

= OpenAI Tokenizer Data =

The plugin uses the tiktoken library for token counting, which downloads tokenizer vocabulary files from OpenAI's public blob storage.

**Data sent:** Only the HTTP request itself (your server's IP address). No user data, conversation content, or site information is sent.

**When:** When the plugin first needs to count tokens (typically on first chat message). The vocabulary file is cached locally in the WordPress content directory and reused for subsequent requests.

= models.dev =

models.dev is an open-source database of AI model specifications, used to retrieve model metadata such as context window sizes and display names.

**Data sent:** Only the HTTP request itself (your server's IP address). No user data, conversation content, or site information is sent.

**When:** When the plugin needs to determine context window limits during a chat session (cached locally for 24 hours).

* [models.dev on GitHub](https://github.com/anomalyco/models.dev) (MIT License, open-source project)

== 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, OpenRouter, or Ollama Cloud
* Administrator access (the plugin is only available to administrators)

**Multisite:** Site administrators can manage their own sites, including writing and deleting files inside their site's uploads directory. Tools that read files outside the uploads directory or access server-level diagnostics (arbitrary file reads, debug logs) require super admin access.

== 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, OpenRouter, or Ollama Cloud), 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. Ollama Cloud and OpenRouter both offer free tiers that let you try the plugin without any cost.

= 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), OpenRouter, or Ollama Cloud. 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 and Ollama Cloud don'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, OpenRouter, or Ollama Cloud
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**: For a free, easy-to-set-up starting point, try Ollama Cloud — a sensible default chat model is auto-selected when you add the provider. OpenRouter is another good free option that 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.1 =

* Release date: May 5, 2026

* Added Ollama Cloud provider support
* Added Write File and Delete File tools (restricted to uploads and temp directories)
* Semantic search is now gracefully disabled on unsupported databases
* Temperature parameter now selectively sent only when supported
* Merged Upload Media and Download Media into a single Create Media tool
* Improved settings page onboarding and provider labels
* Security: sanitized API keys before sending to APIs in HTTP headers
* Fixed OpenRouter defaulting to Free Models Router for first-time no-cost setup
* Other fixes and improvements

= 1.0.0 =

* Release date: March 8, 2026

* Initial release
