WP Manifestindependent plugin directory
manifest / ai / ai_gateway

AI Gateway WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+

AI Plugin in Wordpress Local First Sidebar in Gutenberg powered by AI ollama first, multi agent orchestration to create a blog

★ 1stars
399release downloads
≈10active sites
v2.2.8.4.1latest · 10mo ago

Install

Download v2.2.8.4.1_src.zip From the v2.2.8.4.1 release on GitHub, Dec 26, 2025

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/leion-wp/ai_gateway/releases/download/v2.2.8.4.1/v2.2.8.4.1_src.zip
Updates itself. It ships its own updater, so new versions appear under Dashboard → Updates.

AI Gateway is a local-first WordPress plugin that connects Gutenberg to Ollama (and optional MCP backends). It lets you run AI agents inside the editor, apply native tools, and keep full control on your own infrastructure.

Why it is useful

  • Run AI agents directly in Gutenberg (no external SaaS required)
  • Control which tools each agent can use
  • Edit content, layout, and structure from a single sidebar
  • Extend with MCP tools or your own endpoints

Quick demo (30 seconds)

  1. Open a post in Gutenberg and open the AI Gateway sidebar
  2. Select an agent and click Generate
  3. Insert the result or use native tools (Smart Edit, Outline, Template)

Screenshots

  • docs/screenshots/sidebar.png
  • docs/screenshots/tools.png
  • docs/screenshots/agents.png

Security and privacy

  • Local-first by design (Ollama runs on your own host)
  • No content is sent to third-party APIs by default
  • Admin-only actions for plugin activation and tools

Core features

  • Custom AI agents (model, system prompt, inputs, MCP endpoint)
  • Gutenberg sidebar with AI assistant and native tools
  • Tool permissions per agent (checkboxes)
  • REST API for agents, runs, media import, and plugin actions
  • Admin pages for agents, settings, and plugins

Quick start

  1. Upload the plugin folder to wp-content/plugins/ai-gateway
  2. Activate it in WordPress Admin
  3. Open a post in Gutenberg and use the AI Gateway sidebar

If you change src/index.js:

npm install
npm run build

Tools available in Gutenberg

  • Smart Edit (target block text + colors)
  • Outline to Sections
  • Page Template
  • FAQ Builder
  • CTA Builder
  • Quick Palette
  • Media Smart Insert
  • Hero Section

Agents

Create agents from the admin panel with:

  • Model name (Ollama)
  • System prompt
  • Input schema (JSON -> form fields)
  • Output mode (text or blocks)
  • Allowed tools (checkboxes)

Plugin control (admin)

AI Gateway provides a Plugins IA page and REST endpoints to:

  • list installed plugins
  • activate/deactivate plugins (admin only)

REST API

Base: /wp-json/ai/v1

  • GET /ping
  • POST /run
  • POST /publish
  • GET /agents
  • POST /agents
  • GET /agents/{id}
  • PUT /agents/{id}
  • DELETE /agents/{id}
  • POST /media/import
  • GET /plugins
  • POST /plugins/activate
  • POST /plugins/deactivate

Roadmap

  • v2.1: tools per agent, plugins admin, sidebar native tools
  • v2.2: workflows, presets, logs, export/import
  • v3: marketplace + connectors

License

GPL-2.0-or-later

Releases

21 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v2.2.8.4.1 latest
Dec 26, 2025 10mo ago
v2.2.8.4.1_no_src.zip +1 asset
294
v2.2.8.4.1_no_src.zip286
v2.2.8.4.1_src.zip8
Dec 26, 2025 10mo ago
v2.2.8.4_no_src.zip +1 asset
7
v2.2.8.4_no_src.zip4
v2.2.8.4_src.zip3
Dec 24, 2025 10mo ago
v2.2.8.3_no_src.zip +1 asset
11
v2.2.8.3_no_src.zip8
v2.2.8.3_src.zip3
Dec 24, 2025 10mo ago
v2.2.8.2_no_src.zip +1 asset
7
v2.2.8.2_no_src.zip4
v2.2.8.2_src.zip3
Dec 24, 2025 10mo ago
v2.2.8.1_no_src.zip +1 asset
4
v2.2.8.1_no_src.zip3
v2.2.8.1_src.zip1
Dec 23, 2025 10mo ago
v2.2.8_src.zip +1 asset
4
v2.2.8_src.zip2
v2.2.8_no_src.zip2
Dec 23, 2025 10mo ago
v2.2.7_no_src.zip +1 asset
3
v2.2.7_no_src.zip2
v2.2.7_src.zip1
Dec 23, 2025 10mo ago
v2.2.6_no_src.zip +1 asset
4
v2.2.6_no_src.zip3
v2.2.6_src.zip1
Dec 23, 2025 10mo ago
v2.2.5_no_src.zip +1 asset
7
v2.2.5_no_src.zip4
v2.2.5_src.zip3
Dec 23, 2025 10mo ago
v2.2.4_no_src.zip +1 asset
3
v2.2.4_no_src.zip2
v2.2.4_src.zip1
Dec 23, 2025 10mo ago
v2.2.3_no_src.zip +1 asset
7
v2.2.3_no_src.zip4
v2.2.3_src.zip3
Dec 23, 2025 10mo ago
v2.2.2_no_src.zip +1 asset
7
v2.2.2_no_src.zip4
v2.2.2_src.zip3
Dec 23, 2025 10mo ago
v2.2.1_src.zip +1 asset
6
v2.2.1_src.zip3
v2.2.1_no_src.zip3
Dec 23, 2025 10mo ago
v2.2_no_src.zip +1 asset
3
v2.2_no_src.zip2
v2.2_src.zip1
Dec 23, 2025 10mo ago
v2.1.7_no_src.zip +1 asset
3
v2.1.7_no_src.zip2
v2.1.7_src.zip1
Dec 22, 2025 10mo ago
v2.1.5_no_src.zip +1 asset
3
v2.1.5_no_src.zip2
v2.1.5_src.zip1
Dec 22, 2025 10mo ago
v2.1.2.3_no_src.zip +1 asset
4
v2.1.2.3_no_src.zip3
v2.1.2.3_src.zip1
Dec 22, 2025 10mo ago
v2.1.2.2_no_src.zip +1 asset
3
v2.1.2.2_no_src.zip2
v2.1.2.2_src.zip1
Dec 22, 2025 10mo ago
v2.1.2_no_src.zip +1 asset
10
v2.1.2_no_src.zip7
v2.1.2_src.zip3
Dec 22, 2025 10mo ago
v2.1.1_no_src.zip +1 asset
7
v2.1.1_no_src.zip4
v2.1.1_src.zip3
Dec 22, 2025 10mo ago
v2.1.0_src.zip +1 asset
2
v2.1.0_src.zip1
v2.1.0_no_src.zip1

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

