- update_inner_state: LLM can update its own persistent inner state - inner_state injected into chat loop system prompt (read-only) - Life Loop now uses run_openai_with_tools (full tool access) - Life Loop LLM calls wrapped in 120s tokio::time::timeout - All reqwest clients: 120s timeout (whisper: 60s) - doc/life.md: life loop architecture design doc - todo.md: removed completed items
1.3 KiB
1.3 KiB
noc todo
主动行为
- 预设 cron:晨间待办汇总、晚间日记、定期记忆整理
- 事件驱动:监控文件变化、git push、CI 状态等,主动通知
- 情境感知:根据时间、地点、日历自动调整行为
记忆与成长
- AutoMem:后台定时自动分析对话,LLM 决定 SKIP/UPDATE/INSERT 记忆
- 分层记忆:核心记忆(始终注入)+ 长期记忆(RAG 检索)+ scratch(当前任务)
- 语义搜索:基于 embedding 的记忆检索
- 记忆合并:相似记忆 cosine >= 0.7 时 LLM 合并
- 时间衰减:记忆按时间指数衰减加权
- 自我反思:定期回顾对话质量,优化行为
工具系统
- run_code:安全沙箱执行 Python/Shell
- gen_image:图像生成
- web_search:网页搜索 + 摘要(简单场景不必 spawn agent)
感知能力
- 链接预览/摘要
交互体验
- Typing indicator
- 语音回复(TTS → Telegram voice message)
- Inline keyboard 交互
上下文管理
- 智能上下文分配:token 预算制替代硬上限
- Context pruning:只裁工具输出,保留对话文本
可靠性
- API 重试策略(指数退避)
- 用量追踪
- Model failover
- Life Loop / API 调用超时保护