Skip to content

观测概览

语言:English · 中文

Agently 里有几种看起来像“事件”的接口。它们相关,但职责不同。

接口归属用途去读
RuntimeEventEvent Center框架级事件,例如模型请求、Session、Action 调用、TriggerFlow lifecycle。DevTools 接收由 RuntimeEvent 派生出的 ObservationEvent 投影。Event Center
TriggerFlow emit / whenTriggerFlow execution单个 execution 内的控制流信号TriggerFlow 事件与流
TriggerFlow runtime streamTriggerFlow execution给 UI、SSE、日志或 wrapper 消费的 live data itemTriggerFlow 事件与流
DevToolsagently-devtools companion package可视化运行、上传 observation、执行 evaluation、暴露交互式 wrapperDevTools
Coding-agent 指引Agently-Skills companion repo给 Codex、Claude Code、Cursor 等工具提供当前框架指引Coding Agents

判断方法

  • 想消费框架 RuntimeEvent、不改变业务行为,用 Event Center。
  • 事件会改变 flow 里的下一步走向,用 TriggerFlow emit / when
  • chunk 要把 live 输出推给外部消费者,用 TriggerFlow runtime stream。
  • 想要现成的观测、评估或交互 UI,用 DevTools。

RuntimeEvent 的源码结构在 agently/types/data/event.py,事件分发在 agently/core/Runtime/EventCenter.py。DevTools 示例在 examples/devtools/