agent 情感系统 — agent-emotion(情绪演化 · 泊松主动)
让聊天 Agent 有一层可演化的「内心」:孤单 / 精力 / 亲近感随时间变化,用泊松过程决定何时主动找用户。
不绑定任何人设。 suki、苏晚、自定义 SOUL 都只负责「怎么说话」;本仓库只负责「该不该找、现在什么状态」。
| 能力 | 说明 |
|---|---|
| 情绪状态 | 3 维 loneliness / energy / affection(0~1) |
| 时间演化 | cron 探测时漂移;用户互动 / 主动成功后写回 |
| 泊松门控 | P(wake)=1-exp(-λ·Δt),λ 由情绪决定 |
| 安静时段 / 每日上限 | 默认 09:00–22:00,每天最多 4 次 |
| 宿主 | Hermes cron script 门控;OpenClaw 等可同样调用 CLI |
agent-emotion → 何时主动、当前心情摘要
你的人设 Skill → 怎么说话
git clone --depth 1 https://github.com/yyh-001/agent-emotion.git
cd agent-emotion
mkdir -p ~/.hermes/scripts ~/.hermes/agent-emotion ~/.hermes/skills/automation/agent-emotion
cp scripts/emotion_*.py ~/.hermes/scripts/
cp config.example.json ~/.hermes/agent-emotion/config.json
cp -a SKILL.md README.md references ~/.hermes/skills/automation/agent-emotion/
python3 ~/.hermes/scripts/emotion_cli.py reset把主动闲聊类 cron 的 script 设为 emotion_gate.py,prompt 用你自己的人设(模板见 references/hermes-cron.md)。
python3 ~/.hermes/scripts/emotion_cli.py status
python3 ~/.hermes/scripts/emotion_cli.py force-wake # 下次探测必醒一次见 config.example.json。可用环境变量:
| 变量 | 含义 |
|---|---|
AGENT_EMOTION_HOME |
数据根(默认 ~/.hermes/agent-emotion) |
AGENT_EMOTION_STATE |
覆盖 state.json 路径 |
AGENT_EMOTION_CONFIG |
覆盖 config.json 路径 |
