Quick summary · Chapter 9

Orchestration and Agentic Topologies

Timothy O’Brien 3 min read 0 diagrams

The essential ideas, decisions, and diagrams from this chapter. Follow the section links for the examples, calculations, and fuller argument.

The main idea

A customer asks for a refund. Imagine the support assistant looking up the account, drafting a reply and checking the refund rule. It also updates its memory and writes a trace of the work. What the customer sees is one answer. What we pay for depends on all the systems it called to come up with it.

The first version may have a small memory store, a tool server and a gateway. As it grows, the history gets longer and the agent reads it again every turn. A retry may repeat work at several layers, while an agent waiting for a person can tie up a sandbox for hours. A failed memory write can leave the application running and answering badly. Each behavior has a different cost, and each leads to a different decision about what the team should change.

Explore this in the full chapter →

Topologies

An agent may work alone with tools, pass work through a pipeline, or delegate to parallel workers. Each arrangement changes context reuse, latency and coordination. None is reliably the cheapest: isolating a subtask can avoid replaying irrelevant context, while unnecessary delegation can duplicate it. Even a single agent can accumulate substantial input consumption by repeatedly sending its growing history.

Explore this in the full chapter →

The operating inventory

I would use an inventory like this when a workflow’s cost starts to rise. It helps trace each charge to the part of the application that can explain it.

Component What it is Consumption scales with Bill shape
Model gateway Routing, retries and fallbacks Traffic × retries at the gateway Gateway tier, request charges or self-run compute; model charges remain separate
Prompt cache Reuse of identical prompt prefixes Repeated prefixes within the cache lifetime Premium on writes, discount on reads; reads may not count toward rate limits1
Session store Conversation state with time-to-live expiry Concurrent sessions × retention Stored state and infrastructure; expiry is a policy choice
Memory service Extracted facts, episodes and instructions Writes × model calls per write; retained history Extraction and embedding calls, retrieval queries, storage under the retention policy
Vector database Similarity search over embeddings Vectors × dimensions × replicas, plus query rate RAM-heavy nodes or hosted tiers
Graph database Entities and relationships, sometimes with validity intervals Entities × traversal rate; superseded facts if kept Licensing varies by engine; self-hosting is an operations obligation
Tool/MCP servers Structured access to external systems Agent activity × tools per step × retries Per-seat or per-call hosted, or self-run processes; downstream charges separate
Sandbox runners Isolated execution for generated code Arrival rate × holding time, including waits Compute time or session charges; startup and expiry affect cost
Observability Traces of agent steps and tool calls Agent activity × sampling rate Ingestion plus storage; sampling is a cost decision

Explore this in the full chapter →

What the review inherits

A monthly review is a good place to ask why the assistant costs more to run. It is a poor place to discover that the tracing team and the team that runs the models count different work. Tie the events back to the same task and owner before bringing the figures to the people who know the workflow. Otherwise, the many small calls add up to a bill that nobody can explain, a familiar long-tail problem in Volume II, Chapter 15.

I would start with the tasks customers accepted and those the assistant abandoned. If an expensive run spent two hours waiting for approval, ask who can release the sandbox. If it repeatedly failed at the same tool call, find out which layer can stop the retries. Where the bill includes a growing memory store, ask the owner which history the work still needs and whether deletion reaches the indexes, history and backups. Chapter 22 of Volume II gives those owners a place to make the decisions together.

Explore this in the full chapter →


  1. Anthropic, “Prompt caching” and “Rate limits”, checked October 4, 2026. Five-minute writes at 1.25 times the base input price, one-hour writes at 2 times, reads at 0.1 times (less on some newer models); hits need identical prefixes; on most models, cached reads do not count toward input-tokens-per-minute limits. Provider-specific and subject to change.↩︎