Preview in WordPress Playground
make bootstrap
npm run buildmake test
make lint
make lint-changed
npm run plugin:check
npm run ci:agent:ci
npm run ci:agentClawPress is set up to run its GitHub Actions workflows locally with Agent CI.
One-time agent skill setup:
npx skills add redwoodjs/agent-ci --skill agent-ciLocal workflow commands:
npm run ci:agent:ci
npm run ci:agent
npm run ci:agent:retry -- --name <runner-name>Notes:
- Agent CI needs Docker available locally.
- The current
agent-ciCLI release expects Node.js 22+ for these local runner commands. - Local secrets belong in
.env.agent-ciand should never be committed. .github/agent-ci.Dockerfileadds the extra tools this repo needs for local workflow runs, including Docker CLI access forwp-env.
Current MVP features implemented in this plugin:
- Floating chat panel available across all admin screens to chat with your AI assistant.
- Admin bar toggle (
🦞) to open / close the chat panel. - Offline mode which still allows slash commands to be used.
- Setup Wizard built into chat to guide users through plugin setup process.
- Admin settings page to set which provider, model, and other settings to use.
- Admin abilities settings page to enable which abilities can be used by the agent.
- Registers WP Abilities to and loads them as tools into the AI client.
- Creates an action log database table to track actions taken by the AI assistant.
- Context & system prompt built up using chat history, tools (abilities), agent files & memory.
- Card UI system to display information in a card format.
- Included cards : Welcome card, Setup Wizard card, User Permissions card.
- Shows context usage with toolip.
Current Agent Features:
- Access to agent files (AGENTS.md, SOUL.md, BOOTSTRAP.md) (stored in
clawpress-agent-filecustom post type). - Persistent agent memory (stored as
clawpress-agent-memcustom post type). (Short term memory, long term memory) - Access to a secure workspace file-system located at
/wp-content/uploads/<agent-user-id>/<random-hash> - Has an assigned WordPress user. (this user will be used to perform heartbeat tasks)
- Agent abilities:
file_list(read from agent-files first then workspace)file_readfile_writefile_deleteweb_fetch(read-only remote fetch via the WordPress HTTP API, validated withwp_http_validate_url(), logged to the action log table)memory_long_term_addmemory_long_term_updatememory_long_term_deletememory_short_term_addmemory_short_term_updatememory_short_term_delete
/help- shows availalble commands./clear- Clears chat history./status- Shows plugin status./tools- Shows registered abilities (tools)./site info- Shows site information./memory list|clear- Shows agent memory./setup- Runs the setup wizard./test- Runs a test to ensure the AI client is working./reset- Resets the chat history and shows Welcome card.
- Uses modern WordPress patterns for admin pages and REST API.
- Uses WordPress core AI client APIs on WordPress 7.0+. (docs)
- Uses
@woocommerce/action-schedulerfor background processing. (docs) - Uses Composer autoloading for native ClawPress PHP classes.
- Uses
@wordpress/dataviewsfor adminDataViewstables andDataFormsettings forms. - Uses
wp-scriptsfor build tooling. (docs) - Uses
phpunitfor unit testing. - Uses
wp-coding-standardsandphpcodesnifferfor code quality. - Built from Brian Coords woodev-extension-starter
Custom endpoints with permission callbacks and parameter validation.
- Namespace:
clawpress/v1 - Endpoints:
/settings(GET/POST)/status(GET)/panel/state(GET/POST)/chat/message(POST)/chat/history(GET)
- Location:
includes/class-rest-api.php
- WordPress core AI client APIs (WordPress 7.0+)
woocommerce/action-scheduler- background task scheduling@wordpress/dataviews-DataViewstables andDataFormform components@wordpress/icons- Icon library
@wordpress/scripts- Build tooling@wordpress/env- Local disposable WordPress environment for plugin checks
wp-coding-standards/wpcs- WordPress Coding Standards for PHP_CodeSnifferphpunit/phpunit- PHPUnit test runner
| Pattern | Purpose |
|---|---|
| Namespaced PHP classes | Isolated features, no conflicts |
| Config-driven UI | Modify fields/actions without touching components |
| Custom hooks | Encapsulated data logic |
| REST API with validation | Clear frontend/backend contract |
| Asset file pattern | Auto-managed dependencies |
| wp-scripts build tooling | Zero-config builds |
| WordPress admin menu page | Proper admin page integration |
- PHP 8.1+
- WordPress 7.0+
- Composer 2+
- Node.js 20+
- npm 10+
ClawPress now targets WordPress 7.0+ intentionally.
This was a deliberate compatibility decision:
- WordPress 7.0 provides the AI client APIs in core.
- Bundling a separate runtime copy of
wordpress/wp-ai-clientcaused conflicts with the core-provided classes. - ClawPress now relies on the core AI client at runtime instead of shipping its own runtime copy.
- On sites running below WordPress 7.0, ClawPress does not bootstrap and shows an admin notice explaining the minimum required version.
- Add more agent abilities for reading general WordPress content (posts, pages, etc.)
- Add abilities to read memory files (long and short term).
- Add abilities for bulk file_reads and bulk memory_reads.
- Add ability to send emails to administrator using built-in WP mail functions.
- Chat threads - have multiple conversation threads at once, per user.
- Implement a working heartbeat task. Start small and test how it works. Create a built in nightly healthcheck that checks site health and emails admin. Add wizard for setting up useful nightly site health email report.
- Agent skills! Create abilities to read, create, update, execute a skill. Consider limitations and security.
- Add current site context, when doing direct chat messages. Consider an ability to pull this info, including all active plugins.
- Improve context usage info / limit / tooltip. (right now its not useful and not accurate. Also need to decide on a suitable max context size - maybe 200K)
- Define actual scope of agent user. (should the user only be used for heartbeat tasks?)
- Fix boostrap agent file setup and writing (doesnt always run)
- /reset command should clear everything (like uninstall + activation). All history will be wiped and Welcome card should show. Even after page refreshes.
- Consider how browser search and use will work within WordPress.
- Mulit agent support. (can configure multiple agents)
- Multi-user support. (each user has their own agents)
- Channels for agent interaction.
- Streaming responses.
- Add ability to read DB, or generate a query to read from the DB. Might need an ability to get DB schema, which can then be used to generate a query. Need to consider destructive queries, or make all queries require confirmation just to be safe.
- Storage model: (custom table + CPT + filesystem workspace).
- Memory management:
clawpress_agent_memCPT (long term and short term). - Skills management:
clawpress_agent_skillCPT. - Workspace location: uploads subdirectory with non-guessable randomized folder names.
- Retention baseline: configurable TTL with Action Scheduler purge jobs.
- Agent action model: execute actions as selected WP agent user (recommended low-privilege dedicated account).
- System prompt built up from small system prompt + chat history + tools + agent files + memory.
- File model: built-in file tools resolve
clawpress_agent_fileCPT first, with workspace filesystem fallback. - Tool model: all ClawPress tools are abilities (Abilities API).
- Background scheduling model: Action Scheduler (not WP-Cron).
- Cards are used to display complex UI in chat panel.
- Commands can be used offline.
- Cards can have actions, which run commands, or send messages.
- Runtime AI integration depends on WordPress 7.0+ core AI APIs instead of bundling
wordpress/wp-ai-client. - On unsupported WordPress versions, ClawPress shows an admin notice and does not bootstrap.
