Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part III · Making Agents Think and Work

Chapter 16: Parallelism

Central questionWhen can independent work run concurrently, and how should multiple results be recombined into one reliable outcome?

Lecture

Chapter principle

Parallelise independent work. Preserve ordering where dependencies exist. Parallelism changes time. Fan-out and fan-in change both time and coordination.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 29: Doing things at the same time

When does doing things at the same time help, and when does it break?

A real model answers three short, independent questions, first one after another, then all at once. Then comes a task with a dependency: convert 100 dollars to euros, which needs an exchange rate from a slow service. It runs three times the wrong way, with the conversion started at the same moment as the rate request, and once the right way, rate first. This is a recorded run of a real model. Times and wording will differ in a new run. Because calls overlap, steps from different calls appear interleaved.

Experiment 30: Fan out, then combine

When several reviewers work in parallel, how should their findings be combined?

Three real models review the same business proposal at the same time: one for finance, one for risk, one for operations. Each names the single most important issue. The proposal has three problems: an optimistic margin, a single supplier, and a lease that takes longer than the time left before Q3. Two ways of combining the reviews are compared on the same results. Then the review runs again with the operations reviewer given only 0.01 seconds, so it times out. This is a recorded run of real models. A new run will word things differently. The reviewers run at once, so their steps appear interleaved.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 16 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 15: RoutingChapter 17: An Agent Is Just Another Tool →