Pi · 单轮技术链路

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

Pi · 单轮技术链路 从用户输入到模型、工具、持久化与下一步决策 提交 prompt 与 runtime config turn boundary 运行 hooks 构造 tool/context/system 多协议 provider 流式采样 截断响应禁止工具 shared/sequential 调度 精确 Edit 与双向截断 overflow 压缩后重试一次 append-only 事件交付 Context + Sampling Policy + Execution Persist + Decide User · 任务发起者 · Sequence participant User 任务发起者 入口 · Pi CLI / SDK · Sequence participant 入口 Pi CLI / SDK 主循环 · AgentHarness + Core · Sequence participant 主循环 AgentHarness + Core 模型 · Provider Matrix · Sequence participant 模型 Provider Matrix 权限 · Trust / Optional Guard · Sequence participant 权限 Trust / Optional Guard 工具 · Parallel Tool Runtime · Sequence participant 工具 Parallel Tool Runtime 状态 · JSONL Session Tree · Sequence participant 状态 JSONL Session Tree Legend request return security async trace

事实边界

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

执行边界

  • • Trust / Optional Guard
  • • Parallel Tool Runtime
  • • 区分 prompt 约束与代码强制

持续性

  • • Context / Compact
  • • JSONL Session Tree
  • • Subprocess Agent Examples