Your AI Agents on the web. An OpenClaw alternative — manage and embed conversational AI agents directly in WordPress.
This plugin is built in the spirit of the .agents Protocol — an open directory convention for AI agent configuration.
Key ideas:
- One directory (
.agents/) — houses everything an agent needs: MCP tools,AGENTS.mdinstructions, Skills, Sub-Agents, Tasks, and Memories. Plain JSON and Markdown, no proprietary schemas. - Vendor-neutral — works with any AI tool, editor, or agent framework. No lock-in.
- Git-friendly — the entire agent configuration can be committed, diffed, branched, and shared.
- Layered — global defaults at
~/.agents/, workspace overrides at./.agents/(workspace wins on conflict). - Seven standards, one place — MCP, AGENTS.md, Skills, ACP, Sub-Agents, Tasks, and Memories converge in a single predictable directory.
Dot Agents Press brings this vision to WordPress — giving you a first-class WP-Admin UI for creating and managing conversational AI agents that can be embedded anywhere via shortcodes or the REST API.
- Manage multiple agents from a dedicated WP-Admin menu
- OpenAI & Anthropic support out of the box (plus any OpenAI-compatible endpoint)
- Shortcode embed — drop a chat widget anywhere with
[dot_agent id="1"]or[dot_agent slug="my-agent"] - Per-agent configuration — system prompt, welcome message, model, temperature, provider-override API key
- REST API —
POST /wp-json/dot-agents-press/v1/chatfor headless or JavaScript-driven use - Agent-level API key override — store encrypted per-agent keys or use a single global key from Settings
- Accessible, responsive chat UI — keyboard-navigable,
aria-liveregion, auto-resizing input
| Requirement | Version |
|---|---|
| WordPress | ≥ 6.0 |
| PHP | ≥ 8.0 |
| PHP extension | openssl (for API key encryption) |
- Clone or download this repository into
wp-content/plugins/dot-agents-press/. - Activate the plugin from Plugins → Installed Plugins.
- Navigate to AI Agents → Settings and enter your OpenAI and/or Anthropic API key.
- Go to AI Agents → Add New to create your first agent.
- Copy the generated shortcode and paste it into any page or post.
[dot_agent id="3"]
[dot_agent slug="my-support-bot"]
Endpoint: POST /wp-json/dot-agents-press/v1/chat
Request body:
{
"agent_id": 3,
"messages": [
{ "role": "user", "content": "Hello, what can you help me with?" }
]
}Response:
{
"role": "assistant",
"content": "Hi! I can help you with …",
"model": "gpt-4o",
"usage": { "prompt_tokens": 42, "completion_tokens": 67, "total_tokens": 109 }
}Navigate to AI Agents → Settings and enter your keys. They are stored in the WordPress options table.
For better security, define keys as PHP constants — they take precedence over the Settings values:
define( 'DAP_OPENAI_API_KEY', 'sk-…' );
define( 'DAP_ANTHROPIC_API_KEY', 'sk-ant-…' );Note: constant support is wired into
DAP_Agent::resolve_api_key().
When editing an agent, leave API Key Override blank to use the global key, or enter a key to use only for that agent. Keys are encrypted with AES-256-CBC using WordPress's AUTH_KEY as the cipher key.
The chat widget uses CSS custom properties for easy theming. Add overrides to your theme:
.dap-chat-widget {
--dap-user-bg: #7c3aed; /* user bubble colour */
--dap-header-bg: #5b21b6; /* header background */
--dap-radius: 8px;
}| Provider | provider value |
Models (presets) |
|---|---|---|
| OpenAI | openai |
gpt-4o, gpt-4o-mini, gpt-4-turbo, … |
| Anthropic | anthropic |
claude-opus-4-5, claude-sonnet-4-5, … |
| Custom | custom |
Any OpenAI-compatible endpoint (model free text) |
You can talk to your agent directly in Telegram — the plugin handles webhook delivery and routes messages to the configured agent.
- Open Telegram and message @BotFather.
- Send
/newbotand follow the prompts — choose a name and a username ending inbot. - Copy the token BotFather gives you (looks like
123456:ABC-DEF1234ghIkl).
- Message @userinfobot on Telegram.
- It will reply with your numeric
Id— copy it.
This ensures only you can talk to the bot (private assistant mode).
- Go to Settings → Dot Agents Config in WordPress admin.
- Fill in:
- Telegram Bot Token — the token from @BotFather
- Telegram User ID — your numeric Telegram ID
- Webhook Secret — (optional) a random string for webhook verification
- Default Agent ID — the ID of the agent that will respond (or leave empty to use the first enabled agent)
- Save changes.
Use WP-CLI to connect Telegram to your WordPress site:
wp dap telegram set-webhookVerify it worked:
wp dap telegram statusExpected output:
URL: https://yoursite.com/wp-json/dot-agents-press/v1/telegram/webhook
Has custom cert: no
Pending updates: 0
Open your bot in Telegram and send a message. The agent will reply.
Tip: If the bot doesn't respond, check wp dap telegram status for errors. Common issues: self-signed SSL certificate (Telegram requires valid HTTPS), or the webhook URL not being publicly reachable. Use ngrok for local testing.
wp dap telegram set-webhook # Install / update the webhook
wp dap telegram delete-webhook # Remove the webhook
wp dap telegram status # Show current webhook infoTelegram → webhook → POST /wp-json/dot-agents-press/v1/telegram/webhook
│
TelegramBridge
│
1. Verify secret (optional)
2. Authorize user (telegram_authorized_user_id)
3. Resolve agent → DAP_API::handle_chat()
4. AgentsProtocol::build_system_prompt()
→ .agents/system-prompt.md
→ .agents/agents.md
→ DB system_prompt
5. AI API call → reply
│
sendMessage(chat_id, reply)
│
Telegram ←────────────────┘
The plugin automatically reads agent instructions from your project root (one level above wp-config.php):
project/ ← your repo root
├── .agents/
│ ├── system-prompt.md ← primary system prompt (priority 1)
│ └── agents.md ← project guidelines (priority 2)
└── public/ ← WordPress root (ABSPATH)
└── wp-config.php
The final system prompt is assembled as: system-prompt.md + agents.md + agent's DB prompt. All files are optional — if none exist, only the DB prompt is used.
Legacy fallback: if .agents/agents.md doesn't exist, the plugin also checks for AGENTS.md in the project root (same level as .agents/).
GPL v2 or later. See LICENSE.