Building a Read-Only POS Analytics Agent: Route-Fetch-Narrate-Ground Architecture Review

RedaHaloubi · reddit · 2026-09-10

A developer shares the architecture of a restaurant POS analytics copilot before opening it up to write actions, asking for blind-spot review. The core rule: the LLM never computes anything — all math happens in a pre-aggregated pipeline.

The loop: route → fetch → narrate → ground

What works: slim DTOs, intent filtering reducing phantom tool calls, static how-to catalog retrieval.

Pain points: pins outside CORE aren't always registered (cache vs reachability); "compare to last week" queries trip the numeric validator; multi-turn follow-ups not scripted.

Asks: tool selection at 20-40+ tools; grounding for numbers (regex vs constrained decoding vs model judge); observability without PII leaks; HITL write patterns (preview→confirm→mutate→audit).

Stack: Node 22 / TypeScript / Vercel AI SDK v7 / Gemini Flash / Redis / MongoDB.

Related event: Restaurant POS Analytics Agent Uses Four-Step Architecture(2 posts)→

Original post →

More from coding & agent

coding & agent channel →