Inspiration

local small to medium size business owners are making inventory decision without complete information. We wanted to build a system that helps stores react faster to demand, pricing shifts, and supply constraints without needing a full operations team.

What it does

Tabula is an AI-powered back office for small retail stores. It watches your inventory, tracks supplier prices, monitors demand trends, and tells you what to restock and when, so you can make smarter buying decisions without needing a full operations team.

How we built it

Tabula is a multi-agent system built on top of Claude Sonnet. It uses four specialist agents, Trend, Price Scout, Procurement, and Inventory, each running its own tool-using loop. Sitting above them is a Universal Agent that acts as the interface with the store owner. When the owner sends a message through iMessage or WhatsApp, the Universal Agent figures out which specialist to involve and then combines their outputs into a single, clear response.

Each agent has a focused role. The Trend Agent looks at signals from Google Trends, Reddit, local events, and the store’s own sales data to recommend what to stock. The Price Scout Agent compares supplier prices against the broader market and only surfaces opportunities when the savings are meaningful. The Procurement Agent finds suppliers, gathers quotes, and evaluates margins before suggesting what to order. The Inventory Agent handles real-time barcode scanning through a phone, pulling product data from UPC databases and updating stock levels instantly.

On the backend, each agent runs as a FastAPI service and is exposed through an MCP server so they can be called like tools. MongoDB Atlas stores everything from inventory and transactions to supplier quotes and sales history. On the frontend, we built a React, TypeScript, and Vite dashboard with live inventory tracking, a sales trends visualization, and a real-time feed of agent activity.

For communication, we built bridges to both iMessage and WhatsApp. The iMessage integration reads directly from macOS’s chat database, while the WhatsApp bridge uses whatsapp-web.js. Both pipelines forward messages from the owner to the Universal Agent and send responses back to the phone.

Challenges we ran into

The hardest challenge was making multi-agent coordination feel seamless. Each specialist agent runs its own Claude loop with its own latency, and composing their outputs into a single useful response required careful orchestration, especially for the pipeline that chains Trend, Procurement, and iMessage delivery in sequence.

Wiring the iMessage inbox listener was unexpectedly tricky. It reads directly from macOS's chat.db using SQLite, which requires Full Disk Access and has strict OS-level restrictions in recent macOS versions. Reducing iMessage response latency was also a real challenge since AppleScript message delivery is synchronous and blocking, so we had to restructure the agent pipeline to do as much work as possible before touching the messaging layer, rather than after.

Integrating Solana added another layer of complexity on top of an already distributed system. The on-chain insight submission runs asynchronously relative to the agent pipelines, which are synchronous Python, so we had to thread the Solana calls carefully to avoid blocking agent responses. We also had to design the accuracy scoring oracle to be deterministic and tamper-evident, since it resolves on-chain records against real-world outcomes that the agents themselves produced.

We also had to deal with rate limits across every external API, including Google Trends, UPC lookup, and Google Custom Search, and build graceful fallbacks so agents never hard-fail during a demo.

Accomplishments that we're proud of

We're proud of the depth of the agent marketplace architecture. At the top sits the Universal Agent, which handles two distinct modes from a single identity: a reactive loop that receives iMessages from the owner and routes them to the right specialist agent, and a proactive digest mode that independently gathers price alerts, trend signals, and procurement quotes, then synthesizes them into a single five-bullet briefing. Underneath that, the Orchestrator chains Trend, Procurement, and iMessage composition in sequence, but non-trivially: it runs intent extraction on the owner's message first, confirms demand via the Trend Agent before ever touching procurement, checks margin viability on every line item, and only then composes a rich message that includes the "why" behind the recommendation alongside the order details. The whole system is layered, with each agent scoped to a specific job and the outputs of one feeding the inputs of the next.

We're also proud of the preference learning system. The Trend Agent silently builds a preference model over time by tracking which recommendations the owner acts on versus ignores. Each recommendation gets a deterministic SHA1 ID so it can never be double-counted. Pending recommendations auto-age to "ignored" after seven days, since no action is itself a signal. The system computes a per-category score as acted / (acted + ignored), but only considers a category reliable once it has at least three data points. That preference context gets injected directly into Claude's system prompt on the next analysis run, so categories the owner consistently acts on get deeper treatment, and categories they consistently ignore get brevity. It gets more useful the longer it runs, which is the kind of compounding behavior that makes the system feel personal rather than generic.

What we learned

Working on Tabula gave us a much deeper understanding of the challenges small, family-run businesses deal with every day. From managing unpredictable demand to balancing cash flow with inventory risk, a lot of their decisions are made under real constraints. At the same time, we saw just how valuable their intuition is. These owners have a deep, almost instinctive understanding of their customers and community that no dataset can fully capture.

What stood out to us is that the challenge is not a lack of insight. It is that these insights are hard to scale and validate without the right tools. Inventory decisions, for example, often come down to experience and gut feeling, which can sometimes lead to overstocking or missed opportunities.

Building Tabula helped us see how AI can actually complement that human intuition instead of replacing it. The goal is not to take decisions away from store owners, but to support them with data that strengthens what they already know, helping them make more confident and profitable choices while preserving the personal touch that makes local retail so powerful.

What's next for Tabula

Next, we’ll scale Tabula by expanding to more stores, supporting larger datasets, improving recommendation quality, the food industry, and making the platform more production-ready for real retail operations.

Built With

Share this project:

Updates