Skip to main content

Subagent List

When the main agent spawns subagents via the Agent tool, the SDK accumulates each into a docked panel showing its status (running / completed / failed / cancelled) and the child tools it ran.

Subagent List

When the main agent spawns subagents via the Agent tool, the SDK accumulates each into a docked panel showing its status (running / completed / failed / cancelled) and the child tools it ran. Status is driven by subagent.start / complete events, not the Agent tool's own completion.

// Docked panel appears automatically; localize via locale
<Chatbot
  locale="en-US"
  config={{ botProviderEndpoint: '...' }}
  customChannelId="my-channel"
/>

The Agent tool and every child tool (carrying parentToolUseId) are routed out of the main tool-call group into the docked subagent panel. Labels follow the locale prop.

Loading chatbot...

How It Works

  • A subagent's status is driven by the asgard.subagent.start / .complete events, not by the Agent tool's own completion — async subagents often complete the Agent tool early while they are still running.
  • The correlation key is parentToolUseId (the toolUseId of the spawning Agent tool call).
  • The Agent tool and every child tool (carrying parentToolUseId) are routed out of the main tool-call group into the docked <SubagentList> panel; panel labels follow the locale prop.

Headless Usage

Without <Chatbot>, use the useSubagents(channel) hook to get Subagent[] and render it yourself; the framework-agnostic building block is deriveSubagents(conversation) from @asgard-js/core. See Headless.

See Also