Sub-tasks and workflows
Two ways a run is more than one transcript: a parent agent delegating to children, and a fixed pipeline of steps.
Sub-task tree
A parent run fanning out to child agents, updating live. Each child is its own task; the tree shows status, the latest step, and lets you open a child's transcript. Background in Sub-tasks.
Loading the live demo…
SubTaskTree props
| Prop | Type | Notes |
|---|---|---|
rootTaskId | string | Render from this task down. Omit to show every top-level task. |
hideRoot | boolean | Show only the descendants of rootTaskId. |
excludeRootIds | Set<string> | Top-level tasks to leave out. |
messages | DistriChatMessage[] | Messages to attribute to tasks; defaults to the chat store's. |
rendering | 'rich' | 'minimal' | How tool calls inside a child are drawn. |
toolRenderers | ToolRendererMap | Your own renderers, as for ChatMessageList. |
threadId, onShowTrace | Enable trace links per task. |
SubTaskTree reads task summaries from the chat store, so render it inside a
<Chat> or your own ChatStoreContext provider.
Workflow progress
A deterministic workflow streaming its step statuses, pausing on a
wait_for_input step. See Workflows.
Loading the live demo…
WorkflowProgress props
| Prop | Type | Notes |
|---|---|---|
workflow | WorkflowDefinition | Required. Steps with id, label and status. |
detailed | boolean | Show each step's result and error text. |
className | string |