Skip to content

Execution Graph

ExecutionGraphView 渲染 ExecutionGraphNode[],用于表达 turn、run、task、subagent、tool、action 等结构关系。

实现锚点:packages/agent-runtime-ui/src/executionGraph.tsx

Props

ts
export interface ExecutionGraphViewProps {
  nodes?: readonly ExecutionGraphNode[];
  empty?: ReactNode;
  ariaLabel?: string;
  nodeTitle?: (node: ExecutionGraphNode) => ReactNode;
  nodeMeta?: (node: ExecutionGraphNode) => ReactNode;
}

Node Shape

ts
export interface ExecutionGraphNode {
  nodeId: string;
  parentId?: string;
  nodeType: ExecutionGraphNodeType;
  status: AgentRuntimeExecutionEventStatus;
  title: string;
  refs: string[];
  sourceEventIds: string[];
  createdAt?: string;
  completedAt?: string;
}

Node Types

TypeScope
turnturnId
runrunId
tasktaskId
subagentsubagentId
jobexternal job id
attemptattemptId
stepstepId
tooltoolCallId
actionactionId

Example

tsx
<ExecutionGraphView
  nodes={state.graph}
  nodeMeta={(node) => `${node.nodeType} · ${node.status}`}
/>

Subagent Rules

  • Subagent node 必须来自 runtime fact 的 subagentId
  • Parent edge 应来自 taskIdrunId 或 explicit parent payload。
  • 缺少 lineage 时显示 degraded diagnostics,不伪造 teammate。
  • Review / handoff 通过 evidence refs 或 action refs 关联,不写在 React local state。

Lime Agent Workbench 是面向 Lime AgentRuntime 与 AgentUI 的治理优先标准。