=== Creator Assistant Hub === Contributors: alessandrolioce Tags: ai, openai, embeddings, vector-search, semantic-search Requires at least: 6.6 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPL-2.0+ License URI: https://www.gnu.org/licenses/gpl-2.0.html The AI infrastructure for your WordPress content. Vectorize posts with OpenAI embeddings and store them in Qdrant for semantic search. == Description == Creator Assistant Hub is the core infrastructure plugin of the Creator Assistant ecosystem. It connects your WordPress site to OpenAI and Qdrant to automatically generate and store vector embeddings for your content, enabling semantic search and AI-powered features. **How it works** The Hub is the shared infrastructure layer for the Creator Assistant ecosystem. When a compatible add-on is active and activates a vectorizer, the plugin generates vector embeddings via the OpenAI API and stores them in your Qdrant vector database cluster whenever a post is published or updated. This makes your content available for semantic search and retrieval by Creator Assistant add-ons. Without an active add-on, the Hub runs in standby mode: no content is sent to external services. **Key features** * **Automatic post vectorization**: when an add-on activates a vectorizer, embeddings are generated and stored whenever a post is published or updated. Without an active add-on, no vectorization takes place. * **Chunk-based vectorization**: splits post content into word-level segments and stores each chunk as a separate Qdrant point, enabling fine-grained retrieval (activated by add-ons via filter). * **Summary-based vectorization**: generates a short AI summary of each post via OpenAI Chat Completions, then embeds and stores a single point per post for high-level semantic search (activated by add-ons via filter). * **Background batch vectorization**: an hourly cron job automatically picks up any existing posts that have not yet been vectorized, so your entire content library is indexed without manual intervention. * **OpenAI integration**: uses the `text-embedding-3-small` model (1536 dimensions) via the OpenAI Embeddings API for all vectorizers; the Summary vectorizer additionally calls the OpenAI Chat Completions API (`gpt-4.1-nano`) to generate post summaries. * **Qdrant integration**: stores and retrieves vector embeddings from your Qdrant Cloud cluster. Two collections are used: `post_chunk` for chunk-level points and `post_summary` for post-level summary points. * **Block editor panel**: shows the vectorization status of each post directly in the block editor sidebar (document settings panel). * **Post list column**: adds a "Vector Status" column to the posts and pages admin list, showing the vectorization status of each entry at a glance. * **Settings page**: configure OpenAI API key, Qdrant endpoint and API key, and cache expiration from a dedicated admin page. * **API response caching**: configurable cache duration to reduce API usage and latency. * **Site Health check**: reports the Hub service status in the WordPress Site Health screen. * **Qdrant keep-alive**: sends a daily lightweight ping to prevent free-tier Qdrant Cloud clusters from being suspended. * **WPML compatible**: detects the post language via WPML hooks (when WPML is active) and includes it in the Qdrant payload for multilingual filtering. * **Extensible**: exposes actions and filters so add-ons can register additional post types, override vectorizer behaviour, customise Qdrant payloads, and add settings tabs. **Requirements** * An [OpenAI](https://platform.openai.com/) account with a valid API key. * A [Qdrant Cloud](https://cloud.qdrant.io/) account with an active cluster (free tier is supported). * WordPress 6.6 or higher. * PHP 7.4 or higher. == Installation == 1. Upload the `creator-assistant-hub` folder to the `/wp-content/plugins/` directory, or install the plugin directly from the WordPress plugin screen. 2. Activate the plugin through the **Plugins** screen in WordPress. 3. Go to **Creator Assistant → Hub** in the WordPress admin menu. 4. Accept the Terms of Service and Privacy Policy. 5. Enter your **OpenAI API key** in the OpenAI section. 6. Enter your **Qdrant endpoint URL** and **Qdrant API key** in the Qdrant section. 7. Save the settings. Green status notices will confirm that both services are connected. 8. Install a compatible Creator Assistant add-on (such as Creator Assistant Search) to activate vectorization. Once an add-on is active, new and updated posts are vectorized automatically on save, and existing posts in your library are picked up by the built-in hourly background batch. More add-ons are coming soon. == External services == This plugin connects to two third-party services. By using this plugin you agree to their respective terms and privacy policies. * **OpenAI**: used to generate vector embeddings from your post content via the Embeddings API. When the Summary vectorizer is active (enabled by an add-on), post content is also sent to the Chat Completions API to generate a short AI summary before embedding. * Service: [https://platform.openai.com/](https://platform.openai.com/) * Privacy Policy: [https://openai.com/policies/privacy-policy](https://openai.com/policies/privacy-policy) * Terms of Use: [https://openai.com/policies/terms-of-use](https://openai.com/policies/terms-of-use) * **Qdrant Cloud**: used to store and query vector embeddings. * Service: [https://cloud.qdrant.io/](https://cloud.qdrant.io/) * Privacy Policy: [https://qdrant.tech/legal/privacy-policy/](https://qdrant.tech/legal/privacy-policy/) * Terms of Service: [https://qdrant.tech/legal/terms_and_conditions/](https://qdrant.tech/legal/terms_and_conditions/) Data is only transmitted to these services after you explicitly accept the Creator Assistant Terms of Service in the plugin settings and provide your own API credentials. No data is transmitted automatically upon activation. == Frequently Asked Questions == = Do I need a paid OpenAI plan? = Yes. The OpenAI API is a pay-as-you-go service: a valid payment method and prepaid credits are required. There is no free tier for API usage. The `text-embedding-3-small` model used by the Hub is very affordable: generating embeddings for a typical blog post costs a fraction of a cent. Check [OpenAI pricing](https://openai.com/pricing) for details. = Does the plugin work with the free tier of Qdrant Cloud? = Yes. The free tier of Qdrant Cloud provides a single cluster that may be suspended after a period of inactivity. The built-in keep-alive feature sends a daily ping to prevent this. = Which post types are vectorized? = By default, posts and pages are vectorized. Add-ons can register additional post types via the available hooks. = Where can I see the vectorization status of a post? = In two places: 1. **Block editor**: open any post or page in the editor. A **Creator Assistant** panel in the document settings sidebar (top-right area) shows the vectorization status for each active vectorizer. 2. **Post list**: a **Vector Status** column in the Posts and Pages admin list shows a green checkmark with the date of last vectorization, or a greyed-out label if the post has not yet been vectorized. = How do I check whether the service is properly configured? = Go to **Tools → Site Health**. A dedicated test named **Creator Assistant Hub service** reports whether the Terms of Service have been accepted and both OpenAI and Qdrant are connected and ready. Also verify that WP-Cron is running correctly on your site. Vectorization is processed asynchronously via WP-Cron: if WP-Cron is disabled (e.g. `DISABLE_WP_CRON` is set to `true` in `wp-config.php`), posts will not be vectorized automatically. You can check this under **Tools → Site Health → Info → WordPress constants**. On some managed hosting plans, a real server-side cron job is used instead; make sure it is configured and firing regularly. = Can I disable API response caching? = Yes. In the **Cache** tab of the Hub settings page, set the cache expiration to **Disabled**. = Is my API key stored securely? = API keys are stored in the WordPress options table in the same way as other plugin settings. Make sure your WordPress database and hosting environment are secure. Keys are never exposed in the front end or in REST API responses accessible to non-administrators. = Do I need an active add-on for vectorization to work? = Yes. The Hub is a core infrastructure plugin: its vectorizers are disabled by default and must be activated by a compatible add-on (such as Creator Assistant Search). Without an active add-on, the plugin registers no vectorizers and no content is sent to OpenAI or Qdrant, even after you configure your API credentials. = Does the plugin modify my posts, pages, or any existing content? = No. The Hub only reads your content to generate vector embeddings. It never writes back to the post body, title, status, slug, or any other standard post field. Your content stays exactly as you wrote it. The only things the Hub writes to your WordPress database are: 1. A **post meta entry** on each vectorized post that records when it was indexed (keys: `_creator_assistant_hub_post_vectorizer_post_chunk` and `_creator_assistant_hub_post_vectorizer_post_summary`). This metadata is invisible to visitors, does not appear in SEO tools, and has no effect on how WordPress renders the post. 2. The **plugin settings** you enter (API keys, cache TTL, Terms of Service acceptance), stored in the WordPress options table. Everything else (the actual vector embeddings) lives in your Qdrant Cloud cluster, not in your WordPress database. = Does the background cron job modify my content? = No. The hourly background cron reads post content to generate embeddings but never writes to the post itself. The only write operation it performs is updating the post meta timestamp once vectorization is complete. = What happens to my data if I deactivate or delete the plugin? = **Deactivating** the plugin stops all vectorization and background processing; your post meta timestamps and settings are preserved so they are ready if you reactivate. **Deleting** the plugin removes all plugin-created data from your WordPress database (post meta entries and options). Your Qdrant collections are not deleted automatically. You can remove them manually from your Qdrant Cloud dashboard if you no longer need them. Your posts, pages, and all their original content are completely unaffected either way. = What is the difference between Chunk and Summary vectorization? = The Hub provides two vectorization strategies, each stored in a separate Qdrant collection: * **Chunk**: the post content is split into word-level segments. Each segment is embedded individually and stored as a separate point in the `post_chunk` collection. This enables precise, paragraph-level retrieval. * **Summary**: an AI-generated summary of the post is produced via OpenAI Chat Completions, then embedded and stored as a single point in the `post_summary` collection. This enables high-level, concept-based semantic search. Add-ons can enable either or both strategies independently via the `creator_assistant_hub_post_vectorizer_post_chunk` and `creator_assistant_hub_post_vectorizer_post_summary` filters. = Does the plugin support multilingual sites? = Yes. When WPML is active, the plugin detects the language of each post and includes it in the Qdrant payload. Add-ons can then filter search results by language. Sites without WPML are fully supported and unaffected. = Can other plugins or add-ons extend the Hub? = Yes. The Hub exposes WordPress actions and filters that add-ons can use to register additional settings sections, tabs, and custom behaviour. Developer documentation will be published on [creator-assistant.it](https://www.creator-assistant.it). == Screenshots == 1. The Hub settings page: General tab with Terms of Service acceptance. 2. OpenAI configuration tab with connection status notice. 3. Qdrant configuration tab with connection status notice. 4. Cache configuration tab to control how long API responses are cached. 5. Tools tab with reset, force reindex, and Qdrant self-test actions. 6. Vectorization status panel in the block editor sidebar. 7. "Vector Status" column in the posts admin list. 8. Creator Assistant Hub service test in the Site Health screen. == Development == The source files for all compiled assets are included in the plugin: front-end assets under `assets/src/`, and the block-editor integration under `src/`. Build tools required: [Node.js](https://nodejs.org/) (includes npm). 1. Install dependencies: `npm install` 2. Build the front-end assets: `npm run build` * JS only: `npm run build:js` (uses [esbuild](https://esbuild.github.io/)) * CSS only: `npm run build:css` (uses PostCSS + Sass) 3. Build the block-editor integration: `npm run build:editor` (uses [@wordpress/scripts](https://www.npmjs.com/package/@wordpress/scripts)) Front-end JS source files are in `assets/src/js/` and compiled to `assets/dist/js/`. Front-end CSS/SCSS source files are in `assets/src/css/` and compiled to `assets/dist/css/`. Block-editor source files are in `src/` and compiled to `build/`. == Changelog == = 1.0.0 = * Initial release. * Automatic post and page vectorization using OpenAI `text-embedding-3-small`. * Qdrant Cloud integration for vector storage and retrieval. * Settings page with TOS acceptance, OpenAI, Qdrant, and cache configuration. * Block editor sidebar panel showing per-post vectorization status. * Post list column ("Vector Status") with per-vectorizer status indicators. * Hourly background batch cron to automatically vectorize existing content. * Site Health integration reporting service status. * Daily Qdrant keep-alive cron for free-tier clusters. * Extensibility hooks for add-ons, by category. Settings: `creator_assistant_hub_loaded`, `creator_assistant_hub_after_register_settings`, `creator_assistant_hub_settings_tabs`, `creator_assistant_hub_sanitize_settings`; OpenAI models: `creator_assistant_hub_openai_embedding_model`, `creator_assistant_hub_openai_chat_model`, `creator_assistant_hub_embedding_dimension`; vectorizer control: `creator_assistant_hub_post_vectorizer_post_chunk`, `creator_assistant_hub_post_vectorizer_post_summary`, `creator_assistant_hub_skip_vectorizer`, `creator_assistant_hub_post_vectorizer_text`, `creator_assistant_hub_post_vectorizer_chunks`; post types: `creator_assistant_hub_additional_post_types`, `creator_assistant_hub_excluded_post_types`; Qdrant payloads: `creator_assistant_hub_post_vectorizer_post_chunk_payload`, `creator_assistant_hub_post_vectorizer_post_summary_payload`, `creator_assistant_hub_post_vectorizer_post_chunk_search_filter`; collection lifecycle: `creator_assistant_hub_post_vectorizer_post_chunk_collection_created`, `creator_assistant_hub_post_vectorizer_post_summary_collection_created`. == Upgrade Notice == = 1.0.0 = Initial release. No upgrade steps required.