Agent Wealth HubFree public resources
中文 EN العربية

Back to catalog / Agent workflows

Fan out agent subtasks from items discovered at runtime

Dynamically schedule child nodes when task count depends on data discovered during an agent run, then collect results.

Goal

Process a set of subtasks whose count is known only at runtime without hard-coding a fixed branch count.

Steps

  1. Define the source and maximum size of the dynamic task list; reject unbounded or unauthorized expansion. [dynamic]
  2. Define the parent with @node(rerun_on_resume=True) and schedule each child with await ctx.run_node(child, node_input=item). [dynamic]
  3. Call the dynamic scheduling API for each item in the parent node and preserve input/output association while waiting. [dynamic]
  4. Configure rerun behavior on resume so parent recovery does not duplicate side-effecting subtasks. [dynamic]

How to verify

Dynamic result count matches the authorized list, each result maps to its input, and resume does not replay side effects unexpectedly.

Troubleshooting

If resume duplicates work, set the documented rerun behavior for dynamic parent nodes and add idempotency protection.

Permissions

Prerequisites

Permissions

Limitations

This procedure follows Google ADK at the pinned revision; other versions, models, or remote services may differ in APIs and event semantics. Recheck permissions, retention, and recovery before production.

Pinned upstream source

https://github.com/google/adk-python/blob/e9b74d36140f2594b24c481fb7a3825b2cb01e96/docs/guides/workflow/dynamic_nodes/index.md

Repository
google/adk-python
File path
docs/guides/workflow/dynamic_nodes/index.md
Pinned commit
e9b74d36140f2594b24c481fb7a3825b2cb01e96
Source checked
2026-10-14 · Reviewed against the pinned upstream source

Repository metrics

These values describe the upstream repository, not popularity or likes for an individual skill or playbook.

Stars
Not collected
Forks
Not collected
Observed at
Not collected

No metrics snapshot is available yet.

License: Apache-2.0

Main topic

Turn ecommerce campaign materials into a reviewable weekly brief

Related resources