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

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

  1. Confirm each list item can be processed independently without depending on another item’s writes. [parallel]
  2. Wrap the per-item function with @node(parallel_worker=True, max_parallel_workers=4); the worker receives one node_input. [parallel]
  3. Set a conservative maximum concurrency and verify the input parameter matches the node contract. [parallel]
  4. 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

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/parallel_worker/index.md

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

Related resources