Files
actionbook__actionbook/docs/openclaw.mdx
sen 2bff3f9b75 [docs]fix: adjust skill-based guidance wording per review feedback
Soften the "no prompt injection" claim to avoid mismatch with current
plugin implementation that still uses before_prompt_build.
2026-03-19 13:53:56 +08:00

134 lines
3.3 KiB
Plaintext

---
title: 'OpenClaw Plugin'
description: 'Integrate Actionbook as a native OpenClaw plugin for token-efficient browser automation'
---
Use the official `@actionbookdev/openclaw-plugin` to give your OpenClaw agents pre-verified website selectors — no CLI needed.
## Install
```bash
openclaw plugins install @actionbookdev/openclaw-plugin
```
Requires `openclaw >= 2026.3.0`.
Verify the plugin is loaded:
```bash
openclaw plugins list
```
You should see `actionbook` in the output with status `enabled`.
## Configure
Add Actionbook settings to your OpenClaw gateway config (`~/.openclaw/config.json5`):
```json5
{
plugins: {
entries: {
actionbook: {
enabled: true,
config: {
apiKey: "your-api-key", // optional, reduces rate limiting
},
},
},
},
}
```
Then restart the gateway:
```bash
openclaw gateway restart
```
<Tip>
`apiKey` is optional — the plugin works without it but may be rate-limited. Get one at [actionbook.dev](https://actionbook.dev).
</Tip>
### Configuration Reference
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | `string` | — | API key from [actionbook.dev](https://actionbook.dev). Optional, reduces rate limiting. |
## What the Plugin Provides
### Tools
Once installed, two tools are available to your OpenClaw agent:
| Tool | Description |
|------|-------------|
| `search_actions` | Search for website action manuals by keyword. Returns area IDs, descriptions, and health scores. |
| `get_action_by_area_id` | Get complete page structure with CSS, XPath, data-testid, aria-label, and role selectors. |
### Skill-based Guidance
The plugin bundles a skill that OpenClaw activates when the user's intent involves browser automation. The skill teaches the agent:
- When to use Actionbook (browser automation, scraping, form filling, UI testing)
- How to construct effective search queries
- Selector priority (data-testid > aria-label > CSS > role)
- Fallback strategy when selectors are outdated
The agent activates the skill on demand based on user intent — no manual prompt configuration needed.
## Agent Workflow
Once installed, your agent follows this workflow automatically:
```
User: "Search Airbnb for listings in Tokyo"
1. Agent calls search_actions({ query: "airbnb search listings Tokyo", domain: "airbnb.com" })
→ Returns area_id: "airbnb.com:/:default"
2. Agent calls get_action_by_area_id({ area_id: "airbnb.com:/:default" })
→ Returns page structure with selectors
3. Agent uses returned selectors with browser tools to execute the task
```
## Plugin Management
```bash
# Check plugin status
openclaw plugins info actionbook
# Disable temporarily
openclaw plugins disable actionbook
# Re-enable
openclaw plugins enable actionbook
# Update to latest version
openclaw plugins update actionbook
```
## Development Mode
For local development, link the plugin instead of installing from npm:
```bash
openclaw plugins install -l ./packages/openclaw-plugin
```
## Next Steps
<CardGroup cols={2}>
<Card
title="CLI & Skills Guide"
icon="terminal"
href="/guides/cli-and-skills"
>
Learn the search -> get -> operate workflow
</Card>
<Card title="CLI Reference" icon="code" href="/api-reference/cli">
Full command reference for Actionbook CLI
</Card>
</CardGroup>