Since #2436, AgentInterface::call() returns a lazy, iterable Execution reporting every model request, tool call and streamed delta as a Progress update.
The decorating agents resolve the execution of the agent they delegate to eagerly (->getResult()) and only yield the final Result update themselves:
MultiAgent: the orchestrator's routing call, the selected agent's execution and the fallback path
SpeechAgent: the inner agent's execution before the text-to-speech step
So iterating a MultiAgent or SpeechAgent yields no progress at all — not the handoff, not the delegate's tool calls, not its streamed deltas — although the handoff is exactly the thing one would want to observe.
Proposal: iterate the delegated execution and forward every update except its Result, then yield the decorator's own Result (after iteration, getResult() on the delegated execution is the cached value). A dedicated handoff progress stage naming the selected agent would additionally make the routing decision itself visible.
Raised by @wachterjohannes in the review of #2436: #2436 (comment)
Since #2436,
AgentInterface::call()returns a lazy, iterableExecutionreporting every model request, tool call and streamed delta as aProgressupdate.The decorating agents resolve the execution of the agent they delegate to eagerly (
->getResult()) and only yield the finalResultupdate themselves:MultiAgent: the orchestrator's routing call, the selected agent's execution and the fallback pathSpeechAgent: the inner agent's execution before the text-to-speech stepSo iterating a
MultiAgentorSpeechAgentyields no progress at all — not the handoff, not the delegate's tool calls, not its streamed deltas — although the handoff is exactly the thing one would want to observe.Proposal: iterate the delegated execution and forward every update except its
Result, then yield the decorator's ownResult(after iteration,getResult()on the delegated execution is the cached value). A dedicatedhandoffprogress stage naming the selected agent would additionally make the routing decision itself visible.Raised by @wachterjohannes in the review of #2436: #2436 (comment)