agentleFS
albertoclementealbertoclemente/agentic-design-patterns-skills/skills/agentic-parallelization/SKILL.md

agentic-parallelization

Skill4 starsChanged 5 months agoMITView on GitHub

Executes independent sub-tasks concurrently instead of sequentially, then aggregates results. Use when a workflow has multiple operations that don't depend on each other's output — especially I/O-bound work like calling several APIs or querying multiple sources — so total time is the longest task, not the sum of all of them.

The file

Files
SKILL.md

Parallelization

Agentic Design Pattern 3 of 21 — distilled from Antonio Gulli, Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems (Ch. 3).

What it is. Identify components that don't rely on each other's immediate output, run them concurrently, and wait for all before aggregating (reduce, merge, or vote).

Reach for this when

  • A workflow has multiple genuinely independent operations
  • Tasks are I/O-bound (multiple API calls, database queries, document fetches)
  • You're generating several pieces in parallel for later synthesis
  • Ensembling or majority-voting across generations improves quality

Don't reach for this when

  • Steps depend on each other's outputs -> use agentic-prompt-chaining
  • Rate limits or cost make wide fan-out impractical
  • The aggregation/synthesis logic is the hard part and isn't well defined

Shape of the solution

Fan out the independent calls concurrently, gather results, and reduce. Handle partial failures and per-call timeouts so one slow or failed call doesn't gate the batch. Note that concurrency adds real complexity to design, debugging, and logging — adopt it only where the latency win is worth it.

Common failure modes

  • Weak aggregation undermines the parallel work
  • Cost spikes from wide fan-out
  • Harder debugging and logging under concurrency
  • One slow call stalling the whole batch

Composes with

  • agentic-reflection — critique or vote across candidates
  • agentic-prompt-chaining — a parallel stage inside a chain
  • agentic-resource-aware-optimization — bound fan-out cost

Selection signals live in this skill's description (used for auto-triggering). To choose among all 21 patterns, see agentic-pattern-selector. Conceptual source: Antonio Gulli, Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems, Ch. 3 — original distillation from the text, not reproduced prose, code, or figures.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.