← 返回 Skills 市场
impkind

Amygdala Memory

作者 ImpKind · GitHub ↗ · v1.7.0
cross-platform ⚠ suspicious
3518
总下载
14
收藏
5
当前安装
8
版本数
在 OpenClaw 中安装
/install amygdala-memory
功能描述
Emotional processing layer for AI agents. Persistent emotional states that influence behavior and responses. Part of the AI Brain series.
使用说明 (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.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

./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.json exists)
  • ⭐ Drive — VTA (if memory/reward-state.json exists)

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:

  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)

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

Event Logging

Track emotional activity over time for analytics:

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

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

安全使用建议
What to consider before installing: - Data access & privacy: The skill reads your conversation transcripts (~/.openclaw/agents/<AGENT_ID>/sessions) and writes persistent emotional-state.json and AMYGDALA_STATE.md which OpenClaw auto-injects into sessions. If you don't want prior conversations analyzed or a first-person mood narrative added to every session, do not enable the automatic cron/encoding. - Automatic processing: install.sh offers a --with-cron option that will create recurring jobs to run decay and the encode pipeline. Those jobs will run without further prompts; install with care and inspect any created cron/ openclaw cron entries. - LLM / sub-agent behavior: The encode pipeline prepares pending signals for 'LLM analysis' and states a sub-agent will be spawned. The code does not clearly document where that analysis runs (local LLM, external API, or agent runtime). If your transcripts contain sensitive content, verify how/where that sub-agent executes and whether it transmits data to external services. - Missing declared dependencies: The skill metadata only lists jq and awk, but the scripts rely on python3, base64, bc and call an 'openclaw' CLI. Make sure these tools exist on your system and review/adjust the metadata before deployment. - Review code & run dry-run: Inspect scripts (preprocess-emotions.sh, encode-pipeline.sh, sync-state.sh) and run them in dry-run modes (where supported) or on a copy of your workspace first. Consider running encode-pipeline.sh with --no-spawn and run preprocess-emotions.sh --full manually to see what would be extracted. - Limit scope: If you like the feature but want to limit risk, install without --with-cron, disable automatic encoding, and remove or inspect AMYGDALA_STATE.md before allowing it to be auto-injected. Consider isolating this skill in a non-production agent/workspace or using sanitized transcripts. - When unsure: If you cannot verify where LLM/sub-agent inference runs or are uncomfortable with automatic transcript processing or auto-injection of first-person state, treat this skill as potentially privacy-invasive and do not enable cron/automatic encoding until you audit and restrict it.
功能分析
Type: OpenClaw Skill Name: amygdala-memory Version: 1.7.0 The skill is classified as suspicious due to its broad access to sensitive data and the use of direct agent instructions (prompt injection surface) to process this data. Specifically, `scripts/preprocess-emotions.sh` reads the full conversation history from `$HOME/.openclaw/agents/$AGENT_ID/sessions/*.jsonl`. The `install.sh` script sets up cron jobs that instruct the AI agent via `--agent-turn` to execute `encode-pipeline.sh`, which in turn processes this sensitive conversation data. While the stated purpose is emotional processing, this capability presents a significant vulnerability, as a compromised agent could be instructed to exfiltrate this sensitive data.
能力评估
Purpose & Capability
Name/description (emotional memory) aligns with what the code does (persist dimensions, update, decay, visualize), but the manifest/metadata is incomplete: the runtime scripts clearly invoke python3, base64, bc and other utilities yet only 'jq' and 'awk' are declared. The install script and pipeline also reference an 'openclaw' CLI (cron integration and agent-turn creation) that is not listed as a required binary. Missing declared dependencies is an incoherence that could cause failures or hidden behavior during install.
Instruction Scope
Runtime instructions and scripts read agent session transcripts (~/.openclaw/agents/<AGENT_ID>/sessions) to extract emotional signals, write persistent state (memory/emotional-state.json), and generate AMYGDALA_STATE.md — a first‑person narrative that is auto-injected into future sessions and will influence agent responses. The encode pipeline prepares data for LLM semantic detection and promises to 'spawn a sub-agent' to analyze signals; where that LLM runs (local vs external provider) is not made explicit. This gives the skill broad discretion to read, summarize, and re-introduce potentially sensitive conversation content into agent context.
Install Mechanism
There is no formal package install spec (instruction-only), but an included install.sh will write files into the workspace, make scripts executable, generate state files and (optionally) add recurring jobs via the openclaw CLI. No remote download of code is performed by the script itself (files are bundled), which reduces supply-chain risk, but install.sh will create cron jobs / OpenClaw cron entries if requested — that adds persistence.
Credentials
The skill declares no required environment variables or config paths, but its scripts access and modify user workspace files (~/.openclaw/workspace/memory/*) and read agent transcripts under ~/.openclaw/agents. Asking to process conversation history is consistent with the feature, but the manifest fails to declare these path accesses and omits required runtimes (python3). The skill does not request external credentials, which is good, but it still handles potentially sensitive user data without explicit declaration of that scope.
Persistence & Privilege
always:false (normal) and the skill is user-invocable. However install.sh can register recurring cron/cron-like jobs via 'openclaw cron add' to run decay and automatic encoding every 6h/3h. Those cron jobs will autonomously process transcripts and update state unless you decline the --with-cron option or remove the cron entries. This persistent autonomous processing increases blast radius if the encode pipeline or sub-agent sends data externally.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install amygdala-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /amygdala-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.7.0
feat: add event logging for brain analytics
v1.6.1
amygdala-memory v1.6.1 - Added terminal ASCII visualization via scripts/visualize.sh for emotional state. - Added unified HTML Brain Dashboard via scripts/generate-dashboard.sh, auto-detecting brain skills and showing emotion, memory, and reward states. - Dashboard auto-regenerates on sync/cron and uses avatar/name from IDENTITY.md if present. - Updated documentation to include usage and instructions for new visualization and dashboard features.
v1.5.0
- Adds automatic LLM-based emotional encoding from transcripts using new encode-pipeline.sh script. - Introduces watermark tracking (update-watermark.sh) to process only new session content. - Updates SKILL.md with new instructions, pipeline overview, and cron setup for automatic encoding. - Emotional state now updates based on conversation content—manual logging is no longer required. - Version bump to 1.5.0.
v1.3.0
- Added prompt template: `prompts/encode-emotions.md` - Added new preprocessing script: `scripts/preprocess-emotions.sh`
v1.2.0
V1.2.0: 3 new dimensions (anticipation, trust, frustrationTolerance) + per-dimension decay rates
v1.1.0
Auto-injection via AMYGDALA_STATE.md, install.sh script, sync-state.sh
v1.0.0
V1.0.0: Full implementation - emotional state tracking, decay, dimension updates
v0.1.0
Initial placeholder - under development
元数据
Slug amygdala-memory
版本 1.7.0
许可证
累计安装 6
当前安装数 5
历史版本数 8
常见问题

Amygdala Memory 是什么?

Emotional processing layer for AI agents. Persistent emotional states that influence behavior and responses. Part of the AI Brain series. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 3518 次。

如何安装 Amygdala Memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install amygdala-memory」即可一键安装,无需额外配置。

Amygdala Memory 是免费的吗?

是的,Amygdala Memory 完全免费(开源免费),可自由下载、安装和使用。

Amygdala Memory 支持哪些平台?

Amygdala Memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Amygdala Memory?

由 ImpKind(@impkind)开发并维护,当前版本 v1.7.0。

💬 留言讨论