Back to catalog / Agent workflows
Process independent documents or queries in parallel with a concurrency limit
Run the same agent node for independent list items while limiting concurrency and preserving result order.
Goal
Reduce latency for I/O-bound batch tasks without overwhelming downstream services.
Steps
- Confirm each list item can be processed independently without depending on another item’s writes. [parallel]
- Wrap the per-item function with
@node(parallel_worker=True, max_parallel_workers=4); the worker receives onenode_input. [parallel] - Set a conservative maximum concurrency and verify the input parameter matches the node contract. [parallel]
- Check output order against input order and test cancellation/error propagation when an item fails. [parallel]
How to verify
Result count and order match input, concurrency stays within the limit, and failures are canceled or reported as configured.
Troubleshooting
If input is missing, check the node parameter name; if downstream throttles, lower concurrency and add a total deadline.
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/parallel_worker/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