Skip to content
Forward Deployed

Forward Deployed

Travel Agent: the 12-Part Framework Worked Through

Critique a five-agent travel assistant whose draft pipeline does not match how agents run, then redraw it cache-first with agent-owned tools and a synthesiser.

Kind
Case study
Level
Foundation
View
Interview prep
Sections
4
By
Sourav Banerjee
Last updated
20 Nov 2026

Report an issue

Interview view. The case brief, design walkthrough, technical deep dives and quick review, condensed into bullets, tables and lines to say out loud, with interactive diagrams to step through.

Want to go deep? The full casebook has the complete reasoning in prose, the original diagrams, practice questions with worked answers and the sources.

Case brief

The case in one line: critique a multi-agent travel assistant whose diagram runs every agent through one shared pipeline, name its five faults and redraw it so the drawing matches how agents actually run.

30-Second Cheat Sheet

  • The product: an AI assistant for travel customers in three regions: AMER, EMEA and APJ.
  • The team of agents: five specialists (Search, Booking, Pricing, Recommendation, Policy), a supervisor that starts them and a synthesiser that merges their results.
  • The draft's flaw: every request passed through one shared cache, one retrieval stage, one LLM step and one tool-calling stage, in that order.
  • The hard constraint: the diagram has to match how agents run. Each agent loops on its own, calls its own tools and finishes at its own pace.
  • The evidence: two independent reviews found five places where the draft broke that rule.
  • The core idea: check the cache first, start only the agents a query needs, and let a synthesiser settle what they return.
  • Your task: name the five faults, give each fix, redraw the design, then defend three trade-offs.
  • No human approval step: the user gets the synthesised reply directly, so the synthesiser is where conflicts get settled.

1. A Travel Assistant Whose Diagram Does Not Match How Agents Run

The product

  • A travel company wants an AI assistant for customers in three regions:
    • AMER: the Americas.
    • EMEA: Europe, the Middle East and Africa.
    • APJ: Asia Pacific and Japan.
  • Five specialist agents share the work:
Agent Job
Search Finds flights and hotels
Booking Reserves and pays
Pricing Quotes fares
Recommendation Suggests trips
Policy Applies the company's travel rules

The terms that carry the whole case

Term Meaning
Agent A program built around an LLM (large language model) that works in a loop: read the task, decide a step, call a tool, read the result, decide again until done
Supervisor The agent that decides which specialists to start
Synthesiser The agent that merges what the specialists return into one reply
Semantic cache Stores earlier answers and returns one for a question that means the same thing, even when the wording differs

What went wrong in the first draft

  • The draft ran every request through, in order:
    1. One shared cache.
    2. One retrieval stage.
    3. One LLM step.
    4. One tool-calling stage.
  • The hard constraint: the diagram has to match how agents actually run.
    • Each agent loops on its own, calls its own tools and finishes at its own pace.
    • So a single shared pipeline either wastes work or holds it up.
  • Two independent reviews found five places where the draft broke that rule.
  • This case takes the draft apart and redraws it.

