bodhi-realtime-agent / runSubagent
Function: runSubagent()
runSubagent(
options):Promise<SubagentResult>
Defined in: agent/subagent-runner.ts:141
Execute a background subagent using the Vercel AI SDK's generateText. Fires onSubagentStep hooks after each LLM step. Returns the final text result and step count.
When config.interactive is true and a session is provided, an ask_user tool is injected and this function owns the session's terminal transitions (complete on success, cancel on error).
Parameters
options
Returns
Promise<SubagentResult>