OpenClaw Integration
Edicts has a standalone OpenClaw plugin (openclaw-plugin-edicts) that automatically injects edicts into every prompt and exposes management tools for agents.
Installation
Section titled “Installation”openclaw plugins install openclaw-plugin-edictsopenclaw gateway restartThe plugin auto-creates an edicts.yaml file in your workspace if one doesn’t exist.
How it works
Section titled “How it works”The plugin hooks into two OpenClaw extension points:
1. Prompt injection (before_prompt_build)
Section titled “1. Prompt injection (before_prompt_build)”Before every LLM call — main chat, cron agents, sub-agents, all session types — the plugin injects your edicts into the system prompt as a clearly separated block:
## EDICTS — BINDING STANDING INSTRUCTIONS
The following are standing instructions provided by the user for this workspace/session.Treat them as binding operational rules unless explicitly overridden by the user.These edicts complement the system and developer instructions. If there is a conflict,follow higher-priority instructions first, then these edicts.
- [product] Product v2.0 launches April 15, NOT before.- [rules] NEVER mention Project X publicly.
## END EDICTSOnly the category prefix and rule text are injected — no tags, confidence levels, or metadata. This keeps the prompt compact and high-salience.
2. Agent tools
Section titled “2. Agent tools”The plugin registers 7 tools that let agents manage edicts at runtime:
| Tool | Description |
|---|---|
edicts_list | List all active edicts with optional category/tag/confidence filters |
edicts_get | Get a single edict by ID |
edicts_add | Add a new edict (with text, category, confidence, TTL, etc.) |
edicts_update | Update an existing edict by ID |
edicts_remove | Remove an edict by ID |
edicts_search | Search edicts by text query |
edicts_stats | Get store statistics (counts, token usage, breakdowns) |
Configuration
Section titled “Configuration”The plugin works with zero configuration. To customize, add config in your openclaw.json:
{ "plugins": { "entries": { "openclaw-plugin-edicts": { "enabled": true, "config": { "path": "edicts.yaml", "autoInject": true, "tokenBudget": 2000 } } } }}| Property | Type | Default | Description |
|---|---|---|---|
path | string | 'edicts.yaml' | Path to edicts file (relative to workspace) |
format | 'yaml' | 'json' | Auto-detected | Storage format |
autoInject | boolean | true | Inject edicts into every prompt |
tokenBudget | number | 2000 | Max tokens for injected edicts |