AI 代理的错误模式跟踪。检测纠正措施,升级重复出现的错误,学习缓解措施。 AI Brain 系列中的“出了问题”探测器。
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install acc-error-memory或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install acc-error-memory⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/acc-error-memory/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: acc-error-memory description: "Error pattern tracking for AI agents. Detects corrections, escalates recurring mistakes, learns mitigations. The 'something's off' detector from the AI Brain series." metadata: openclaw: emoji: "⚡" version: "1.0.0" author: "ImpKind" repo: "https://github.com/ImpKind/acc-error-memory" requires: os: ["darwin", "linux"] bins: ["python3", "jq"] tags: ["memory", "monitoring", "ai-brain", "error-detection"] ---
Conflict detection and error monitoring for AI agents. Part of the AI Brain series.
The anterior cingulate cortex (ACC) monitors for errors and conflicts. This skill gives your AI agent the ability to learn from mistakes — tracking error patterns over time and becoming more careful in contexts where it historically fails.
AI agents make mistakes:
Without tracking, the same mistakes repeat. The ACC detects and logs these errors, building awareness that persists across sessions.
Track error patterns with:
The LLM screening and calibration scripts are model-agnostic. Set ACC_MODELS to use any CLI-accessible model:
# Default (Anthropic Claude via CLI)
export ACC_MODELS="claude --model haiku -p,claude --model sonnet -p"
# Ollama (local)
export ACC_MODELS="ollama run llama3,ollama run mistral"
# OpenAI
export ACC_MODELS="openai chat -m gpt-4o-mini,openai chat -m gpt-4o"
# Single model (no fallback)
export ACC_MODELS="claude --model haiku -p"
Format: Comma-separated CLI commands. Each command is invoked with the prompt appended as the final argument. Models are tried in order — if the first fails/times out (45s), the next is used as fallback.
Scripts that use ACC_MODELS:
haiku-screen.sh — LLM confirmation of regex-filtered error candidatescalibrate-patterns.sh — Pattern calibration via LLM classificationcd ~/.openclaw/workspace/skills/anterior-cingulate-memory
./install.sh --with-cron
This will:
memory/acc-state.json with empty patternsACC_STATE.md for session context./scripts/load-state.sh
# ⚡ ACC State Loaded:
# Active patterns: 2
# - tone_mismatch: 2x (warning)
# - missed_context: 1x (normal)
./scripts/log-error.sh \
--pattern "factual_error" \
--context "Stated Python 3.9 was latest when it's 3.12" \
--mitigation "Always web search for version numbers"
./scripts/resolve-check.sh
# Checks patterns not seen in 30+ days
| Script | Purpose | |--------|---------| | preprocess-errors.sh | Extract user+assistant exchanges since watermark | | encode-pipeline.sh | Run full preprocessing pipeline | | log-error.sh | Log an error with pattern, context, mitigation | | load-state.sh | Human-readable state for session context | | resolve-check.sh | Check for patterns ready to resolve (30+ days) | | update-watermark.sh | Update processing watermark | | sync-state.sh | Generate ACC_STATE.md from acc-state.json | | log-event.sh | Log events for brain analytics |
The encode-pipeline.sh extracts exchanges from session transcripts:
./scripts/encode-pipeline.sh --no-spawn
# ⚡ ACC Encode Pipeline
# Step 1: Extracting exchanges...
# Found 47 exchanges to analyze
Output: pending-errors.json with user+assistant pairs:
[
{
"assistant_text": "The latest Python version is 3.9",
"user_text": "Actually it's 3.12 now",
"timestamp": "2026-02-11T10:00:00Z"
}
]
An LLM (configured via ACC_MODELS) analyzes each exchange for:
Errors are logged with pattern names:
./scripts/log-error.sh --pattern "factual_error" --context "..." --mitigation "..."
Patterns escalate with repetition:
Patterns not seen for 30+ days move to resolved:
./scripts/resolve-check.sh
# ✓ Resolved: version_numbers (32 days clear)
Default: 3x daily for faster feedback loop
# Add to cron
openclaw cron add --name acc-analysis \
--cron "0 4,12,20 * * *" \
--session isolated \
--agent-turn "Run ACC analysis pipeline..."
{
"version": "2.0",
"lastUpdated": "2026-02-11T12:00:00Z",
"activePatterns": {
"factual_error": {
"count": 3,
"severity": "critical",
"firstSeen": "2026-02-01T10:00:00Z",
"lastSeen": "2026-02-10T15:00:00Z",
"context": "Stated outdated version numbers",
"mitigation": "Always verify versions with web search"
}
},
"resolved": {
"tone_mismatch": {
"count": 2,
"resolvedAt": "2026-02-11T04:00:00Z",
"daysClear": 32
}
},
"stats": {
"totalErrorsLogged": 15
}
}
Track ACC activity over time:
./scripts/log-event.sh analysis errors_found=2 patterns_active=3 patterns_resolved=1
Events append to ~/.openclaw/workspace/memory/brain-events.jsonl:
{"ts":"2026-02-11T12:00:00Z","type":"acc","event":"analysis","errors_found":2,"patterns_active":3}
## Every Session
1. Load hippocampus: `./scripts/load-core.sh`
2. Load emotional state: `./scripts/load-emotion.sh`
3. **Load error patterns:** `~/.openclaw/workspace/skills/anterior-cingulate-memory/scripts/load-state.sh`
When you see patterns in ACC state:
Planned: Connect ACC to amygdala so errors affect emotional state:
| Part | Function | Status | |------|----------|--------| | hippocampus | Memory formation, decay, reinforcement | ✅ Live | | amygdala-memory | Emotional processing | ✅ Live | | vta-memory | Reward and motivation | ✅ Live | | anterior-cingulate-memory | Conflict detection, error monitoring | ✅ Live | | basal-ganglia-memory | Habit formation | 🚧 Development | | insula-memory | Internal state awareness | 🚧 Development |
The ACC in the human brain creates that "something's off" feeling — the pre-conscious awareness that you've made an error. This skill gives AI agents a similar capability: persistent awareness of mistake patterns that influences future behavior.
Mistakes aren't failures. They're data. The ACC turns that data into learning.
---
Built with ⚡ by the OpenClaw community
安装 ACC 错误内存 后,可以对 AI 说这些话来触发它
Help me get started with ACC Error Memory
Explains what ACC Error Memory does, walks through the setup, and runs a quick demo based on your current project
Use ACC Error Memory to error pattern tracking for AI agents
Invokes ACC Error Memory with the right parameters and returns the result directly in the conversation
What can I do with ACC Error Memory in my documents & notes workflow?
Lists the top use cases for ACC Error Memory, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/acc-error-memory/ 目录(个人级,所有项目可用),或 .claude/skills/acc-error-memory/(项目级)。重启 AI 客户端后,用 /acc-error-memory 主动调用,或让 AI 根据上下文自动发现并使用。
ACC 错误内存 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ACC 错误内存 可免费安装使用。请查阅仓库了解许可证信息。
AI 代理的错误模式跟踪。检测纠正措施,升级重复出现的错误,学习缓解措施。 AI Brain 系列中的“出了问题”探测器。
ACC 错误内存 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using ACC Error Memory
Identifies repetitive steps in your workflow and sets up ACC Error Memory to handle them automatically