inner-life-core
The foundation for an agent's inner life. Emotions, state, protocol.
What This Solves
Without inner-life-core, your agent:
- - Starts every session as a blank slate
- Has no emotional continuity
- Can't prioritize based on how things are going
- Doesn't know when to reach out or stay quiet
With inner-life-core, your agent:
- - Tracks 6 emotions with realistic half-life decay
- Follows a 9-step Brain Loop protocol
- Routes behavior based on emotional state
- Knows when to ask, when to act, when to stay silent
Setup
CODEBLOCK0
This creates:
- -
memory/inner-state.json — 6 emotions with decay rules - INLINECODE1 — what the agent is seeking/anticipating
- INLINECODE2 — learned habits and user patterns
- INLINECODE3 — trust levels and lessons
- INLINECODE4 — 9-step Brain Loop protocol
- INLINECODE5 — personality observation space
- INLINECODE6 — curiosity backlog
- INLINECODE7 — task queue
The Emotion Model
6 emotions with half-life decay:
| Emotion | What it tracks | Decay |
|---|
| connection | How recently you talked to the user | -0.05 per 6h without contact |
| confidence |
How well things are going | +0.02/6h recovery, -0.1 on mistake |
|
curiosity | How stimulated you are | -0.03 per 6h without spark |
|
boredom | How routine things feel | +1 day counter, reset on novelty |
|
frustration | Recurring unsolved problems | Counts recurring items |
|
impatience | Stale items waiting for response | Tracks days without action |
Emotions drive behavior — see BRAIN.md Step 3 (Emotion-driven routing).
Context Protocol
4 levels of state reading, so each component reads only what it needs:
- - Level 1 (Minimal): Task-specific data only
- Level 2 (Standard): inner-state + drive + daily notes + signals
- Level 3 (Full): Level 2 + habits + relationship + diary + dreams + questions
- Level 4 (Deep): Level 3 + system docs + weekly digest
Signal & Synapse Tags
Signals (inter-component communication):
- -
<!-- dream-topic: topic --> — Evening → Night Dream - INLINECODE9 — Brain Loop → next Brain Loop
- INLINECODE10 — Night Dream → Morning Brain Loop
Synapses (memory connections):
- -
<!-- contradicts: ref --> — when facts conflict - INLINECODE12 — cause and effect
- INLINECODE13 — when updating old info
Utilities
CODEBLOCK1
Works With
Best experience with the full inner-life suite:
- - inner-life-reflect — self-reflection and personality growth
- inner-life-memory — memory continuity between sessions
- inner-life-dream — creative thinking during quiet hours
- inner-life-chronicle — daily diary generation
- inner-life-evolve — self-evolution proposals
Also works with: agent-browser, web-search-plus, git, claw-backup, shellf
When Should You Install This?
Install this skill if:
- - Your agent feels robotic and stateless
- You want emotional continuity between sessions
- You want behavior that adapts to context
- You're building a long-running autonomous agent
Part of the openclaw-inner-life bundle.
inner-life-core
智能体内心世界的基础。情感、状态、协议。
解决的问题
没有inner-life-core,你的智能体会:
- - 每次会话都从空白状态开始
- 缺乏情感连续性
- 无法根据事态进展进行优先级排序
- 不知道何时该主动联系或保持安静
有了inner-life-core,你的智能体会:
- - 追踪6种情感,并具有真实的半衰期衰减
- 遵循9步大脑循环协议
- 根据情感状态路由行为
- 知道何时提问、何时行动、何时保持沉默
设置
bash
初始化状态文件
bash skills/inner-life-core/scripts/init.sh
这将创建:
- - memory/inner-state.json — 6种情感及其衰减规则
- memory/drive.json — 智能体正在寻求/期待的内容
- memory/habits.json — 已习得的习惯和用户模式
- memory/relationship.json — 信任等级和经验教训
- BRAIN.md — 9步大脑循环协议
- SELF.md — 人格观察空间
- memory/questions.md — 好奇心积压清单
- tasks/QUEUE.md — 任务队列
情感模型
6种情感及其半衰期衰减:
| 情感 | 追踪内容 | 衰减 |
|---|
| 连接感 | 最近一次与用户交流的时间 | 每6小时无接触 -0.05 |
| 自信心 |
事情进展顺利程度 | 每6小时恢复 +0.02,犯错时 -0.1 |
|
好奇心 | 受刺激程度 | 每6小时无火花 -0.03 |
|
无聊感 | 日常事务的重复程度 | 累计天数+1,有新意时重置 |
|
挫败感 | 反复出现的未解决问题 | 统计重复项数量 |
|
不耐烦 | 等待回应的积压事项 | 追踪无行动的天数 |
情感驱动行为——详见BRAIN.md第3步(情感驱动路由)。
上下文协议
4级状态读取,确保每个组件只读取所需内容:
- - 第1级(最小): 仅任务特定数据
- 第2级(标准): 内部状态 + 驱动力 + 日常笔记 + 信号
- 第3级(完整): 第2级 + 习惯 + 关系 + 日记 + 梦境 + 问题
- 第4级(深度): 第3级 + 系统文档 + 周报摘要
信号与突触标签
信号(组件间通信):
- - — 晚间 → 夜间梦境
- — 大脑循环 → 下一个大脑循环
- — 夜间梦境 → 早晨大脑循环
突触(记忆连接):
- - — 事实冲突时
- — 因果关系
- — 更新旧信息时
工具
bash
检查你的内心世界评分
bash skills/inner-life-core/scripts/score.sh
手动应用情感衰减
source skills/inner-life-core/scripts/state.sh && state_decay
配合使用
与完整内心世界套件配合效果最佳:
- - inner-life-reflect — 自我反思与人格成长
- inner-life-memory — 会话间的记忆连续性
- inner-life-dream — 安静时段的创造性思维
- inner-life-chronicle — 每日日记生成
- inner-life-evolve — 自我进化提案
也可配合使用:agent-browser、web-search-plus、git、claw-backup、shellf
何时应安装此技能?
在以下情况下安装此技能:
- - 你的智能体显得机械且无状态
- 你希望会话间具有情感连续性
- 你希望行为能根据上下文自适应
- 你正在构建长期运行的自主智能体
属于 openclaw-inner-life 套件的一部分。