class CustomStreamOrchestratorCurrently active subagents (where status === "running").
Use this to track and display subagents that are actively executing. Completed or errored subagents are not included.
// Show loading indicators for active subagents
stream.activeSubagents.map(subagent => (
<SubagentCard
key={subagent.id}
type={subagent.toolCall.args.subagent_type}
isLoading={true}
/>
));The current branch of the thread. Used for navigating between different conversation branches.
Last seen error from the stream, if any.
Reset to undefined when a new stream starts.
Current interrupt, if the stream is interrupted.
Convenience alias for interrupts[0].
For workflows with multiple concurrent interrupts, use interrupts instead.
All current interrupts from the stream. When using Send() fan-out with per-task interrupt() calls, multiple interrupts may be pending simultaneously.
Whether the stream is currently running.
true while streaming, false when idle or completed.
All currently active and completed subagent streams.
Keyed by tool call ID for easy lookup. Includes subagents in all states: pending, running, complete, and error.
// Iterate over all subagents
stream.subagents.forEach((subagent, toolCallId) => {
console.log(`Subagent ${toolCallId}: ${subagent.status}`);
});
// Get a specific subagent
const specific = stream.subagents.get("call_abc123");Tool calls paired with their results.
Each entry contains the tool call request and its corresponding result. Useful for rendering tool invocations and their outputs together.
stream.toolCalls.map(({ call, result }) => (
<ToolCallCard
name={call.name}
args={call.args}
result={result}
/>
));The current state values of the stream. Updated as streaming events are received.
Framework-agnostic orchestrator for custom transport streams.
Encapsulates all business logic shared across React, Vue, Svelte, and Angular for custom transport (non-LGP) streaming.