Nova Runs the Store
Part of the free Generative AI course on LogicWiz, module: Nova Finds Her Voice.
Episode 30: Nova Runs the Store
"Six months ago Nova could barely finish a sentence. Tonight she picks up a customer's call at the e-commerce company where she works, hears 'my order's late and I want different headphones,' checks the order, pulls up alternatives, and answers — in one calm breath. This is her graduation. Everything you've learned, in one running system."
The Final Test
This is the capstone. No new theory — instead, we assemble the pieces from the whole course into one working assistant: a support agent for an e-commerce company.
A real customer message is messy. It often carries more than one intent at once:
"My order is late — and honestly, do you have other headphones?"
That's two questions stuffed into one sentence: an order question and a product question. A single do-everything prompt handles this badly — it juggles two databases, two goals, and usually fumbles one. So we do what Chapter VII taught: split the work across specialists and put a smart router in front.
One Store, Many Jobs
Here's the whole system on one screen. Press through it before we build any code — the shape is the lesson.
{{visual:axiomcart-graph}}
Four moving parts, each one an idea you already know:
- Orchestrator (the router from Ch. VII) — reads the customer's intent and decides who should handle it. One intent → one specialist. Two intents → fire both.
- Order Agent — talks to only the order database. Nothing else.
- Product Agent — talks to only the product catalog. Nothing else.
- Synthesizer — takes the specialists' separate answers and fuses them into one reply the customer actually hears.
Why not one big agent? Because a specialist with a tight context (just orders, or just products) makes far fewer mistakes than a generalist holding everything at once. Small, focused, reliable — the golden rule of the whole chapter.
Building the Brain: A Routing Graph
We wire this with LangGraph (Chapter VII). Remember the mental model: a graph is nodes (the agents) connected by edges (who runs next), all sharing one state — a notepad that flows through the system. The magic ingredient here is the conditional edge: an edge that looks at the state and chooses which node(s) run next — one specialist, or several in parallel. That single feature is routing.
One simplification to name up front: to keep this cell deterministic and API-free, the orchestrator is a plain keyword router standing in for the LLM intent-classifier you built in Chapter VII — same graph slot, simpler brain. Swap in the LLM and the rest of the graph is unchanged.
Walk the code line by line first, then run it:
{{visual:axiomcart-walkthrough}}
{{cell:l30-axiomcart}}
Read the output: the single-intent query ("headphones?") ran only the Product Agent; the two-intent query ("my order ord102, and other headphones?") fired both specialists in parallel, and the Synthesizer merged their two answers into one reply. Same graph, different paths — the conditional edge fanned out to one specialist or both. That's the whole assistant's brain — route → specialize → synthesize — in a few lines.
💡 One honest caveat: our orchestrator matches keywords, so it's crude — a query like "cordless keyboard" could misfire (the letters "order" hide inside other words). That's exactly why a production router is an LLM, not an
incheck; here we keep it simple so the graph is the star.
When Nova Needs to Ask
A great agent knows the limits of what it was given. If a customer asks "where's my order?" but never says which order, the Order Agent has nothing to look up. The wrong move is to guess (and hallucinate a shipping date). The right move is to stop and ask:
{{visual:hitl-interrupt}}
This is human-in-the-loop: the graph hits a missing detail, pauses, asks the customer a question, and — once they answer — resumes from exactly where it stopped, not from the beginning. LangGraph does this by saving a checkpoint of the state at the pause, keyed by a thread_id (the conversation's ID). Resume with that same ID and the whole system picks up mid-thought.
That pause-ask-resume loop is what separates a toy from a product: it refuses to make things up and instead gets the real answer.
Giving Nova a Voice
This assistant isn't only a chat box. Bolt on the voice pipeline from Episodes 27–28 and the same graph becomes a phone agent:
Listen (speech → text) → Think (the routing graph you just built) → Speak (text → speech)
Nothing about the brain changes. The customer speaks; STT turns it into the query string that enters the graph; the graph routes, specializes, and synthesizes exactly as before; TTS reads the final answer aloud. The multi-agent brain and the voice skin are independent — which is precisely why we built them as separate layers.
What Nova Learned
Step back and look at the whole journey. Nova began as a model that predicts the next token. Over eight chapters she gained the ability to see and hear (multimodal), to speak (voice pipelines), to stay on track (instruction-following and memory), to use tools and retrieve knowledge (RAG and agents), and finally to coordinate a team of specialists (multi-agent orchestration) — asking for help when she's missing a detail.
The assistant is all of it at once: route → specialize → synthesize → speak, and pause to ask when unsure. That's not a demo anymore. That's a product. Congratulations — you've built Nova.
📌 Summary: The capstone assembles the course into one system: a support assistant for an e-commerce company. A real customer message often has multiple intents, so an Orchestrator routes each part to a focused specialist (Order Agent → order DB, Product Agent → product DB), and a Synthesizer merges their replies into one answer. We wire it in LangGraph, where the key piece is a conditional edge that reads the shared state and picks the next node — that is routing. When a required detail is missing, the agent uses human-in-the-loop: it pauses (interrupt), asks, and resumes from a checkpoint (keyed by
thread_id) instead of guessing. Wrap the same graph in Listen → Think → Speak and it becomes a voice agent — the brain and the voice are independent layers.