Skip to content

Question: Use N parallel tools/AgentTools deterministicly, determined at runtime #1351

Closed

Description

@rayanehmi

Does anyone know what is the recommended strategy to run N parallel web searches without knowing N in advance ? I want to maintain the standard Google ADK agent structure (root_agent) so I can use it in the Web UI. I need the parallelism because latency is critical.

Example: the user gives a list of N names. The agent (or deterministic workflow) runs N parallel web searches, one per person.

Activity

  1. kanlanc commented on Jun 13, 2025

    @kanlanc

    Were you able to figure this out?

  2. added
    question[Component] This issue is asking a question or clarification
    on Jun 13, 2025
  3. rayanehmi commented on Jun 16, 2025

    @rayanehmi
    Author

    Not yet 😓 A native feature or guide for it would be great.

    I found this tutorial on the OpenAI cookbook. I will give it a shot next time I work on this and report back if it works. Otherwise, I'm still open to suggestions

  4. surfiniaburger commented on Jun 18, 2025

    @surfiniaburger

    use a custom agent and add the parallel agent in the custom agent. in the run async method you can define a python script to run for N times.

  5. surfiniaburger commented on Jun 18, 2025

    @surfiniaburger

    Or preferable define the N condition in a python function and add it to a custom agent. No parallel agent explicitly required.

  6. locked and limited conversation to collaborators on Jul 12, 2025
  7. converted this issue into a discussion #1928 on Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question[Component] This issue is asking a question or clarification

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions