ReactLoopAgent 真实代码路径: turn → step → 回灌循环 → turn 结束

节点即真实方法/事件名; 压缩在 pre-step 与 request-error 两个钩子上触发

ReactLoopAgent 真实代码路径: turn → step → 回灌循环 → turn 结束 节点即真实方法/事件名; 压缩在 pre-step 与 request-error 两个钩子上触发 01 / agent-loop (ReactLoopAgent) 02 / compaction-basic (旁路) Turn 开始 Step 循环 (while true) 结束 Inbox · send() · agent-loop (ReactLoopAgent) › Turn 开始 Inbox send() preStep() · agent/pre-step · agent-loop (ReactLoopAgent) › Step 循环 (while true) preStep() agent/pre-step step(): stream · assistant/chunk · agent-loop (ReactLoopAgent) › Step 循环 (while true) step(): stream assistant/chunk tool 执行 · executeToolCalls · agent-loop (ReactLoopAgent) › Step 循环 (while true) tool 执行 executeToolCalls turn/end · completed · agent-loop (ReactLoopAgent) › 结束 turn/end completed 压缩 · ≥0.8×窗口 · compaction-basic (旁路) › Step 循环 (while true) 压缩 ≥0.8×窗口 摘要替换 turn/start tool-call 压力 注入 无工具 回灌 图例 用户界面 Agent 逻辑 策略 云服务 外部系统