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
- Define the source and maximum size of the dynamic task list; reject unbounded or unauthorized expansion. [dynamic]
- Define the parent with
@node(rerun_on_resume=True)and schedule each child withawait ctx.run_node(child, node_input=item). [dynamic] - Call the dynamic scheduling API for each item in the parent node and preserve input/output association while waiting. [dynamic]
- 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
- Python 3.11+, google-adk compatible with the pinned revision, and an isolated test environment
- Configured model-provider credentials for live inference; never place them in code or logs
Permissions
- Use authorized test data only; isolate sessions and credentials per user; obtain human authorization before external side effects
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
- 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