Open History to see the last commit
function runAgentStream(
agent,
input,
sink?,
parentToolCallId?,
binding?): AsyncIterable<AGUIEvent>;
Defined in: packages/ai/src/activities/chat/agents/spawn.ts:732
Run one agent and stream its chunks, from SUBAGENT_STARTED to
SUBAGENT_FINISHED or SUBAGENT_ERROR. The package root exports this
as runAgentStream. The caller checks ctx.input against
agent.inputSchema first. Pass createSubagentSink() to keep the
child's interrupt objects and token usage. The finished event carries
interruptIds only.
Parameters#
agent#
input#
sink?#
parentToolCallId?#
string
binding?#
Returns#
AsyncIterable<AGUIEvent>