Agent Builder includes full WP-CLI support for managing agents, configuring providers, running interactive chats, inspecting capabilities, and automating workflows from the command line.
Account & Credits
wp agent status
Show your plan, credit balance, today’s quota usage across all services (chat, RAG, image gen, TTS), and RAG vector store stats.
wp agent status
wp agent status --format=json
wp agent credits
Show your shared credit wallet balance with a per-service spend breakdown (RAG, chat, TTS, image gen, video gen) and recent transactions.
wp agent credits
wp agent credits --limit=25
wp agent credits --format=json
| Option | Description |
|---|---|
--limit=<n> | Number of recent transactions to show (default: 10) |
--format=<format> | Output format: table or json |
Agent Management
wp agent list
List all installed agents with status, provider, model, and version.
wp agent list
wp agent list --status=active
wp agent list --format=json
| Option | Description |
|---|---|
--status=<status> | Filter by status: active or all (default: all) |
--format=<format> | Output format: table, json, csv, yaml |
wp agent info <slug>
Show detailed information about an agent: metadata, provider, model, mode, permissions, tools, deployment surfaces, scheduled tasks, and event listeners.
wp agent info wordpress-assistant
wp agent info content-writer --format=json
wp agent capabilities <slug>
Show the full capability stack for an agent: tools (with risk level and enabled state), skills, channels, WordPress abilities, and MCP status.
wp agent capabilities wordpress-assistant
wp agent capabilities content-writer --section=skills
wp agent capabilities seo-assistant --section=tools --format=json
| Option | Description |
|---|---|
--section=<section> | Show one section: tools, skills, channels, abilities, mcp, or all (default) |
--format=<format> | Output format: table or json |
wp agent deployments [<slug>]
Show where agents are deployed: shortcodes, admin bar, Gutenberg sidebar, WhatsApp, cron tasks, and event hooks. Omit the slug to see all active agents.
wp agent deployments
wp agent deployments content-writer
wp agent deployments --format=json
wp agent tools <slug>
List all tools available to an agent with their description, source, and enabled state.
wp agent tools content-writer
wp agent tools seo-assistant --type=agent
wp agent tools wordpress-assistant --format=json
Chat and Prompts
wp agent chat <slug>
Start an interactive chat session with an agent. Conversation history is maintained across turns. Type exit or quit to end the session.
wp agent chat wordpress-assistant
wp agent chat content-writer --verbose
wp agent chat seo-assistant --user=1
| Option | Description |
|---|---|
--user=<id> | Run as a specific WordPress user ID (default: 1) |
--verbose | Show tool calls and token usage after each response |
wp agent prompt <slug> “message”
Send a single-turn prompt to an agent and get a response. The agent has access to all its tools and can execute them during the response.
wp agent prompt wordpress-assistant "How do I create a custom post type?"
wp agent prompt content-writer "Draft a post about WordPress security" --format=json
wp agent prompt seo-assistant "Audit the homepage" --user=1 --raw
| Option | Description |
|---|---|
--format=<format> | Output format: text or json |
--raw | Output raw response without formatting |
--user=<id> | Run as a specific WordPress user ID (default: 1) |
wp agent run-task <slug> <task>
Run a scheduled task for an agent. If the task has a prompt, it runs through the LLM autonomously; otherwise it falls back to a direct callback.
wp agent run-task seo-assistant audit-pages
wp agent run-task security-assistant scan-vulnerabilities
Configuration
wp agent config get
View the global or per-agent configuration for provider, model, mode, and vision model. Shows the effective value and whether it comes from a global default or per-agent override.
wp agent config get
wp agent config get --agent=content-writer
wp agent config get --format=json
wp agent config set <key> <value>
Set a global or per-agent configuration value. Valid keys: provider, model, mode, vision_model.
wp agent config set provider agentic
wp agent config set model gemini-2.5-flash
wp agent config set provider anthropic --agent=content-writer
wp agent config set mode autonomous --agent=seo-assistant
wp agent config reset –agent=<slug>
Clear all per-agent overrides for a specific agent, reverting it to the global defaults.
wp agent config reset --agent=content-writer
wp agent providers
List configured LLM providers with their status, active model, and which agents are using each provider.
wp agent providers
wp agent providers --all
wp agent providers --format=json
| Option | Description |
|---|---|
--all | Include providers without API keys configured |
--format=<format> | Output format: table or json |
wp agent models
List available models for a provider by querying the provider’s API. Shows which model is currently active.
wp agent models
wp agent models --provider=openai
wp agent models --provider=ollama --format=json
wp agent license
Show the current license status, type (free, personal, agency), validity, and expiration.
wp agent license
wp agent license --format=json
MCP Integration
wp agent mcp-connect <slug>
Generate a ready-to-paste MCP configuration JSON for Claude Desktop, VS Code, Cursor, or any MCP-compatible client.
wp agent mcp-connect wordpress-assistant
wp agent mcp-connect content-writer --transport=http
| Option | Description |
|---|---|
--transport=stdio | STDIO transport for local development (default) |
--transport=http | HTTP transport for remote servers via @automattic/mcp-wordpress-remote |
Testing and Debugging
wp agent role-test <slug>
Test whether an agent understands its own role and capabilities. Sends 5 contextual questions about the agent’s identity, tools, expertise, limitations, and domain knowledge, then scores each response. A bonus round runs if all 5 core questions pass.
wp agent role-test wordpress-assistant
wp agent role-test content-writer --format=json
wp agent test-tools [<agent>]
Run functional tests on agent tools and core utilities. Invokes tools directly and asserts the response structure is correct.
wp agent test-tools
wp agent test-tools ai-radar --verbose
wp agent test-tools --format=json
wp agent resign-all
Regenerate HMAC-SHA256 integrity signatures for all agent abilities.json manifests. Run this after cloning a site or changing SECURE_AUTH_KEY.
wp agent resign-all
wp agent resign-all --format=json
wp agent update
Check for available agent updates and install them. Requires update checks to be enabled (Agent Builder → Agents). Busts the cache on every run so results are always fresh.
wp agent update # list available updates
wp agent update wordpress-assistant # install one agent
wp agent update --all # install all available updates
wp agent update --format=json # list as JSON
Vector Store & RAG
These commands manage the AI Data Training feature — training agents on your own content via the Vector Store and RAG (Retrieval-Augmented Generation) system. Requires a premium license with API credits.
wp agent rag sources
wp agent rag sources
Lists all trained data sources with their type, chunk count, and training date.
wp agent rag train <post_id>
wp agent rag train 42
wp agent rag train scan
Trains the vector store on a specific published post or page. The content is stripped of HTML, chunked, and embedded. Use wp agent rag train scan to list all published content available for training.
wp agent rag upload <file>
wp agent rag upload /path/to/document.pdf
wp agent rag upload /path/to/data.txt
Uploads a PDF or text file to the vector store. The file is sent to the RAG service, parsed, chunked, and embedded. Supported formats: PDF, TXT, MD.
wp agent rag delete <source>
wp agent rag delete wp-post-42
Removes a trained source and its vectors from the store. Use wp agent rag sources to see source names.
wp agent rag search “<query>”
wp agent rag search "How do I reset my password?"
wp agent rag search "refund policy" --limit=3
Searches the vector store for content matching the query. Returns the most relevant chunks with their source and similarity score.
Examples
Check your plan, credit balance, and today’s quota usage:
wp agent status
Run a quick SEO check from the command line:
wp agent prompt seo-assistant "Check the SEO for my latest 5 posts"
Start an interactive chat session:
wp agent chat wordpress-assistant
Switch all agents to a different provider:
wp agent config set provider anthropic
wp agent config set model claude-sonnet-4-6
Check where your agents are deployed:
wp agent deployments
Generate an MCP config for Claude Desktop:
wp agent mcp-connect wordpress-assistant --transport=stdio
Command Reference
| Command | Description |
|---|---|
wp agent status | Plan, credits, today’s quota usage, RAG stats |
wp agent credits | Credit balance, per-service spend, recent transactions |
wp agent list | List all agents with provider, model, and status |
wp agent info <slug> | Detailed agent metadata and deployment info |
wp agent capabilities <slug> | Tools, skills, channels, abilities, MCP |
wp agent deployments [<slug>] | Where agents are deployed |
wp agent tools <slug> | List tools with enabled/disabled state |
wp agent chat <slug> | Interactive multi-turn chat session |
wp agent prompt <slug> "msg" | Single-turn prompt with response |
wp agent run-task <slug> <task> | Run a scheduled task manually |
wp agent config get/set/reset | View or change provider, model, mode |
wp agent providers | List providers and agent assignments |
wp agent models | List available models from provider API |
wp agent license | Show license status and type |
wp agent mcp-connect <slug> | Generate MCP client configuration |
wp agent role-test <slug> | Test agent self-awareness |
wp agent test-tools | Functional tool tests |
wp agent resign-all | Re-sign abilities manifests |
wp agent update [<slug>] [--all] | Check and install agent updates |
wp agent rag sources | List trained data sources |
wp agent rag train <id> | Train vector store on a post or page |
wp agent rag upload <file> | Upload PDF/TXT file for training |
wp agent rag delete <source> | Remove a trained source |
wp agent rag search "query" | Search the vector store |