尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A voice order desk for FMCG distributors in India, built on Bolna.
Live: https://beat-flame.vercel.app
What it is. A Bolna voice agent that phones kirana shops in Kannada and English and takes their weekly restock order, the job a distributor's salesman does on foot today. Orders, payment promises and callbacks land on the distributor's dashboard while the call is still going.
Try it in two minutes.
Every account is separate, so nothing you do touches anyone else's data.
About live calls. The Bolna account behind the demo is on a trial plan, which only dials verified numbers, so Call won't ring your phone. The demo video shows a real call end to end. To run one yourself, deploy your own copy (below) with your Bolna key, or play a full call through the API locally with npm run test:agent.
What to look at in the code.
| Where | What |
|---|---|
app/api/agent/* | The five tools the Bolna agent calls mid-conversation: shop context, place order, payment promise, callback, register a new shop |
app/api/agent/order/route.ts | Pricing on the server: stock checks, substitutes, schemes, totals. The agent only sends CODE:qty, so it can't misprice an order |
lib/agent.ts | Works out which shop and which account a call belongs to (outbound, inbound to a Beat number, or an unknown caller) |
app/api/webhooks/bolna | Post-call webhook: transcript, recording, outcome |
scripts/build-prompts.mjs | Generates the agent prompt and welcome line per language |
db/schema.sql | Multi-tenant schema: every row is scoped to a distributor |
Why Kannada and English. We're in Bengaluru, so we started with how shopkeepers here actually talk. Each extra language is one more Bolna agent: prompts for Hindi, Telugu, Tamil and Malayalam are already in bolna/, and calls are routed by each shop's language.
Distributors send salesmen to visit kirana shops on a fixed route (a "beat") to take restock orders. Beat phones each shop instead. It's built in Bengaluru for Bengaluru: it speaks everyday Kannada and switches to English when the shopkeeper does. Calls are routed by each shop's language, so Hindi, Telugu, Tamil and Malayalam are one more Bolna agent each (prompts for all five are in bolna/). On every call it:
Every order prints on the distributor's dashboard while the call is still going.
| Section | What the distributor does there |
|---|---|
| Live beat | Today's numbers, orders printing live, shops on the route, recent calls, follow-ups. Start beat calls every active shop. |
| Orders | Move each order through packed, out for delivery and delivered (cash, or on credit), or cancel it. |
| Calls | Every conversation with its recording and transcript, filterable by outcome. |
| Shops | Add, edit, pause or delete shops. Set each shop's number, language and opening balance. New callers show up here to check. |
| Products | The catalog the agent sells from: price, pack, schemes, stock and substitutes. A 25-product starter catalog is one click away. |
| Payments | Who owes what, promises (open, kept, missed), callbacks, and a record of money received. |
| Settings | Business name, delivery promise, the Beat number, and which language agents are live. |
Each distributor has their own account (email and password). All data is scoped to the account.
Shopkeeper's phone ── Bolna agent (one per language) ──────────── Beat (Next.js on Vercel + Postgres)
ears: Sarvam saaras (kn/hi/te/ta/ml) /api/agent/shop shop, last order, credit, catalog
brain: LLM /api/agent/order price + book the order
voice: Sarvam bulbul /api/agent/payment payment promise
/api/agent/callback call me later
/api/agent/register new shop rang in
post-call webhook ───────────────────────────▶ /api/webhooks/bolna transcript, recording, status
Dashboard "Start beat" ─▶ /api/beat ─▶ Bolna /call (agent picked by the shop's language)
Cron ─▶ /api/cron/dispatch ─▶ dials callbacks that are due
All order logic is on the server, not in the prompt: the agent sends CODE:qty, and the server checks stock, applies schemes, totals, and tells the agent what to say. Calling place_order again on the same call replaces the order, until the warehouse starts packing it.
Inbound calls are routed by the number dialled: each account sets its Beat number in Settings. Outbound calls are tied to the shop when they're placed.
以上為 README 的開頭部分。其餘內容請閱讀原文。 檢視完整 README ↗