The core idea (the source's figure, as a flow)

Request → Gateway (rate limiting) → Semantic cache

  • Hit → straight to the Reply.

  • Miss → Supervisor (starts only the agents needed) → Synthesiser (merges results, settles conflicts) → Reply.

  • The cache sits before the supervisor, so a repeated question never reaches an agent.

  • The supervisor starts a subset of specialists, not all five.

  • Nothing reaches the user until the synthesiser has merged the outputs.

Soundbite: "Check the cache first, start only the agents a query needs, and let a synthesiser settle what they return."


2. Follow One Request Through Both Drawings

Caveat: the source gives no sample query. This one is the casebook's illustration.

The request: a traveller in Frankfurt asks, "Book me a flight to Singapore next Tuesday that fits my company's travel policy."

In the first draft

  1. The gateway passes the request on and all five agents start, including Recommendation, which this request doesn't need.
  2. Only after they've all run does the request reach the shared cache.
    • Even if the same question was answered an hour ago, the work is already spent.
  3. Every agent queries the vector database (a store that finds text by meaning), whether it needs travel content or not.
  4. Booking can't call the flight or payment service until the single tool-calling stage, which comes after every agent finishes.
  5. Nothing in the drawing says what happens when Booking picks a fare and Policy says that fare breaks the company's rules.

In the corrected design

  1. The gateway checks the request against its rate limit.
  2. The supervisor looks in the semantic cache before anything else. Suppose it misses.
  3. The supervisor starts Search, Pricing, Booking and Policy. Recommendation stays idle.
  4. Search queries the EMEA vector store for route content inside its own loop.
  5. Booking checks availability and holds a fare through the Flight server when its own work reaches that point. It doesn't pay yet.
  6. The synthesiser collects the four results.
    • If Policy rules against Booking's choice, Policy wins, the hold is released and the user sees one consistent answer.
  7. Only a fare Policy has cleared goes on to payment, as one idempotent step.
  8. Cache write-back:
    • The reusable part (route and policy guidance) may be saved.
    • The traveller's booking and payment details never are.

No human approval step

  • The source design has no human approval step.
  • The user receives the synthesised reply directly.
  • So the synthesiser is where conflicting results must be settled.

3. What You Need to Work Through

The task

  1. Critique the first draft.
  2. Name its five structural faults.
  3. Explain the fix for each.
  4. Redraw the corrected architecture.
  5. Defend three trade-offs:
    • Shared or per-agent retrieval.
    • Regional or global data stores.
    • When another agent is worth its coordination cost.

Who it's for

  • Engineers preparing for Forward Deployed, solutions or applied-AI engineering interviews.
  • Especially a round that hands you a multi-agent diagram to critique, or asks you to draw one under time pressure.
  • After it, you should be able to put the same five questions to any multi-agent diagram, your own included.

What it assumes you know

  • AI agents, retrieval and tool calling.
  • The source asks you to read The Twelve-Part Design Framework and Design Principles as Tie-Breakers (in its Learn section) first.
    • This case applies their principles to one diagram and doesn't reproduce them.

How to use it

  • Spot each fault yourself before you read its fix.
  • At the corrected architecture, redraw it from memory and compare it with the figure.
  • Come back to the level calibration in the full casebook the night before an interview.

How the source was merged

Original part What it held Where it went
Worked Example (mandatory) The draft, the five fixes, the corrected design, trade-offs, the interview lens, a checkpoint and level calibration The walkthrough follows it
12-Part Framework write-up (optional) The corrected design restated as one reference Its extra detail sits in the walkthrough steps and deep dives

Quick Recall: Lines to Say in the Interview

  • "The diagram has to match how agents actually run: each loops on its own and finishes at its own pace."
  • "A single shared pipeline either wastes work or holds it up."
  • "Check the cache first, start only the agents a query needs, let a synthesiser settle what they return."
  • "A repeated question never reaches an agent, because the cache sits before the supervisor."
  • "Booking holds the fare; it pays only after Policy clears it, as one idempotent step."
  • "If Policy rules against Booking, Policy wins and the hold is released."
  • "Booking and payment details never go into the cache."
  • "There's no human approval step, so the synthesiser is where conflicts get settled."

Design walkthrough

The goal: take the rigid draft apart fault by fault, redraw it so each agent runs its own loop, and turn the five fixes into questions you can put to any multi-agent diagram.

30-Second Cheat Sheet

  • The draft is a rigid pipeline: five agents fan out, then squeeze through one cache, one retrieval stage, one LLM step, one tool stage.
  • Fault 1: a rate limiter box that leads nowhere. Fix: rate limiting inside the API gateway.
  • Fault 2: the cache after the agents. Fix: the supervisor checks the cache first; a hit spawns no agent.
  • Fault 3: retrieval forced on every agent. Fix: each agent retrieves in its own loop, only when needed.
  • Fault 4: one shared LLM and tool turn. Fix: a shared backend each agent calls on demand.
  • Fault 5: no merge step. Fix: a named synthesiser that settles conflicts (Policy overrides Booking).
  • Data flow: still ten steps, new order: the cache check comes before any agent decision.
  • Carry out of the room: the five review questions, one per fault.

1. Read the Draft as a Pipeline

  • Why start from the draft: principles stay abstract until you watch them repair a real diagram.
  • What the draft was: a rigid pipeline.
    • Five agents fanned out.
    • Then all their work squeezed through, one after another:
      1. A single shared cache.
      2. A single retrieval stage.
      3. A single LLM step.
      4. A single tool-calling stage.

The draft as a picture (casebook's reconstruction)

Caveat: this redraw is an illustration made for the casebook from the source's description, not an original source figure.

Load balancer → (Rate limiter, no exit) · five agents fan out → shared cache → retrieval → LLM step → tool calling → reply (no named merge)

Marker Fault
1 A rate limiter with no exit
2 The cache after the agents
3 One compulsory retrieval stage
4 One shared LLM step and one shared tool stage
5 No named merge before the reply

Why study it

  • Most first-pass multi-agent sketches repeat the same five faults, including the ones you'll draw under time pressure.
  • Keep the habit of spotting them. The fixed diagram matters less.

Where the five faults came from

Review What it found
Architecture review of the draft The first four faults
Separate blueprint, written independently The same four, plus the fifth: a named synthesiser to fill the missing aggregation step
  • The corrected design combines all five.

2. Fault 1: a Rate Limiter That Leads Nowhere

  • The draft: a Rate Limiter box hung off the load balancer, side by side with the gateway.
    • No line left it, so anything sent there went nowhere. A dead end.
  • Why that's wrong: rate limiting is a rule the gateway applies to every request, not a route a request takes.
    • A separate box implies a component requests travel through.
    • Rate limiting is a behaviour of the component they already travel through.
  • The fix: move it inside the API gateway.
    • The gateway becomes the single policy layer for routing, request validation and throttling.

Throttling = refusing or delaying requests over a set rate.

  • You can still run rate limiting as its own service behind the scenes.
  • What the diagram must show: where it's enforced, on the one path every request takes, with no extra hop.

Soundbite: "Rate limiting is a rule the gateway applies to every request, not a box that leads nowhere."


3. Fault 2: a Cache Behind the Work It Should Avoid

  • The draft: the cache sat behind the five agents, consulted only after they'd all run.
  • Why that's wrong: a cache exists to cut LLM latency and cost.
    • It can only do that if it comes before the costly work.
    • A hit after all five agents have run avoids nothing.
  • The fix: the cache is the first thing the supervisor checks.
    • Make the check plain code that runs before the supervisor's own model call.
    • Why: if the supervisor is itself an LLM agent, a lookup after it reasons about the query has already spent one model call.
  • The two outcomes:
    • Hit → the stored answer goes straight back, no agent is spawned at all.
    • Miss → the supervisor goes on to choose which specialists to start.

Short-circuiting (the 12-part framework's term) = ending a request early when a cheaper path already has the answer.

  • The placement decides whether the cache saves money or nothing.

Trace both paths with the Frankfurt request

Path What happens Cost
Equivalent question answered recently The cache returns that answer One cache lookup
No match The lookup adds a small delay, then the request continues to the supervisor Lookup + normal run
  • The cache only stays useful if the synthesised reply is written back at the end (step 6 adds this).

The open question

  • Which queries may be served from the cache at all?
    • The source leaves it open.
    • Its level calibration counts it as a gap in a senior answer.
    • See the semantic cache deep dive.

Soundbite: "The cache's placement decides whether it saves money or nothing."


4. Fault 3: Retrieval Forced on Every Agent

  • The draft: a single compulsory retrieval box after all five agents.
    • So every agent queried the vector database, whether it needed to or not.
  • Why that's wrong: the agents' needs differ.
Agent Needs retrieval? Why
Search Yes Draws on regional travel content: destination guides, route information
Recommendation Yes Same regional travel content
Booking Rarely Works through booking and payment services
Policy Rarely Applies rules

RAG (retrieval-augmented generation) = fetch the relevant documents first, then have the model answer from them. It only helps an agent whose task needs documents.

  • The fix: each agent calls retrieval itself, within its own loop, only when its task calls for it.
    • Retrieval becomes a tool an agent can choose, not a stage the request must pass.
  • Frankfurt trace: Search queries the EMEA store; Booking and Policy skip it.

5. Fault 4: One Shared LLM and Tool Turn

  • The draft: all five agents passed in sequence through a shared LLM box, a shared tool-calling box and a shared MCP registry.
    • That reads as one turn for the whole request: one model call, then one round of tool calls, for everyone.

MCP (Model Context Protocol) = an open standard for plugging tools and data sources into an AI app, so each tool is written once and reused.

Agents don't work that way

  • Booking calls the Flight and Payment MCP servers during its own work.
    • It may call them several times as it checks availability and holds a seat.
    • It can't wait until four unrelated agents finish.

Paying is different

  • A later merge step can't take a payment back.
  • So Booking commits payment only after Policy has cleared the held fare.
  • It uses an idempotency key, so a retried call can't charge twice.
  • The synthesiser's Policy override then chooses between keeping and releasing a hold, never between charging and refunding.

Idempotency key = a unique ID sent with a request so that repeating it has the same effect as sending it once.

The fix: a shared backend

  • The LLM, MCP registry, external APIs and vector databases become a shared backend each agent calls on demand.
  • "Shared" means many agents may use the same service. It doesn't mean they take turns through one stage.
  • Each agent runs its own loop in parallel and reaches into the backend whenever its next step needs it.

Parallel doesn't mean independent

  • Booking needs a fare from Search and Pricing before it can hold one.
  • So the supervisor starts work in dependency order:
    1. Search, Pricing and the Policy rules lookup run together.
    2. Booking's hold follows the fare it depends on.

Soundbite: "Shared means many agents use the same service, not that they take turns through one stage."


6. Fault 5: No Step That Merges the Results

  • The draft: nothing explained how five parallel results became one reply.
    • The flow carried on as one line, as though merging took care of itself.
  • Merging is real work with real decisions. Someone must:
    1. Collect the outputs of the agents that ran.
    2. Notice when two disagree.
    3. Decide which one wins.
  • The classic example: Policy overrides Booking. Booking found a fare; Policy says the traveller may not take it.

The fix: a named Synthesiser Agent

  • It gathers the output of each agent that ran.
  • It settles any clash between them.
  • It writes one grounded reply before the user sees anything.
  • The reply goes to the user. When it holds no user-specific or live-priced content, a copy is written to the semantic cache for the next similar query (see the semantic cache deep dive).

The second open question: a spawned agent fails or times out

  • The source leaves it open; its level calibration also counts it as a senior-level gap.
  • The answer depends on what the missing agent supplies:
Missing agent What the synthesiser may do Why
Recommendation Leave it out and label the gap The reply is still safe without it
Policy Can't leave it out The reply might then break the company's rules
  • Treat this as a design decision to state, not a detail to skip.

Soundbite: "Merging is real work with real decisions, so it gets a named owner: the synthesiser."


7. Redraw the Corrected Architecture

  • What stays: every component and the regional footprint of the first draft.
  • What changes is the structure:
    • A cache hit is now cheap.
    • Each agent uses its tools within its own loop.
    • All results pass through one accountable step before the reply leaves.

How to read the source's figure

Line or box Meaning
Solid lines The request path and the agents, each running its own loop in parallel
Dashed lines The shared backend, called only when needed
Synthesiser Agent The one component new in this version

The corrected architecture, box by box

  1. API Gateway: routing, auth check, rate limiting.
  2. Semantic Cache: checked by the Supervisor before any agent spawns; can return the response to the user.
  3. Supervisor Agent: spawns only the specialists it needs.
  4. Specialised agents: Search, Booking, Pricing, Recommendation and Policy, each owning its retrieval and tool calls.
  5. Shared backend (dashed), called on demand:
    • Foundation LLM.
    • Vector DBs for AMER, EMEA and APJ.
    • MCP Tool Registry.
    • External APIs for flights, hotels, maps and payment.
  6. Synthesiser Agent: merges every agent that ran and resolves conflicts, such as Policy overriding Booking.
  7. Response to user, with the hit path and the cache write-back.
  8. Monitoring and Logging spanning every stage: latency, token usage, per-agent execution traces, cache hit rate, alerts.

The three rules the figure carries

  1. A cache hit returns before the supervisor spawns any agent. On a miss, the supervisor spawns only the agents this query needs.
  2. Each spawned agent calls the shared backend on its own (Foundation LLM, regional vector DBs, MCP registry, external APIs) for only what its task requires.
  3. The synthesiser combines whatever ran into one reply, and that reply is written back to the cache so the next similar query can reuse it.
  • Now redraw it from memory before reading on, and compare.

8. Follow the Data Flow in Order

  • The draft had ten steps in its data flow.
  • The corrected design keeps ten steps in a new order: the cache check comes before any decision about agents.
  1. A user sends a request from the web or mobile client.
  2. Authentication confirms who they are, the load balancer sends the request to a free API instance, and the gateway enforces rate limits before handing the request to the supervisor.
  3. Before any decision about agents, the supervisor looks up the semantic cache.
  4. A hit returns the stored answer at once, and no agent is spawned.
  5. On a miss, the supervisor starts only the agents this query calls for, from Search, Booking, Pricing, Recommendation and Policy.
  6. Inside its own loop, an agent that needs context makes a tool call to the matching regional vector database.
  7. In that same loop, it calls the external APIs it needs (flights, hotels, maps, payment) through the MCP tool registry.
  8. The synthesiser gathers every agent's output, settles conflicts and writes one grounded reply.
  9. The user receives the reply, and a copy goes into the semantic cache so later queries can reuse it.
  10. Across the whole request, monitoring and logging capture latency, token counts and a trace per agent.
Steps What they are
6 and 7 Happen inside each agent, possibly several times, and in parallel across agents
3 and 4 The short-circuit
9 What makes step 4 possible for the next user

9. Meet the Non-Functional Requirements

Non-functional requirements = the qualities the system needs beyond the right answer: how it scales, stays up, performs, stays secure, costs, and can be observed and changed.

  • They're the same as in the first draft.
  • What changes: the new order makes the cache-first rows true in practice.
    • In the draft, "semantic cache" sat in the performance and cost rows, but its position meant it saved nothing.
Requirement Source's example solution
Scalability Scale out horizontally, autoscale and balance load
Reliability Run in several regions, retry and fail over
Availability Regions run in active-active mode
Performance A semantic cache placed ahead of the fan-out, Redis, a CDN and tuned vector search
Security OAuth, JWT, encryption, RBAC and managed secrets
Cost optimisation A cache-first design where the cache decides whether agents spawn, small models for easy tasks, routing by region
Observability Metrics, logs, a distributed trace for each agent, dashboards and alerts
Maintainability Microservices, modular agents that each own their tools, CI/CD and infrastructure as code

Terms in those rows

Term Meaning
Active-active Every region serves live traffic at the same time, so losing one region shifts load rather than switching a standby on
CDN (content delivery network) Keeps static content close to users
RBAC (role-based access control) Grants permissions by role
CI/CD (continuous integration and continuous delivery) The automated pipeline that tests and ships every change

The cost row's three levers

  1. The cache gate avoids whole fan-outs.
  2. Smaller models handle easy tasks.
  3. Routing by region keeps traffic near its data.

The number that proves the cost row works

  • The source's observability row names a trace per agent.
  • Its key takeaways and the corrected figure's monitoring box add cache hit rate to latency and token usage.
  • Cache hit rate is the number that tells you whether the cost row is working.
  • The source sets no target for it or for p95 latency.
    • Both stay open until the customer supplies traffic and regional constraints.

p95 latency = the latency 95% of requests beat.


10. Turn the Fixes into Review Questions

  • Each fix becomes a question for any multi-agent diagram, your own included.
  • This is the part to carry into an interview.
# Question Fault it catches
1 Is each box a real component, or a policy that should live inside another one? Fault 1, the rate limiter
2 Does the cache come ahead of the costly work it's meant to avoid? Fault 2
3 Are agents made to retrieve when they have no need to? Fault 3
4 Does every agent loop and call tools by itself, or must the whole request squeeze through a single shared stage? Fault 4
5 Where do the parallel results meet, and who settles disagreements between them? Fault 5
  • A diagram that passes all five still needs:
    • Its trade-offs defended (the deep dives cover them).
    • Its open numbers named (the level calibration in the full casebook shows them).

Soundbite: "Five fixes, five questions I can put to any multi-agent diagram, including my own."


Quick Recall: Lines to Say in the Interview

  • "The draft is a rigid pipeline: five agents squeeze through one cache, one retrieval stage, one LLM step and one tool stage."
  • "Rate limiting is a rule the gateway applies to every request, not a route a request takes."
  • "Make the cache check plain code before the supervisor's own model call; a hit spawns no agent."
  • "Retrieval is a tool an agent can choose, not a stage the request must pass."
  • "Booking pays only after Policy clears the hold, with an idempotency key, so the override is keep-or-release, never charge-or-refund."
  • "Parallel doesn't mean independent: Booking's hold follows the fare from Search and Pricing."
  • "A missing recommendation can be labelled and left out; a missing Policy ruling can't."
  • "Still ten steps, new order: the cache check comes before any decision about agents."
  • "Cache hit rate tells me whether the cost row works, and its target stays open until the customer gives traffic numbers."

Technical deep dives

The goal: defend the corrected design under follow-ups: what each component now owns, what the cache may reuse, how agents reach retrieval and tools, and when another agent is worth its cost.

30-Second Cheat Sheet

  • Same components, new scope: the gateway holds rate limiting, the cache is checked first, agents own their RAG and tools, and the synthesiser is the one addition.
  • Semantic cache: matches by embedding similarity, so a hit skips the whole fan-out. Require the answer-changing parameters (route, date, cabin, company) to match exactly.
  • Never cache actions: a booking or payment is an action, not an answer.
  • Retrieval: shared (residency and guardrails in one place) or per-agent (framework default, risks duplicate embedding stacks). The real mistake is drawing RAG as a peer of the agents.
  • Regional or global stores: regional eases residency and latency; global is simpler and consistent. Regional stores aren't what compliance means.
  • Another agent earns its cost only when its tools, guardrails or scaling needs differ from every existing agent's.
  • MCP: tools/list and list_changed refresh a connected server's tools. Discovery isn't authorisation.
  • Identity: send the access token to APIs, not the ID token.

1. Components and What Changed from the Draft

  • The component list matches the first draft.
  • The gateway, the cache and the agent-owned services have a new scope, and the synthesiser is new.
  • The table merges both source component tables.
Component Purpose Change
Client Web and mobile app where users search, book and manage trips Unchanged
Authentication Runs first, before any other step. Confirms identity through SSO with OpenID Connect (an identity layer built on OAuth 2.0), issuing JWTs as tokens Unchanged
Load balancer Shares traffic across API instances to keep the service available Unchanged
API gateway The one way in. Routing, request validation and throttling form a single policy layer rather than an extra hop Now holds rate limiting
Supervisor agent Reads the query and checks the cache. Only on a miss does it choose which specialised agents to spawn Refocused
Semantic cache Consulted as soon as the supervisor has the query. On a hit, the answer goes back with no agent spawned Now checked first
Search, Booking, Pricing, Recommendation and Policy agents Each fetches its own domain context and calls its own tools. Booking talks to the payment gateway itself; nothing passes through a single shared LLM step Own their RAG and tools
Regional vector DBs (AMER, EMEA, APJ) Still the shared retrieval layer, but now something agents call into when they choose, not a stage every request passes in turn Called, not passed through
MCP tool registry Finds tools at run time. Any agent can reach it on its own, whenever it needs to Reached by each agent
External APIs Flight, hotel, map and payment providers, called through MCP servers Reached by each agent
Synthesiser agent Combines the output of every agent that ran, settles conflicts (for example, Policy overriding a Booking choice) and returns one coherent reply Added
Monitoring and logging Records latency, token usage, failures and per-agent traces for the whole request Unchanged

Four identity terms, kept apart

Term What it does
OAuth 2.0 Lets an app act with a user's permission. On its own, doesn't say who the user is
OpenID Connect (OIDC) Adds that identity as a signed ID token
SSO (single sign-on) The one company login that uses it
JWT (JSON Web Token) A signed token format
  • ID token: tells the client who signed in. It's a JWT.
  • Access token: tells an API what a request may do. A separate token, often also a JWT.
  • Send the access token to APIs, not the ID token.

What the table doesn't contain

  • No separate rate limiter.
  • No shared retrieval stage.
  • No shared LLM step.
  • No shared tool stage.
  • Each became a behaviour of another component or a backend service agents call.

Soundbite: "Same boxes as the draft; the rate limiter, retrieval stage, LLM step and tool stage became behaviours or backend services."


2. The Semantic Cache: Placement, Matching and What May Be Reused

Two kinds of cache

Cache Hits on Example
Traditional Only an exact repeat of a request Misses "Flights from FRA to SIN on Tuesday" after "Fly Frankfurt to Singapore next Tuesday"
Semantic Near-duplicates: turns the question into an embedding and returns a stored answer when an earlier question's embedding is similar enough Can share one answer for both, once both dates resolve to the same calendar day

Embedding = a list of numbers that represents a text's meaning.

  • Redis LangCache, which the source cites, works this way: it matches similar questions by embedding similarity rather than exact text.

Why placement makes it worth more here

  • Placed before the supervisor, a hit skips the entire fan-out of agents.
  • Further down, it would save only a single model call.

The same similarity is the risk

  • "FRA to SIN on Tuesday" and "FRA to SIN on Wednesday" embed almost identically, yet need different answers.
  • The fix:
    1. Extract the parameters that change the answer: route, date, cabin, the traveller's company.
    2. Require them to match exactly.
    3. Use embedding similarity only for the wording around them.
  • The cost: the system must decide whether a similar earlier answer really applies to the new request.

What may be reused (the casebook's reasoning, not the source's)

Caveat: the source doesn't say which queries may be served from the cache, and its level calibration marks that as what a senior answer is missing. The points below are the casebook's reasoning.

Limit Why
Fares and seat availability change A cached price may be stale by the time a second user asks
No cross-user personal or policy details A cached reply must not carry one user's personal or policy-specific details to another user
Never replay a booking or payment It's an action, not an answer
  • In the interview: name these limits and ask the customer for freshness and personalisation rules before you set a hit-rate target.

Soundbite: "Match the answer-changing parameters exactly, use similarity only for the wording, and never replay an action from the cache."


3. Retrieval: a Shared Service or Per-Agent RAG

  • Once retrieval leaves the request path, you still have to decide how agents reach it.
  • Two defensible positions:
Option What it gives What it costs
A shared retrieval service One place to enforce data residency (keeping data in the region where rules require it) and guardrails (rules on what content may be retrieved or returned) Every agent depends on that one service, so its outage or slowdown reaches all of them
Per-agent retrieval Each agent wires retrieval as one of its tools. Matches how LangGraph and CrewAI attach tools per agent; CrewAI's docs give each agent its own tools list, so this is the framework default Without governance, several copies of the embedding stack (the models, indexes and pipelines that turn text into searchable vectors)

The mistake an interviewer listens for

  • You can defend either choice.
  • The real mistake: drawing RAG beside the agents as if it were one of them.
  • Retrieval is infrastructure, or a tool an agent calls. It doesn't answer the user.

Where the level calibration puts it

  • Staff level: shared for residency and guardrails, or per-agent with governance so embedding infrastructure isn't duplicated.
  • What the Staff answer still misses: who owns each regional vector database and the MCP tool registry.

Soundbite: "Either is defensible. The mistake is drawing RAG as a peer of the agents: it's infrastructure or a tool."


4. Regional or Global Vector Stores

  • Both the draft and the corrected design keep separate vector stores for AMER, EMEA and APJ.
  • The alternative: one global store.
Option Gains Costs
Stores per region Residency rules are easier to meet (a region's content and queries stay in that region); lower retrieval latency (the store sits near its users) Running three stores and keeping them consistent where they should agree
One global store Simpler to run; regions stay consistent automatically Distance for some users; a harder residency story

The GDPR caution (from the source)

GDPR = the General Data Protection Regulation, the EU's data-privacy law.

  • GDPR Article 46 allows transfers outside the EU under appropriate safeguards.
  • So regional stores help with residency requirements, but they aren't what compliance means.
  • And a global store isn't automatically non-compliant.

What even the Principal answer can't supply

  • Principal answer: make this call region by region on an active-active footprint.
  • Still missing: each region's residency rules and the real traffic mix. Only the customer can give them.

Soundbite: "Regional stores help with residency, but they aren't what compliance means, and a global store isn't automatically non-compliant."


5. When Another Agent Earns Its Cost

What every extra agent costs

  • Coordination: the supervisor must decide whether to start it.
  • A synthesis step you pay for: the synthesiser must merge and reconcile its output.
  • A single agent with several tools avoids both.

When to pay it

  • When sub-tasks differ in their tools or guardrails, or must scale on their own.
  • Booking and Policy plainly do:
Agent Tools Guardrails
Booking Payment and flight tools Must be careful with actions that spend money
Policy The company's rules Must be able to overrule the others
  • Merging them into one agent would mix those tools and guardrails in one loop.

The admission rule

  • The level calibration says a Staff answer still misses the rule for when a new agent earns its coordination overhead.
  • A workable rule follows from the above:
    • Add an agent only when its tools, guardrails or scaling needs differ from every existing agent's.
    • Otherwise, give an existing agent another tool.

Soundbite: "Add an agent only when its tools, guardrails or scaling needs differ; otherwise give an existing agent another tool."


6. Tools and MCP Discovery

What "finds tools at run time" really means

  • In the MCP specification, a client discovers a server's tools by calling tools/list.
  • The server can send a list_changed notification when its tools change.
  • Those calls only discover and refresh the tools of a server the client is already connected to.

A new provider is a new server

  • A new hotel provider is a new server.
  • So the registry must also know which servers exist and how to reach them, from configuration or a server registry.
  • Once connected, tools/list and list_changed let its tools appear without redeploying every agent.

Who calls the registry

  • Any agent that needs a tool calls the registry on its own.
  • Booking finds and calls the Flight and Payment MCP servers during its own loop.
  • The payment gateway is reached directly by Booking, not through a shared stage.

Discovery isn't authorisation (the casebook's caution, not the source's)

Caveat: this point is added in the casebook rather than taken from the source.

  • Discovering a tool doesn't authorise a particular user to use it.
  • The user's identity from authentication must reach the tool call, so that:
    • Booking pays with the right account.
    • Policy applies the right company's rules.
  • The MCP spec's authorisation section for HTTP transports builds on OAuth 2.1.
    • So a tool server can require a token issued for that user instead of trusting whichever agent calls it.

Soundbite: "Discovery tells an agent a tool exists; the user's token decides whether this request may use it."


7. The Airport Mental Model

  • The source compares the corrected design to an international airport, stretched to cover the cache gate and the synthesiser.
  • The table merges both versions of the comparison.
Airport System
Travellers Users
Terminal entrance Authentication
Security screening and bag scan in a single lane, not two API gateway with rate limiting inside it
Help desk that asks "have we answered this already?" Semantic cache, checked before any staff member is sent out
Control tower Supervisor agent
Airline crews, each with its own manuals and radios Specialised agents, each with its own retrieval and tool access
Reference binders kept at each desk Vector databases, used by whichever desk needs them
Ground handlers, caterers and fuel trucks External APIs (flights, hotels, maps, payments)
Dispatcher who writes one departure report from every crew (added) Synthesiser agent
CCTV and the operations room Monitoring, logging and observability

How it maps onto the five fixes

Fault Airport picture
1 Screening happens in the lane travellers already walk through, not in a side room they never leave
2 The help desk answers repeat questions before any crew is sent
3 Crews consult binders only when they need them
4 Crews use their own radios rather than queueing for one
5 The dispatcher turns many crews' reports into one

8. Sources

The source checked these references on 27 September 2026. Each line gives the claim it supports.

Reference Claim it supports
OpenID Connect Core 1.0 OIDC is the identity layer on OAuth 2.0; OAuth alone doesn't authenticate a user
MCP specification: Tools Clients discover tools with tools/list and get list_changed notifications: the dynamic discovery the registry relies on
Agents (CrewAI docs) Each agent carries its own tools list, so per-agent tool wiring is the framework default
Semantic caching with Redis LangCache Semantic caches match similar questions by embedding similarity, not exact text
GDPR Article 46: transfers subject to appropriate safeguards GDPR allows safeguarded transfers, so regional stores help with residency rather than being what compliance means

Supporting references

  • OpenID Connect Core 1.0, section 2 and RFC 9068: ID tokens and JWT access tokens.
  • MCP specification: Tools and MCP authorisation: discovery scope and OAuth 2.1.
  • Stripe idempotent requests: safe payment retries.

Quick Recall: Lines to Say in the Interview

  • "The synthesiser is the only new box; the rest got a new scope."
  • "Send the access token to APIs, not the ID token."
  • "A semantic hit before the supervisor skips the whole fan-out, not one model call."
  • "Tuesday and Wednesday embed almost the same, so route, date, cabin and company must match exactly."
  • "A booking is an action, not an answer: it's never replayed from the cache."
  • "Shared or per-agent retrieval are both defensible; drawing RAG as an agent isn't."
  • "Regional stores help with residency, but GDPR Article 46 allows safeguarded transfers, so they aren't compliance by themselves."
  • "Add an agent only when its tools, guardrails or scaling needs differ from every existing agent's."
  • "tools/list refreshes a connected server; a new provider is a new server the registry has to know about."

Quick review

One sentence: check the cache first, start only the agents a query needs, let each agent use the shared backend in its own loop, and let a synthesiser settle what they return before the reply goes out and back into the cache.

30-Second Cheat Sheet

  • The draft: a rigid pipeline with five structural faults.
  • Rate limiting lives inside the gateway, not in a box that leads nowhere.
  • Cache first: on a hit, no agent is spawned.
  • On a miss: spawn only the specialists this query needs, not all five.
  • Retrieval happens inside each agent's loop, only when needed.
  • Shared backend (LLM, MCP registry, external APIs, vector DBs) called on demand.
  • Synthesiser settles clashes (Policy over Booking), then the reply is written back to the cache.
  • Open until the customer answers: cacheable queries, hit-rate target, p95 target, residency rules, traffic mix.

1. The Corrected Order

Authenticate → balance load → API gateway (rate limiting) → supervisor checks semantic cache

  • Hit → reply, no agent spawned.
  • Miss → spawn only the specialists the query needs → each runs its own loop, calling the shared LLM, regional vector DBs, MCP registry and external APIs only when its task needs them → synthesiser merges what ran, settles conflicts, replies → reply written back to the cache.
  • Monitoring traces every stage.

2. Five Faults, Five Fixes, Five Questions

Fault in the draft Fix Question for any diagram
Rate limiter box off the load balancer, leading nowhere Rate limiting inside the API gateway Is each box a component, or a policy that belongs inside another?
Cache after all five agents Supervisor checks the cache before spawning; a hit spawns nothing Does the cache come ahead of the work it avoids?
One compulsory retrieval stage Each agent retrieves in its own loop, only when needed Are agents made to retrieve without need?
One shared LLM, tool and MCP stage Shared backend each agent calls on demand Does every agent loop and call tools by itself?
No merge step Named synthesiser that settles conflicts Where do results meet, and who settles disagreements?

3. Trade-Offs and Open Numbers

Trade-off Side A Side B The point to make
Shared or per-agent retrieval Shared: residency and guardrails in one place, but every agent depends on it Per-agent: matches LangGraph and CrewAI, but risks duplicate embedding stacks The mistake is drawing RAG as a peer of the agents
Single or multi-agent One agent: no coordination or synthesis cost Extra agents: cost coordination and synthesis They pay off when tools, guardrails or scaling differ, as for Booking and Policy
Semantic or traditional cache Traditional: exact repeats only Semantic: catches near-duplicates, so a hit skips the whole fan-out Deciding what may be reused is the hard part
Regional or global stores Regional: eases residency, cuts latency Global: simpler and consistent Regional stores help with GDPR residency but aren't compliance by themselves

Open until the customer answers

  • Which queries are cacheable.
  • The cache hit-rate target.
  • The p95 latency target.
  • Each region's residency rules.
  • The traffic mix.

4. Key Takeaways

  • The draft was a rigid pipeline: five agents squeezed through one shared cache, one retrieval stage, one LLM step and one tool-calling stage. It needed five structural fixes.
  • Rate limiting is a rule the gateway applies to every request, not a box that leads nowhere.
  • The cache's placement decides whether it saves money or nothing; on a hit, no agent is spawned.
  • On a miss, the supervisor spawns only the specialists this query calls for, not all five by default.
  • Each agent retrieves inside its own loop, because Search and Recommendation need regional content while Booking and Policy rarely do.
  • The LLM, MCP registry, external APIs and vector DBs are a shared backend each agent calls on demand, so Booking reaches the Flight and Payment servers during its own work.
  • A named synthesiser gathers every agent that ran and settles clashes, such as Policy overriding Booking, before the user sees anything; its reply is written back to the cache.
  • Monitoring spans every stage with latency, token usage, cache hit rate and a trace per agent.

Closing answer, in one breath: "Check the cache first, start only the agents a query needs, let each agent use the shared backend in its own loop, and let a synthesiser settle what they return before the reply goes out and back into the cache."


Flashcard Drill


Quick Recall: Lines to Say in the Interview

  • "Five faults, five fixes, five questions for any diagram."
  • "Is this box a component, or a policy that belongs inside another one?"
  • "The cache comes before the supervisor spawns anything; a hit spawns nothing."
  • "Retrieval is a tool an agent chooses, not a stage every request passes."
  • "Shared backend, own loops: Booking reaches Flight and Payment during its own work."
  • "The synthesiser settles clashes, and Policy beats Booking."
  • "Regional stores help with residency; they aren't compliance by themselves."
  • "I won't set a hit-rate or p95 target until the customer gives me traffic and residency rules."

Where next