amygdala-memory
Emotional processing layer for AI agents. Persistent emotional states that influence behavior and responses. Part of the AI Brain series.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- amygdala-memory
- metadata
- { "openclaw": { "repo": "https://github.com/ImpKind/amygdala-memory", "tags": [ "memory", "emotions", "ai-brain" ], "emoji": "?", "author": "ImpKind", "version": "1.6.1", "requires": { "os": [ "darwin", "linux" ], "bins": [ "jq", "awk" ] } } }
- description
- Emotional processing layer for AI agents. Persistent emotional states that influence behavior and responses. Part of the AI Brain series.
02 资源文件 14
- 参考文档_meta.json813 B
- 脚本install.sh4.0 KB
- 参考文档prompts/encode-emotions.md2.6 KB
- 参考文档README.md7.0 KB
- 脚本scripts/decay-emotion.sh2.4 KB
- 脚本scripts/encode-pipeline.sh6.5 KB
- 脚本scripts/generate-dashboard.sh23.5 KB
- 脚本scripts/get-state.sh2.1 KB
- 脚本scripts/load-emotion.sh4.7 KB
- 脚本scripts/preprocess-emotions.sh4.4 KB
- 脚本scripts/sync-state.sh5.4 KB
- 脚本scripts/update-state.sh6.1 KB
- 脚本scripts/update-watermark.sh2.0 KB
- 脚本scripts/visualize.sh3.3 KB
03 SKILL.md 正文
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
cd ~/.openclaw/workspace/skills/amygdala-memory
./install.sh --with-cron
This will:
- Create
memory/emotional-state.jsonwith baseline values - Generate
AMYGDALA_STATE.md(auto-injected into sessions!) - Set up cron for automatic decay every 6 hours
2. Check current state
./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
./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)
# 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:
# 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)
# 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
./scripts/visualize.sh
? Emotional State ?
═══════════════════════════════════════════════
Valence: [██████████████████░░] +0.86
Arousal: [█████████████████░░░] 0.86
Connection: [███████████████████░] 0.97 ?
...
HTML Dashboard (Unified Brain Dashboard)
./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.jsonexists) - ⭐ Drive — VTA (if
memory/reward-state.jsonexists)
Avatar & Name: Reads from IDENTITY.md:
# 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:
- New session starts
- AMYGDALA_STATE.md is auto-loaded (no manual step!)
- You see your emotional state in context
- 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)
## 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:
~/.openclaw/workspace/skills/amygdala-memory/scripts/update-state.sh \
--emotion connection --intensity 0.7 --trigger "deep conversation with user"
State File Format
{
"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.
AI Brain Series
| Part | Function | Status |
|---|---|---|
| hippocampus | Memory formation, decay, reinforcement | ✅ Live |
| amygdala-memory | Emotional processing | ✅ Live |
| vta-memory | Reward and motivation | ✅ Live |
| basal-ganglia-memory | Habit formation | ? Development |
| anterior-cingulate-memory | Conflict detection | ? Development |
| 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
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.