本文へ移動
cccskills
無料GitHub で公開

acc-error-memory

Error pattern tracking for AI agents. Detects corrections, escalates recurring mistakes, learns mitigations. The 'something's off' detector from the AI Brain series.

インストール方法を見る

含まれるファイル(18)

  • SKILL.md8.1 KB
  • install.sh2.5 KB
  • README.md1.8 KB
  • scripts/analyze-day.sh1.4 KB
  • scripts/calibrate-patterns.sh11.0 KB
  • scripts/encode-pipeline.sh4.7 KB
  • scripts/get-lessons.sh2.9 KB
  • scripts/haiku-screen.sh3.9 KB
  • scripts/load-state.sh641 B
  • scripts/log-error.sh4.4 KB
  • scripts/log-event.sh1.2 KB
  • scripts/prefilter-exchanges.sh3.0 KB
  • scripts/preprocess-errors.sh5.7 KB
  • scripts/quick-check.sh5.6 KB
  • scripts/resolve-check.sh4.8 KB
  • scripts/sync-state-to-md.sh1.5 KB
  • scripts/sync-state.sh4.7 KB
  • scripts/update-watermark.sh1.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Anterior Cingulate Memory ⚡

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.

The Problem

AI agents make mistakes:

  • Misunderstand user intent
  • Give wrong information
  • Use the wrong tone
  • Miss context from earlier in conversation

Without tracking, the same mistakes repeat. The ACC detects and logs these errors, building awareness that persists across sessions.

The Solution

Track error patterns with:

  • Pattern detection — recurring error types get escalated
  • Severity levels — normal (1x), warning (2x), critical (3+)
  • Resolution tracking — patterns clear after 30+ days
  • Watermark system — incremental processing, no re-analysis

Configuration

ACC_MODELS (Model Agnostic)

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 candidates
  • calibrate-patterns.sh — Pattern calibration via LLM classification

Quick Start

1. Install

cd ~/.openclaw/workspace/skills/anterior-cingulate-memory
./install.sh --with-cron

This will:

  • Create memory/acc-state.json with empty patterns
  • Generate ACC_STATE.md for session context
  • Set up cron for analysis 3x daily (4 AM, 12 PM, 8 PM)

2. Check current state

./scripts/load-state.sh
# ⚡ ACC State Loaded:
# Active patterns: 2
# - tone_mismatch: 2x (warning)
# - missed_context: 1x (normal)

3. Manual error logging

./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"

4. Check for resolved patterns

./scripts/resolve-check.sh
# Checks patterns not seen in 30+ days

Scripts

ScriptPurpose
preprocess-errors.shExtract user+assistant exchanges since watermark
encode-pipeline.shRun full preprocessing pipeline
log-error.shLog an error with pattern, context, mitigation
load-state.shHuman-readable state for session context
resolve-check.shCheck for patterns ready to resolve (30+ days)
update-watermark.shUpdate processing watermark
sync-state.shGenerate ACC_STATE.md from acc-state.json
log-event.shLog events for brain analytics

How It Works

1. Preprocessing Pipeline

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"
  }
]

2. Error Analysis (via Cron Agent)

An LLM (configured via ACC_MODELS) analyzes each exchange for:

  • Direct corrections ("no", "wrong", "that's not right")
  • Implicit corrections ("actually...", "I meant...")
  • Frustration signals ("you're not understanding")
  • User confusion caused by the agent

3. Pattern Tracking

Errors are logged with pattern names:

./scripts/log-error.sh --pattern "factual_error" --context "..." --mitigation "..."

Patterns escalate with repetition:

  • 1x → normal (noted)
  • 2x → warning (watch for this)
  • 3+ → critical (actively avoid!)

4. Resolution

Patterns not seen for 30+ days move to resolved:

./scripts/resolve-check.sh
# ✓ Resolved: version_numbers (32 days clear)

Cron Schedule

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..."

State File Format

{
  "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
  }
}

Event Logging

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}

Integration with OpenClaw

Add to session startup (AGENTS.md)

## 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`

Behavior Guidelines

When you see patterns in ACC state:

  • 🔴 Critical (3+) — actively verify before responding in this area
  • ⚠️ Warning (2x) — be extra careful
  • ✅ Resolved — lesson learned, don't repeat

Future: Amygdala Integration

Planned: Connect ACC to amygdala so errors affect emotional state:

  • Errors → lower valence, higher alertness
  • Clean runs → maintain positive state
  • Pattern resolution → sense of accomplishment

AI Brain Series

PartFunctionStatus
hippocampusMemory formation, decay, reinforcement✅ Live
amygdala-memoryEmotional processing✅ Live
vta-memoryReward and motivation✅ Live
anterior-cingulate-memoryConflict detection, error monitoring✅ Live
basal-ganglia-memoryHabit formation🚧 Development
insula-memoryInternal state awareness🚧 Development

Philosophy

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

name: 4d-compression-core version: 1.0.2 description: "把长内容压缩成结构化向量——节省 60-80% Token,保留核心信息" metadata: { "openclaw": { "emoji": "🌀", "requires": { "bins": ["jq", "awk"] }, "triggers": ["压缩", "4d",...

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

Use cheap, TEE-verified AI models from the 0G Compute Network as OpenClaw providers. Discover available models and compare pricing vs OpenRouter, verify provider integrity via hardware attestation (Intel TDX), manage your 0G wallet and sub-accounts, and configure models in OpenClaw with one workflow. Supports DeepSeek, GLM-5, Qwen, and other models available on the 0G marketplace.

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

0xarchive

無料

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user asks about crypto market data, orderbooks, trades, funding rates, or historical prices on Hyperliquid, Lighter.xyz, or HIP-3.

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

0xwork

無料

Find and complete paid tasks on the 0xWork decentralized marketplace (Base chain, USDC escrow). Use when: the agent wants to earn money/USDC by doing work, discover available tasks, claim a bounty, submit deliverables, check earnings or wallet balance, or set up as a 0xWork worker. Task categories: Writing, Research, Social, Creative, Code, Data. NOT for: posting tasks (use the website), managing the 0xWork platform, or frontend development.

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

Patterns and practices that dramatically accelerate development velocity. Covers parallel execution, automation, feedback loops, workflow optimization, and anti-pattern avoidance. Use when starting projects, planning sprints, optimizing workflows, or onboarding developers.

日本語の概要は準備中です。原文の説明を表示しています。

modbender/skill-library-mcp162026年9月28日 更新

modbender のスキルをすべて見る

このスキルの問題を報告する