plugin-icon

miniOrange AI Agent

作者:miniOrange·
WordPress 6.9 Abilities API integration: register abilities, REST /chat endpoint, AI Agent chat UI, execution logging, and AI-powered tools.
版本
1.0.0
最后更新
Apr 2, 2026
  • Registers abilities: Create Post, Generate Meta Description, Get Site Info, Get Site URL, Generate Post Summary.
  • Connects them to the AI Client so the model can call tools (Phase 1).
  • Exposes a REST endpoint POST /wp-json/moaiagent/v1/chat for an AI Agent loop (Phase 2).
  • Provides a minimal Agent UI (chat box) in the admin (Phase 3).
  • Adds an AI-powered ability: Generate Post Summary, which uses the AI Client internally (Phase 4).
  • Injects context (site name, user role, optional current post) into the prompt (Phase 5).
  • Security: input validation, capability checks in execute callbacks, rate limiting, logging (Phases 6–7).
  • Uses generate_result() so the SDK can handle tool execution loops for chained abilities (Phase 8).

Registered abilities

  • Create Post (moaiagent/create-post) – Creates a new post. Permission: edit_posts.
  • Get Site URL (moaiagent/get-site-url) – Returns the site URL. Permission: read.
  • Generate Post Summary (moaiagent/generate-post-summary) – AI-generated summary of content. Requires AI Client. Permission: edit_posts.

miniOrange AI Agent (requires AI Client plugin)

  • Menu: Admin AI Agent. Chat with the assistant; it can create posts, generate meta descriptions, summarize content, and get site info.
  • REST: POST /wp-json/moaiagent/v1/chat with body { "message": "Create a draft post titled Welcome" }. Permission: prompt_ai. Rate limited (e.g. 30 requests per minute per user).
  • Execution Log: Admin AI Agent Execution Log. Lists recent ability executions and chat requests (admins only).

Client-side usage

  • window.moaiaAgentAbilities.getAbilities() – list AI Agent abilities
  • window.moaiaAgentAbilities.execute('moaiagent/create-post', { title: 'Hello', status: 'draft' }) – returns a Promise

Abilities are also available via Command Palette, AI Client (using_abilities), and REST.

Requirements

  • WordPress 6.9+ (Abilities API).
  • For the AI Agent (chat, Generate Post Summary): the AI Client plugin must be installed and configured; user needs prompt_ai capability.

External services

This plugin integrates with the AI Client for WordPress plugin, which connects to external AI model APIs (such as Anthropic Claude or Google Gemini) to process chat messages and generate text content.

What data is sent: User chat messages, system context (site name, URL, user role, optional post title/ID), and conversation history are sent to the configured AI provider when the /chat REST endpoint is called.

When it is sent: Only when a logged-in user with the prompt_ai capability submits a message via the AI Agent chat interface or REST API.

Third-party services used (via AI Client plugin): * Anthropic Claude — https://www.anthropic.com/ * Terms of Service: https://www.anthropic.com/legal/consumer-terms * Privacy Policy: https://www.anthropic.com/legal/privacy * Google Gemini — https://ai.google.dev/ * Terms of Service: https://ai.google.dev/gemini-api/terms * Privacy Policy: https://policies.google.com/privacy

No data is sent without an active user session and explicit user action. No data is stored by this plugin beyond the execution log (stored locally in wp_options).

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 6.9.4
这个插件是可用的下载,适用于您的站点。