Prime Agent · 单轮技术链路

从用户输入到模型、工具、持久化与下一步决策

Prime Agent · 单轮技术链路 从用户输入到模型、工具、持久化与下一步决策 提交 prompt 与 session config AgentSession 装配 tools/resources transform context 后请求 provider 流式返回 text/thinking/tool call 参数验证与 before hook 串行/并行执行并跑 after hook steer/follow-up/continuation compact 并写 JSONL tree RLM/daemon observe、recover 或结束 Context + Sampling Policy + Execution Persist + Decide User · 任务发起者 · Sequence participant User 任务发起者 入口 · TUI / RPC / Print · Sequence participant 入口 TUI / RPC / Print 主循环 · AgentSession · Sequence participant 主循环 AgentSession 模型 · Provider Stream · Sequence participant 模型 Provider Stream 权限 · Compaction / Context · Sequence participant 权限 Compaction / Context 工具 · Tool Hooks · Sequence participant 工具 Tool Hooks 状态 · Extensions / MCP / Skills · Sequence participant 状态 Extensions / MCP / Skills Legend request return security async trace

事实边界

  • • commit a3b3e753490d
  • • 箭头来自源码结论,不代表远端服务内部
  • • 详细证据见正文代码摘录

执行边界

  • • Compaction / Context
  • • Tool Hooks
  • • 区分 prompt 约束与代码强制

持续性

  • • Agent Loop
  • • Extensions / MCP / Skills
  • • RLM / Daemon / JSONL