Bookshelf (multi-agent inventory planner)
Four ADK agents plan inventory for Malaysian bookstores using deterministic pandas tools.
A Malaysian bookstore owner sits on 100,000 sales rows but rarely converts them into stocking decisions — what to push, drop, restock, source. Bookshelf is a 4-agent ADK pipeline that takes any inventory question and returns a focused brief grounded in the actual numbers.
Most chat-on-document tools (NotebookLM and similar) approximate aggregates from text chunks. They are fast and free, but for a 100k-row sales table they miss precision. Asking "RM impact of dropping these 8 SKUs?" gets a directional answer — useful for vibes, not for ordering.
The architecture goes the other way:
- Researcher calls a deterministic pandas
data_toolthat computes per-SKU revenue, margin, velocity, Pareto rank, last-sale date, and aging class. The numbers are exact before the LLM ever sees them. - Judge emits a Pydantic
JudgeVerdict(status / issues / confidence / feedback). Loops up to 3× on fail. - EscalationChecker is a five-line deterministic Python class that breaks the loop on pass. Not every component needs an LLM.
- Content Builder classifies SKUs into a 6-class taxonomy (push / hold / drop / restock-seasonal / discontinue / source-similar) and writes a 600-word Markdown brief.
Tested against 101,990 rows of real Malaysian bookstore sales (385 SKUs, RM 18.87M revenue, Jan 2024 to Dec 2025). Five questions captured live: what's selling, what to drop, when to stock for school season, aging clearance, best margin to push. The aging question correctly surfaced the entire UPSR-syllabus cluster — UPSR was abolished in Malaysia in 2021, so any UPSR-prep book is structurally obsolete. The agents caught it without being told the SKU names.
The pattern that keeps showing up: chat-on-document tools win on speed; multi-agent systems win on precision and integration. ~140 seconds per Bookshelf brief vs sub-10 for NotebookLM is the cost of pandas + a quality gate + a typed verdict. For decisions worth thousands of ringgit, the trade is fair.