Skip to content

[Agent] MultiAgent and SpeechAgent swallow the updates of the delegated execution #2444

Description

@chr-hertel

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    AgentIssues & PRs about the AI Agent component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions