self-reflection
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese🪞 Self-Reflection
🪞 自我复盘
A skill for continuous self-improvement. The agent tracks mistakes, lessons learned, and improvements over time through regular heartbeat-triggered reflections.
一款用于实现持续自我提升的skill。Agent会通过定期的心跳触发复盘,追踪错误、学到的经验以及随时间推移的改进情况。
Quick Start
快速开始
bash
undefinedbash
undefinedCheck if reflection is needed
Check if reflection is needed
self-reflection check
self-reflection check
Log a new reflection
Log a new reflection
self-reflection log "error-handling" "Forgot timeout on API call" "Always add timeout=30"
self-reflection log "error-handling" "Forgot timeout on API call" "Always add timeout=30"
Read recent lessons
Read recent lessons
self-reflection read
self-reflection read
View statistics
View statistics
self-reflection stats
undefinedself-reflection stats
undefinedHow It Works
工作原理
Heartbeat (60m) → Agent reads HEARTBEAT.md → Runs self-reflection check
│
┌─────────┴─────────┐
▼ ▼
OK ALERT
│ │
Continue Reflect
│
┌─────────┴─────────┐
▼ ▼
read log
(past lessons) (new insights)心跳(60m)→ Agent读取HEARTBEAT.md → 运行self-reflection check
│
┌─────────┴─────────┐
▼ ▼
OK ALERT
│ │
继续执行 进行复盘
│
┌─────────┴─────────┐
▼ ▼
读取 记录
(过往经验教训) (新的洞察)Commands
命令
| Command | Description |
|---|---|
| Check if reflection is due (OK or ALERT) |
| Log a new reflection |
| Read last n reflections (default: 5) |
| Show reflection statistics |
| Reset the timer |
| Command | Description |
|---|---|
| 检查是否到了复盘时间(返回OK或ALERT) |
| 记录一条新的复盘内容 |
| 读取最近n条复盘记录(默认值:5) |
| 展示复盘统计数据 |
| 重置计时器 |
OpenClaw Integration
OpenClaw集成
Enable heartbeat in :
~/.openclaw/openclaw.jsonjson
{
"agents": {
"defaults": {
"heartbeat": {
"every": "60m",
"activeHours": { "start": "08:00", "end": "22:00" }
}
}
}
}Add to your workspace :
HEARTBEAT.mdmarkdown
undefined在中启用心跳功能:
~/.openclaw/openclaw.jsonjson
{
"agents": {
"defaults": {
"heartbeat": {
"every": "60m",
"activeHours": { "start": "08:00", "end": "22:00" }
}
}
}
}添加到你的工作区:
HEARTBEAT.mdmarkdown
undefinedSelf-Reflection Check (required)
Self-Reflection Check (required)
Run at each heartbeat.
If ALERT: read past lessons, reflect, then log insights.
self-reflection checkundefinedRun at each heartbeat.
If ALERT: read past lessons, reflect, then log insights.
self-reflection checkundefinedConfiguration
配置
Create :
~/.openclaw/self-reflection.jsonjson
{
"threshold_minutes": 60,
"memory_file": "~/workspace/memory/self-review.md",
"state_file": "~/.openclaw/self-review-state.json",
"max_entries_context": 5
}创建:
~/.openclaw/self-reflection.jsonjson
{
"threshold_minutes": 60,
"memory_file": "~/workspace/memory/self-review.md",
"state_file": "~/.openclaw/self-review-state.json",
"max_entries_context": 5
}Author
作者
License
许可证
MIT
MIT