D+ grade

Security

AI Gateway 2.2 · audited by WP Registry

High-severity findings.

1 high 1 medium
Audited release
2.2
Findings
2
Worst severity
high
Content hash
79b889cddbef7a655d984e51…

Findings

  • high Contributor+ conversation-draft REST overwrites any post stored in draft_post_id

    missing_capability

    POST /ai/v1/conversations/(id)/draft is registered with permission_callback current_user_can('edit_posts') only. Every other conversation/project route requires edit_pages, so a default Contributor is denied list/get/create on ai_conversation but is still admitted here. The handler accepts any numeric id, checks only that the row is post_type ai_conversation, then reads post meta draft_post_id and calls wp_update_post() on that ID with attacker-controlled title/content and post_status=draft — no current_user_can('edit_post'|'edit_others_posts'), no ownership check, no post-type check on the target. Studio (src/studio.js) auto-POSTs this route ~1.2s after any chat change, so in-use conversations almost always have draft_post_id set to the auto-saved 'Chat: …' post. A Contributor who can load Gutenberg already has a wp_rest nonce (AIGatewaySettings plus core wp-api-fetch). They brute sequential conversation IDs (private CPT, not listable to them, but IDs are ordinary wp_posts IDs). Observable: the target wp_posts row's post_content is replaced with the JSON messages dump and post_status is forced to draft, which unpublishes the post if an editor had published that Studio auto-save. If draft_post_id is empty they still wp_insert_post a draft and write draft_post_id onto the victim conversation. Default Authors cannot otherwise edit another author's posts; Contributors cannot edit others' drafts. This is object-level BAC on wp_update_post, not a missing REST nonce (cookie auth still needs wp_rest, which Gutenberg provides).

    rest/handlers-studio.php:172-226

    Recommendation

    Align this route with the other conversation endpoints (current_user_can('edit_pages') or the configured studio capability). Before wp_update_post, require current_user_can('edit_post', $draft_id), verify the target is the expected post type/status, and never force a published post back to draft from this autosave. Do not write draft_post_id on conversations the caller cannot edit.

  • medium Contributor+ media import sideloads remote files without upload_files

    missing_capability

    POST /ai/v1/media/import is registered with permission_callback current_user_can('edit_posts') and the handler never re-checks upload_files. A default Contributor can create drafts in Gutenberg (so they receive the plugin's wp_rest nonce via enqueue_block_editor_assets) but cannot use core Media Upload. This route takes an attacker-supplied url, esc_url_raw + download_url (wp_safe_remote_get, so classic private-IP SSRF is largely mitigated by core), then media_handle_sideload() using basename($url) as the filename. Allowed MIME types still apply, so this is not unfiltered PHP upload/RCE; it is a capability bypass that writes a new attachment post and a file under wp-content/uploads and returns {attachment_id, url}. Authors already have upload_files, so the privilege jump is Contributor (and any custom role with edit_posts but not upload_files). Additional impact: unbounded remote fetch (download_url default timeout 300s, no size cap) as a low-grade worker DoS. Studio's Upload panel calls this same route; Studio itself is edit_pages, but the REST gate is the weaker edit_posts check.

    rest/handlers-media.php:7-38

    Recommendation

    Require current_user_can('upload_files') in permission_callback and inside the handler. Restrict sideload to an image/document allowlist, cap download size, and reject non-http(s) URLs even if esc_url_raw accepted them.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.