Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
handrew opened this issue May 8, 2025 · 2 comments
Closed
Labels
question Question about using the SDK stale

Comments

@handrew
Copy link
Contributor

handrew commented May 8, 2025

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?

@handrew handrew added the question Question about using the SDK label May 8, 2025
Copy link

This issue is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label May 16, 2025
Copy link

This issue was closed because it has been inactive for 3 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about using the SDK stale
Projects
None yet
Development

No branches or pull requests

1 participant