Skip to main content

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​

PropTypeNotes
rootTaskIdstringRender from this task down. Omit to show every top-level task.
hideRootbooleanShow only the descendants of rootTaskId.
excludeRootIdsSet<string>Top-level tasks to leave out.
messagesDistriChatMessage[]Messages to attribute to tasks; defaults to the chat store's.
rendering'rich' | 'minimal'How tool calls inside a child are drawn.
toolRenderersToolRendererMapYour own renderers, as for ChatMessageList.
threadId, onShowTraceEnable 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​

PropTypeNotes
workflowWorkflowDefinitionRequired. Steps with id, label and status.
detailedbooleanShow each step's result and error text.
classNamestring