Skip to content

Suggestions for using user feedback as tools? #1186

@domino14

Description

@domino14

Question

Hi, we are working on an app using the Agents SDK. We want it to have a traditional web app interface with SSE for getting streaming results back.

While the agent is running, the main agent (or handoff subagents) will often require the user to answer some clarification questions. We are wondering what are some good practices for implementing this with the Agents SDK.

If we implement the "ask user question" as a tool call, then this approach doesn't seem to work well because it has to wait on user feedback to continue. It seems like it would potentially have to block on this operation. We'd prefer it to be a traditional turn-taking system where the Agent is temporarily done, waiting for user feedback, and then the user can respond, and then the agent can continue. But it is not clear how to do this. Is there a way to force an "ask user question" tool to return immediately and end the agent run, and then a user message would restart the agent run at the right spot (perhaps using the Sessions functionality)?

Or is there a better suggested way to do this? Any thoughts / guidance are greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions