Ai Compound 1.0.1
2026-04-01
新闻来源:网淘吧
围观:31
电脑广告
手机广告
复合工程
让您的AI智能体自动学习。从会话中提取学习成果,更新记忆文件,并随时间积累复合知识。
核心理念:您的智能体审查自身工作,提取模式和经验教训,并更新其指令。明天的智能体将比今天更聪明。

快速开始
# Review last 24 hours and update memory
npx compound-engineering review
# Create hourly memory snapshot
npx compound-engineering snapshot
# Set up automated nightly review (cron)
npx compound-engineering setup-cron
工作原理
复合循环
┌─────────────────────────────────────────┐
│ DAILY WORK │
│ Sessions, chats, tasks, decisions │
└────────────────┬────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ NIGHTLY REVIEW (10:30 PM) │
│ • Scan all sessions from last 24h │
│ • Extract learnings and patterns │
│ • Update MEMORY.md and AGENTS.md │
│ • Commit and push changes │
└────────────────┬────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ NEXT DAY │
│ Agent reads updated instructions │
│ Benefits from yesterday's learnings │
└─────────────────────────────────────────┘
提取内容
- 模式:反复成功的方法
- 陷阱:失败或引发问题的因素
- 偏好:发现的用户偏好
- 决策:关键决策及其推理过程
- 待办事项:需记住的未完成项目
Clawdbot集成
自动每小时记忆
添加到您的HEARTBEAT.md:
# Hourly Memory Snapshot
Every hour, append a brief summary to memory/YYYY-MM-DD.md:
- What was accomplished
- Key decisions made
- Anything to remember
或者使用cron:
# Add to clawdbot config or crontab
0 * * * * clawdbot cron run compound-hourly
夜间回顾任务
将此cron任务添加到Clawdbot:
{
"id": "compound-nightly",
"schedule": "30 22 * * *",
"text": "Review all sessions from the last 24 hours. For each session, extract: 1) Key learnings and patterns, 2) Mistakes or gotchas to avoid, 3) User preferences discovered, 4) Unfinished items. Update MEMORY.md with a summary. Update memory/YYYY-MM-DD.md with details. Commit changes to git."
}
手动回顾命令
当您想要手动触发回顾时:
Review the last 24 hours of work. Extract:
1. **Patterns that worked** - approaches to repeat
2. **Gotchas encountered** - things to avoid
3. **Preferences learned** - user likes/dislikes
4. **Key decisions** - and their reasoning
5. **Open items** - unfinished work
Update:
- MEMORY.md with significant long-term learnings
- memory/YYYY-MM-DD.md with today's details
- AGENTS.md if workflow changes needed
Commit changes with message "compound: daily review YYYY-MM-DD"
记忆文件结构
MEMORY.md(长期)
# Long-Term Memory
## Patterns That Work
- When doing X, always Y first
- User prefers Z approach for...
## Gotchas to Avoid
- Don't do X without checking Y
- API Z has rate limit of...
## User Preferences
- Prefers concise responses
- Timezone: PST
- ...
## Project Context
- Main repo at /path/to/project
- Deploy process is...
memory/YYYY-MM-DD.md(每日)
# 2026-01-28 (Tuesday)
## Sessions
- 09:00 - Built security audit tool
- 14:00 - Published 40 skills to MoltHub
## Decisions
- Chose to batch publish in parallel (5 sub-agents)
- Security tool covers 6 check categories
## Learnings
- ClawdHub publish can timeout, retry with new version
- npm publish hangs sometimes, may need to retry
## Open Items
- [ ] Finish remaining MoltHub uploads
- [ ] Set up analytics tracker
每小时快照
如需更细粒度的记忆,可创建每小时快照:
# Creates memory/YYYY-MM-DD-HH.md every hour
*/60 * * * * echo "## $(date +%H):00 Snapshot" >> ~/clawd/memory/$(date +%Y-%m-%d).md
或者让代理通过心跳检查时间并追加到每日文件中来实现。
复合效应
第1周:代理了解基础知识第2周:代理记住您的偏好
第4周:代理能预判您的需求第2个月:代理成为您工作流程中的专家
知识具有复合效应。每一次学习都会让未来的学习效果更好。
设置脚本
夜间回顾 (launchd - macOS)
<!-- ~/Library/LaunchAgents/com.clawdbot.compound-review.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.clawdbot.compound-review</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/clawdbot</string>
<string>cron</string>
<string>run</string>
<string>compound-nightly</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>22</integer>
<key>Minute</key>
<integer>30</integer>
</dict>
</dict>
</plist>
每小时记忆 (crontab)
# Add with: crontab -e
0 * * * * /opt/homebrew/bin/clawdbot cron run compound-hourly 2>&1 >> ~/clawd/logs/compound.log
最佳实践
- 睡前回顾- 在你结束一天的工作后,让夜间任务自动运行
- 不要过度提取- 专注于重要的学习内容,而非杂音
- 定期修剪- 每月从MEMORY.md中移除过时的信息
- 全部使用Git管理- 记忆文件应进行版本控制
- 相信复合效应- 初期效果微妙,随时间推移将变得显著
由以下团队构建LXGIC Studios-@lxgicstudios
由 LXGIC Studios 构建
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Airc
下一篇:Skill Writer


微信扫一扫,打赏作者吧~