Read-only analytics agent: route → fetch → narrate → ground, LLM never computes anything
RedaHaloubi · reddit · 2026-09-10
A developer building a restaurant-POS analytics copilot shares a detailed read-only agent architecture before enabling writes: the LLM never computes — all math lives in a pre-aggregated pipeline (CDC → analytics DB → edge API). The loop: Route (keyword/intent tool filtering with a frozen CORE 12 for prompt-cache stability, pins for narrow tools, hand-rolled since Gemini lacks deferloading), Fetch (thin wrappers projecting responses to slim DTOs, e.g. revenue summary 4k→500 chars, soft-fail on errors), Narrate (Gemini Flash via Vercel AI SDK streamText, maxSteps, SSE), Ground (post-hoc validator checking every $/% figure against tool output). Open questions: tool selection at 20-40+ tools, numeric grounding via regex vs constrained decoding, PII-safe observability, and HITL write patterns.
Related event: Restaurant POS Analytics Agent Uses Four-Step Architecture(2 posts)→
More from coding & agent
- Salesforce releases EvoHarnessBench to test agents against evolving tool harnesses — Salesforce · 2026-09-10
- Tsinghua + Qwen paper: rebuilding agent workspaces beats imitating trajectories, lifts Terminal-Bench to 58.1% — rohanpaul_ai · 2026-09-10
- Users urged to make Codex/Claude document their process before models become unavailable — moonsandhues · 2026-09-10
- Whatomate: open-source single-binary WhatsApp AI chatbot platform hits 1.5k GitHub stars — tom_doerr · 2026-09-10
- Dev replaces bloated AI chat with a Kanban board that agents read and update themselves — Clean-Vermicelli-700 · 2026-09-10
- Nomos: an open-source framework for testing whether AI agent permissions have grown too broad — Excellent-Hour7253 · 2026-09-10