Skip to content

Input format in agent as tool #655

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

Open
HGF1KOR opened this issue May 6, 2025 · 3 comments
Open

Input format in agent as tool #655

HGF1KOR opened this issue May 6, 2025 · 3 comments
Labels
question Question about using the SDK stale

Comments

@HGF1KOR
Copy link

HGF1KOR commented May 6, 2025

Please read this first

  • Have you read the docs?Agents SDK docs :yes
  • Have you searched for related issues? Others may have had similar requests:Yes

Question

Does this library support setting up input formats for inputs to an agent.as_tool? When we rely only on the prompt to define what should be passed to the agent, it's not consistent and sometimes fails. In a typical tool call, I believe the arguments and type hints are parsed, and a Pydantic BaseModel is created, which then gets converted to a JSON schema—so the system understands what input is expected. Don't we have a similar option to define the input description and input schema when using an agent as a tool?

@HGF1KOR HGF1KOR added the question Question about using the SDK label May 6, 2025
@pakrym-oai
Copy link
Contributor

You can achieve the same by defining your own tool function and calling Runner.run there.

Agent.as_tool is just a very thin wrapper around a Runner.run call.

@HGF1KOR
Copy link
Author

HGF1KOR commented May 14, 2025

@pakrym-oai Then can you suggest , how would we stream results from the tools into the main agent ? cause streaming is a must in our case

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 22, 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

2 participants