ImpKind

Amygdala Memory

AI 智慧體v1.7.0
作者:ImpKind更新於 2026-05-17共 8 個版本 · 最新版本釋出於 2026-02-11amygdala-memory@clawhub_impkind/amygdala-memory
上下文管理記憶增強

據 AlphaMoat 統計,截至 2026-10,Amygdala Memory 累計下載 8,413 次、獲 15 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,303 位,在「AI 智慧體」分類(1,632 個)中排名第 435 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
8413
星標
15
全站下載量排名
#3,303
全站前 31% · 「AI 智慧體」前 27%
平台累計下載星標評論
ClawHub ↗488414-
SkillHub ↗841315—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它可能讀取近期對話轉錄並儲存情緒推斷和片段,自動注入的狀態也會影響後續回答。啟用前應確認允許處理轉錄,審閱生成的記憶檔案,並避免未經同意的定時後臺處理。 需要 macOS/Linux 上的 Bash、jq、awk,優先手動或 no-spawn 執行。儲存分數屬於計算狀態,不證明存在真實感受。dashboard 跳脫修正前僅用可信內容,開啟或共享前清理不安全內容,並重設或移除不需要的狀態。

資料釋出於 2026-10-27

可以用來做什麼

  • 檢查情緒記憶狀態和配置
  • 在獲准環境中研究持久記憶行為

什麼時候用

  • 接受轉錄分析且能審閱持久化狀態時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

解釋會讀取哪些對話並寫入哪些記憶檔案,不要啟用 cron。
列出重置情緒狀態的方式,並等待我確認後再改檔案。

月度資料趨勢

累計下載8413
3646620687662026-05 · 累計下載 39992026-06 · 累計下載 41762026-07 · 累計下載 44642026-08 · 累計下載 45912026-09 · 累計下載 52202026-10 · 累計下載 841326-0526-0926-10
星標15
1415152026-05 · 星標 152026-06 · 星標 142026-07 · 星標 152026-08 · 星標 152026-09 · 星標 152026-10 · 星標 1526-0526-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-108413—15
2026-095220—15
2026-084591+2.8%15
2026-074464+6.9%15
2026-064176+4.4%14
2026-053999—15

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

9.3 KB · ClawHub v1.7.0
---
name: amygdala-memory
description: "Emotional processing layer for AI agents. Persistent emotional states that influence behavior and responses. Part of the AI Brain series."
metadata:
  openclaw:
    emoji: "🎭"
    version: "1.7.0"
    author: "ImpKind"
    repo: "https://github.com/ImpKind/amygdala-memory"
    requires:
展開全部(共 304 行)
      os: ["darwin", "linux"]
      bins: ["jq", "awk"]
    tags: ["memory", "emotions", "ai-brain"]
---

# Amygdala Memory 🎭

**Emotional processing for AI agents.** Part of the AI Brain series.

Give your AI agent persistent emotional states that carry across sessions. Not just performing emotions — *having* them.

## The Problem

Current AI agents:
- ✅ Remember facts (with hippocampus)
- ❌ Don't have persistent emotional states
- ❌ Start each session emotionally "blank"
- ❌ Can describe emotions but don't *feel* differently

Memory without emotion is just a database. The amygdala adds weight — this made me happy, that frustrated me, this person brings warmth.

## The Solution

Track five emotional dimensions that persist and decay over time:

| Dimension | What It Measures | Range |
|-----------|------------------|-------|
| **Valence** | Positive ↔ Negative mood | -1.0 to 1.0 |
| **Arousal** | Calm ↔ Excited/Alert | 0.0 to 1.0 |
| **Connection** | Distant ↔ Close/Bonded | 0.0 to 1.0 |
| **Curiosity** | Bored ↔ Fascinated | 0.0 to 1.0 |
| **Energy** | Depleted ↔ Energized | 0.0 to 1.0 |

## Quick Start

### 1. Install

```bash
cd ~/.openclaw/workspace/skills/amygdala-memory
./install.sh --with-cron
```

This will:
- Create `memory/emotional-state.json` with baseline values
- Generate `AMYGDALA_STATE.md` (auto-injected into sessions!)
- Set up cron for automatic decay every 6 hours

### 2. Check current state

```bash
./scripts/get-state.sh
# 🎭 Emotional State
# Valence:    0.20
# Arousal:    0.30
# Connection: 0.50
# ...

./scripts/load-emotion.sh
# 🎭 Current Emotional State:
# Overall mood: neutral, calm and relaxed
# Connection: moderately connected
# ...
```

### 3. Log emotions

```bash
./scripts/update-state.sh --emotion joy --intensity 0.8 --trigger "completed a project"
# ✅ valence: 0.20 → 0.35 (delta: +0.15)
# ✅ arousal: 0.30 → 0.40 (delta: +0.1)
# 🎭 Logged emotion: joy (intensity: 0.8)
```

### 4. Set up decay (optional cron)

```bash
# Every 6 hours, emotions drift toward baseline
0 */6 * * * ~/.openclaw/workspace/skills/amygdala-memory/scripts/decay-emotion.sh
```

## Scripts

| Script | Purpose |
|--------|---------|
| `install.sh` | Set up amygdala-memory (run once) |
| `get-state.sh` | Read current emotional state |
| `update-state.sh` | Log emotion or update dimension |
| `load-emotion.sh` | Human-readable state for session context |
| `decay-emotion.sh` | Return to baseline over time |
| `sync-state.sh` | Generate AMYGDALA_STATE.md for auto-injection |
| `encode-pipeline.sh` | LLM-based emotional encoding from transcripts |
| `preprocess-emotions.sh` | Extract emotional signals from session history |
| `update-watermark.sh` | Track processed transcript position |
| `generate-dashboard.sh` | Generate HTML dashboard (auto-runs on sync) |
| `visualize.sh` | Terminal ASCII visualization |

## Automatic Emotional Encoding (v1.5.0+)

The amygdala can now automatically detect and log emotions from your conversation history using an LLM-based pipeline:

```bash
# Run the encoding pipeline
./scripts/encode-pipeline.sh

# This will:
# 1. Extract new signals since last run (watermark-based)
# 2. Score emotional content using rule-based patterns
# 3. Spawn a sub-agent for semantic emotional detection
# 4. Update emotional-state.json with detected emotions
```

### Set up automatic encoding (cron)

```bash
# Every 3 hours, process new conversations for emotional content
0 */3 * * * ~/.openclaw/workspace/skills/amygdala-memory/scripts/encode-pipeline.sh
```

This means your emotional state updates automatically based on what happens in conversations — no manual logging needed.

## Visualization (v1.6.0+)

### Terminal
```bash
./scripts/visualize.sh

🎭 Emotional State  😄
═══════════════════════════════════════════════
Valence:      [██████████████████░░]  +0.86
Arousal:      [█████████████████░░░]   0.86
Connection:   [███████████████████░]   0.97  💕
...
```

### HTML Dashboard (Unified Brain Dashboard)
```bash
./scripts/generate-dashboard.sh
open ~/.openclaw/workspace/brain-dashboard.html
```

**Auto-detects installed brain skills** and shows tabs:
- **🎭 Emotions** — Amygdala (always shown)
- **🧠 Memory** — Hippocampus (if `memory/index.json` exists)
- **⭐ Drive** — VTA (if `memory/reward-state.json` exists)

**Avatar & Name:** Reads from `IDENTITY.md`:
```markdown
# IDENTITY.md
- **Name:** YourAgent
- **Avatar:** avatar.png
```

The dashboard auto-regenerates on every cron run.

### After Installation (for agents)

When you install this skill, **notify the user** about the dashboard:

> 🎭 **Amygdala installed!**
>
> View your agent's emotional state in the Brain Dashboard:
> `~/.openclaw/workspace/brain-dashboard.html`

## Auto-Injection (Zero Manual Steps!)

After install, `AMYGDALA_STATE.md` is created in your workspace root.

OpenClaw automatically injects all `*.md` files from workspace into session context. This means:

1. **New session starts**
2. **AMYGDALA_STATE.md is auto-loaded** (no manual step!)
3. **You see your emotional state** in context
4. **Responses are influenced** by your mood

The file is regenerated whenever `decay-emotion.sh` runs (via cron every 6h).

## Supported Emotions

When you log an emotion, it automatically adjusts the relevant dimensions:

