Skip to content

Question about streaming for subagents and tools, and tool hallucinations #667

Closed as not planned
@handrew

Description

@handrew

Narrowly, my question is whether it's possible for agents-as-tools or agent handoffs to stream their results. In the former case, I believe the answer is no - subagents are treated as functions and their text responses do not necessarily flow through to the text streaming of the main agent that's being run.

The motivation for asking is that sometimes the agent will hallucinate a tool call, claiming that it has performed an action when it has not. Some discourse around the Manus architecture suggests that you can get around this by forcing tool use. Obviously, when you do this, you remove the agent's ability to communicate in natural language, so you have to reintroduce a tool that enables it to say things to the user. If you wanted to do this with the Agent SDK today, I don't think it would be possible to stream the results from the function call.

Along these lines: is it true in fact that you can't stream back text from a function call with the agents SDK? How would you recommend I handle tool hallucinations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDKstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions