OpenClaw
Skill memory plugin for OpenClaw agents — auto-capture, auto-learn, native skill sync
The @acontext/openclaw plugin gives OpenClaw agents cross-session skill memory. It captures conversations, extracts tasks, distills reusable Markdown skills, and syncs them to OpenClaw's native skill directory for automatic loading.
Quick Start
Install the plugin
openclaw plugins install @acontext/openclawSet your API key
Get an API key from dash.acontext.io and export it:
export ACONTEXT_API_KEY=sk-ac-your-api-keyConfigure openclaw.json
Add the Acontext plugin to your openclaw.json config:
// plugins.entries
"acontext": {
"enabled": true,
"config": {
"apiKey": "${ACONTEXT_API_KEY}",
"userId": "your-user-id"
}
}Start the gateway
openclaw gatewayYour agent now has skill memory. Every conversation is captured, tasks are extracted, and skills are distilled and synced to ~/.openclaw/skills/ for native loading.
How It Works
Session 1: User talks to agent
└→ Messages stored to Acontext session (auto-capture)
└→ CORE extracts structured tasks
└→ Learning Space distills skills as Markdown
Session 2: User returns
└→ Skills synced to ~/.openclaw/skills/ (native loading)
└→ OpenClaw auto-loads skill files from its skill directory
└→ New messages captured (auto-capture)
└→ Skills updated (auto-learn)The plugin hooks into two OpenClaw lifecycle events:
before_agent_start— Ensures learned skills are synced to~/.openclaw/skills/so OpenClaw can load them nativelyagent_end— Stores conversation messages to Acontext, triggers task extraction, and conditionally triggers skill distillation
Configuration
| Key | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Required. Acontext API key (supports ${ACONTEXT_API_KEY}) |
baseUrl | string | https://api.acontext.app/api/v1 | Acontext API base URL |
userId | string | "default" | Scope sessions per user |
learningSpaceId | string | auto-created | Explicit Learning Space ID |
skillsDir | string | ~/.openclaw/skills | Directory where skills are synced for native loading |
autoCapture | boolean | true | Store messages after each turn |
autoLearn | boolean | true | Trigger skill distillation after sessions |
minTurnsForLearn | number | 4 | Minimum conversation turns before triggering auto-learn |
For self-hosted Acontext, set baseUrl to your local API endpoint (e.g. http://localhost:8029/api/v1).
Agent Tools
The plugin registers three tools your agent can call explicitly during conversations:
| Tool | Description |
|---|---|
acontext_search_skills | Search through learned skill files by keyword |
acontext_session_history | Get task summaries from recent past sessions |
acontext_learn_now | Trigger skill learning from the current session immediately |
CLI Commands
# List all learned skills in the Learning Space
openclaw acontext skills
# Show memory statistics (sessions, tasks, skills)
openclaw acontext statsSkill Sync
Skills are synced as Markdown files to OpenClaw's native skill directory (~/.openclaw/skills/ by default). OpenClaw auto-loads them — no prompt injection needed.
- Incremental sync — Only changed skills are re-downloaded, using server-side
updated_attimestamps - Sync triggers — On service start, before each agent turn (if stale), and after learning
Unlike plugins that inject context into prompts, Acontext syncs skills as files that OpenClaw loads natively. You can inspect, modify, and share these Markdown skill files directly in ~/.openclaw/skills/.
Next Steps
Last updated on