suiss/ui · AI
Subagent
A subagent run, with the tool calls it made and what it found.
Subagent is a row for work the agent hands to a subagent. The run is the title, such as "Ran the research agent". Open it for the tool calls the subagent made and what it found.
The run is a TraceCollapsible, and its tool calls are a nested Trace. Each tool call follows the same shape as Tool.
Installation
Subagent is built with the Trace, Code Block and Badge components.
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
Examples
Running
While the subagent runs, the row has status="running" and its content shows the tool calls so far. Add the result when the subagent finishes.
Details
Puts the task the subagent was given at the top of the content, with its model and tools as Badge items, and how long it ran in a TraceDescription after the title.
AI SDK
With the AI SDK, a subagent is a tool whose execute yields the subagent's UIMessage as it streams. Render the tool part as the row and part.output.parts as the nested Trace.
Each yield is a preliminary output: the part is output-available with preliminary: true. The final output replaces it, so check preliminary before you show "Ran".
| Tool part state | TraceLine status | Title |
|---|---|---|
input-streaming, input-available | running while the chat streams | Running … |
output-available with preliminary: true | running while the chat streams | Running … |
output-available | — | Ran … |
output-error, or a running state after the chat stops | error | Failed to run … |
API Reference
See Trace, Code Block and Badge.