# Send ACC Error Memory to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "acc-error-memory",
    "name": "ACC Error Memory",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "canonicalUrl": "https://clawhub.ai/ImpKind/acc-error-memory",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/acc-error-memory",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "install.sh",
      "scripts/analyze-day.sh",
      "scripts/calibrate-patterns.sh",
      "scripts/encode-pipeline.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "acc-error-memory",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-28T23:38:57.936Z",
      "expiresAt": "2026-05-05T23:38:57.936Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=acc-error-memory",
        "contentDisposition": "attachment; filename=\"acc-error-memory-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "acc-error-memory"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/acc-error-memory"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/acc-error-memory",
    "downloadUrl": "https://openagent3.xyz/downloads/acc-error-memory",
    "agentUrl": "https://openagent3.xyz/skills/acc-error-memory/agent",
    "manifestUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/acc-error-memory/agent.md"
  }
}
```
## Documentation

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

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

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

ScriptPurposepreprocess-errors.shExtract user+assistant exchanges since watermarkencode-pipeline.shRun full preprocessing pipelinelog-error.shLog an error with pattern, context, mitigationload-state.shHuman-readable state for session contextresolve-check.shCheck for patterns ready to resolve (30+ days)update-watermark.shUpdate processing watermarksync-state.shGenerate ACC_STATE.md from acc-state.jsonlog-event.shLog events for brain analytics

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

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

PartFunctionStatushippocampusMemory formation, decay, reinforcement✅ Liveamygdala-memoryEmotional processing✅ Livevta-memoryReward and motivation✅ Liveanterior-cingulate-memoryConflict detection, error monitoring✅ Livebasal-ganglia-memoryHabit formation🚧 Developmentinsula-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
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ImpKind
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-28T23:38:57.936Z
- Expires at: 2026-05-05T23:38:57.936Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/acc-error-memory)
- [Send to Agent page](https://openagent3.xyz/skills/acc-error-memory/agent)
- [JSON manifest](https://openagent3.xyz/skills/acc-error-memory/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/acc-error-memory/agent.md)
- [Download page](https://openagent3.xyz/downloads/acc-error-memory)