Skip to content

调研来源

Agent Runtime v0.1 参考了当前标准和实现模式。这些来源是参考,不是依赖。

标准与协议

Provider 与 framework references

  • OpenAI API streaming reference:response lifecycle、text deltas、output item updates 等 provider stream events。
  • Anthropic Messages streaming:message start、content block start/delta/stop、message delta 和 message stop event structure。
  • Anthropic tool use:tool use 与 tool result blocks 是显式内容,不应只靠 prose 表示执行。
  • Vercel AI SDKstreamTextgenerateObject、tool calls、tool results、steps、stop conditions 和 typed UI messages。
  • LangGraph durable execution:long-running agents 的 persistence、checkpoints、threads、human-in-the-loop 和 time-travel patterns。
  • LangGraph interrupts and streaming:基于 checkpointer 的 interrupts、resume commands、thread ids 和 task-mode streaming。
  • OpenAI Agents SDK:multi-agent workflows 中的 agents、handoffs、sessions、guardrails、tracing spans 和 streaming events。
  • Temporal workflows:workflow ids、run ids、task queues、activities、child workflows、signals、cancellation、retry policies、history 和 durable execution。

设计结论

  • Runtime events 应使用稳定 envelope,但不强制单一传输层。
  • Provider streams 应被适配,而不是直接成为可移植契约。
  • Tool calls 和 human approvals 需要显式 ids 与生命周期记录。
  • Durable snapshots 必需,因为 event streams 不能单独解决 old sessions 或 process restart。
  • Observability correlation 属于 runtime contract,而不只是 logs。
  • Agent-to-agent 工作应建模为带 parent links 的 local tasks、subagents、jobs 或 remote task refs;A2A 是 peer interoperability reference,不替代 runtime facts。
  • Task lifecycle 必须和 todo/checklist state 分离,并保留 attempts、dependencies、waiting reasons 和 delivery state。
  • A2A messages 与 artifacts 支持 Agent Runtime 采用的同一条分离原则:communication 进入 messages 或 channel events,durable outputs 进入与 task 相连的 artifact refs。

Draft standard for portable agent execution runtimes.