Inventio UM AI Chat
A AI agent in a WordPress plugin with OpenRoute API use of free models and a puter.js implamentation
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/xristoskak/wordpress-ai-agent/archive/refs/heads/main.zipInventio UM AI Chat — WordPress plugin
A WordPress plugin for per-user chat history, integration with OpenRouter or the Cursor Cloud Agents API, an optional tool-using agent (document export, presentations), RAG (knowledge base from uploaded documents), and downloadable PDF / Word / Excel exports of the last assistant reply.
Requirements: WordPress ≥ 6.0, PHP ≥ 8.1, PHP zip extension (for .docx / .xlsx processing).
Current version: see INVENTIO_UM_AI_CHAT_VERSION in inventio-um-ai-chat.php.
Quick install
- Copy the
inventio-um-ai-chatfolder intowp-content/plugins/. - At the plugin root, run:
composer install --no-dev --optimize-autoloader - Activate the plugin under Plugins in wp-admin.
- Open Settings → Inventio AI Chat and configure API keys and models (see Configuration).
- Add the main shortcode to a page or post:
[inventio_ai_chat]Optional attributes:
[inventio_ai_chat height="min(70vh, 640px)" class="my-chat-wrap"] - Optional — Puter.js multi-model UI: on a separate page, use the
[top-models]shortcode. It loads Puter.js from CDN and provides a model dropdown for text chat, text + web search, open-weight GPT-OSS models, text-to-image, image analysis (vision), OCR, text-to-video, and TTS — independent of the site’s OpenRouter/Cursor settings. Details: Configuration — top-models.
Install without Composer on the server: use scripts/build-release.ps1 (Windows) to build a zip that includes a pre-built vendor/ folder — see Installation.
Feature overview
| Area | Description |
|---|---|
| Provider | OpenRouter (chat, embeddings, vision) or Cursor Cloud Agents API |
| History | Conversations and messages per logged-in user (MySQL tables) |
| Task | general, documents, finance, programming — different models per setting when configured |
| Attachments | Images, PDF, Office in the message — text extraction and/or vision where supported |
| Agent | Server tools: export Office files to uploads, create presentations (PhpPresentation), etc. |
| RAG | Upload documents to the knowledge base, chunk + embed, inject retrieved context into the prompt |
| Export | Buttons to download the last reply as PDF, Word, or Excel (REST + Dompdf / PhpWord / PhpSpreadsheet) |
[top-models] |
Second shortcode: Puter.js front-end; catalogued models for chat, web search, GPT-OSS, image, vision, OCR, video, TTS (user authentication/billing via Puter) |
Documentation
| Document | Contents |
|---|---|
| docs/README.md | Documentation index |
| docs/installation.md | Installation, Composer, zip release, server requirements |
| docs/configuration.md | All wp-admin settings, models, RAG, agent, both shortcodes |
| docs/rest-api.md | REST namespace, endpoints, request shapes |
| docs/rag-and-attachments.md | RAG pipeline, chat attachments, text extraction |
| docs/troubleshooting.md | Common errors (HTTP 500, Excel/Word, JSON, timeouts, Composer) |
| docs/development.md | Code layout, hooks, Composer constraints, build script |
REST API base URL
/wp-json/inventio-um-ai/v1/
All endpoints require a logged-in user and the X-WP-Nonce header with a REST nonce (wp_create_nonce('wp_rest')). The main chat script passes this automatically. See docs/rest-api.md.
License
GPL-2.0-or-later (same as WordPress).
Links
- Repository: Openroute-wp-agent (GitHub)
- OpenRouter: openrouter.ai
- Puter.js: js.puter.com / docs.puter.com
Maintenance: Inventio — for user support, start with Troubleshooting.