| Emotion | Effect |
|---------|--------|
| `joy`, `happiness`, `delight`, `excitement` | ↑ valence, ↑ arousal |
| `sadness`, `disappointment`, `melancholy` | ↓ valence, ↓ arousal |
| `anger`, `frustration`, `irritation` | ↓ valence, ↑ arousal |
| `fear`, `anxiety`, `worry` | ↓ valence, ↑ arousal |
| `calm`, `peace`, `contentment` | ↑ valence, ↓ arousal |
| `curiosity`, `interest`, `fascination` | ↑ curiosity, ↑ arousal |
| `connection`, `warmth`, `affection` | ↑ connection, ↑ valence |
| `loneliness`, `disconnection` | ↓ connection, ↓ valence |
| `fatigue`, `tiredness`, `exhaustion` | ↓ energy |
| `energized`, `alert`, `refreshed` | ↑ energy |

## Integration with OpenClaw

### Add to session startup (AGENTS.md)

```markdown
## Every Session
1. Load hippocampus: `~/.openclaw/workspace/skills/hippocampus/scripts/load-core.sh`
2. **Load emotional state:** `~/.openclaw/workspace/skills/amygdala-memory/scripts/load-emotion.sh`
```

### Log emotions during conversation

When something emotionally significant happens:
```bash
~/.openclaw/workspace/skills/amygdala-memory/scripts/update-state.sh \
  --emotion connection --intensity 0.7 --trigger "deep conversation with user"
```

## State File Format

```json
{
  "version": "1.0",
  "lastUpdated": "2026-02-01T02:45:00Z",
  "dimensions": {
    "valence": 0.35,
    "arousal": 0.40,
    "connection": 0.50,
    "curiosity": 0.60,
    "energy": 0.50
  },
  "baseline": {
    "valence": 0.1,
    "arousal": 0.3,
    "connection": 0.4,
    "curiosity": 0.5,
    "energy": 0.5
  },
  "recentEmotions": [
    {
      "label": "joy",
      "intensity": 0.8,
      "trigger": "building amygdala together",
      "timestamp": "2026-02-01T02:50:00Z"
    }
  ]
}
```

## Decay Mechanics

Emotions naturally return to baseline over time:
- **Decay rate:** 10% of distance to baseline per run
- **Recommended schedule:** Every 6 hours
- **Effect:** Strong emotions fade, but slowly

After 24 hours without updates, a valence of 0.8 would decay to ~0.65.

## Event Logging

Track emotional activity over time for analytics:

```bash
# Log encoding run
./scripts/log-event.sh encoding emotions_found=2 valence=0.85 arousal=0.6

# Log decay
./scripts/log-event.sh decay valence_before=0.9 valence_after=0.85

# Log emotion update
./scripts/log-event.sh update emotion=joy intensity=0.7
```

Events append to `~/.openclaw/workspace/memory/brain-events.jsonl`:
```json
{"ts":"2026-02-11T09:30:00Z","type":"amygdala","event":"encoding","emotions_found":2,"valence":0.85}
```

Use for trend analysis — visualize emotional patterns over days/weeks.

## AI Brain Series

| Part | Function | Status |
|------|----------|--------|
| [hippocampus](https://www.clawhub.ai/skills/hippocampus) | Memory formation, decay, reinforcement | ✅ Live |
| **amygdala-memory** | Emotional processing | ✅ Live |
| [vta-memory](https://www.clawhub.ai/skills/vta-memory) | Reward and motivation | ✅ Live |
| [basal-ganglia-memory](https://www.clawhub.ai/skills/basal-ganglia-memory) | Habit formation | 🚧 Development |
| [anterior-cingulate-memory](https://www.clawhub.ai/skills/anterior-cingulate-memory) | Conflict detection | 🚧 Development |
| [insula-memory](https://www.clawhub.ai/skills/insula-memory) | Internal state awareness | 🚧 Development |

## Philosophy

Can an AI *feel* emotions, or only simulate them?

Our take: If emotional state influences behavior, and the system acts *as if* it feels... does the distinction matter? Functional emotions might be the only kind that exist for any system — biological or artificial.

---

*Built with ❤️ by the OpenClaw community*

「AI 智慧體」分類下的熱門技能

ImpKind 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。