<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tilak Raj Roy</title>
    <description>The latest articles on DEV Community by Tilak Raj Roy (@tilak_rajroy_f81d1723578).</description>
    <link>https://dev.to/tilak_rajroy_f81d1723578</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4078498%2F29c4e4d3-5fc4-4e92-8a4b-d77ceba7a77c.png</url>
      <title>DEV Community: Tilak Raj Roy</title>
      <link>https://dev.to/tilak_rajroy_f81d1723578</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tilak_rajroy_f81d1723578"/>
    <language>en</language>
    <item>
      <title>Building Bazaar Mitra: My 10-Day Journey Building a Voice AI Agent for Local Commerce</title>
      <dc:creator>Tilak Raj Roy</dc:creator>
      <pubDate>Sat, 15 Aug 2026 06:37:43 +0000</pubDate>
      <link>https://dev.to/tilak_rajroy_f81d1723578/building-bazaar-mitra-my-10-day-journey-building-a-voice-ai-agent-for-local-commerce-eo0</link>
      <guid>https://dev.to/tilak_rajroy_f81d1723578/building-bazaar-mitra-my-10-day-journey-building-a-voice-ai-agent-for-local-commerce-eo0</guid>
      <description>&lt;h2&gt;
  
  
  1.INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;Bazaar Mitra is a voice-first AI assistant designed to help local-commerce customers with product enquiries, memory, outbound calls, human escalation, analytics, and specialist handoffs.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.THE PROBLEMS
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Persistent user memory
Making the agent remember a caller's name across different calls.
Solved using SQLite with user_id, name, language preference, and facts.
Also added explicit consent before saving information
2.Product data integration
Initially the product lookup used a manually created local catalogue.
You then moved toward real external catalogue data using DummyJSON API.
The challenge was handling API failures, timeouts, missing products, and preventing the agent from guessing prices.
3.Outbound calling
Browser-based calls were straightforward, but outbound SIP calling required configuring LiveKit SIP and Linphone.
You had to deal with SIP URI, trunk ID, environment variables, and room/agent connection.
4.Frontend/debugging
You encountered frontend/runtime issues such as missing references and component-related errors while customizing the LiveKit starter.
This is a good section because it shows actual debugging rather than pretending everything worked immediately.
5.Human escalation
The agent needed to know when not to solve something itself.
You implemented escalation for situations requiring human assistance, including permission before sharing information.
6.Call analytics
You needed actual call results rather than hardcoded dashboard numbers.
The dashboard tracks:
Total calls
Successful calls
Failed calls
7.Specialist handoff
The main Bazaar Mitra agent shouldn't handle every type of request.
You added a specialist-agent concept so specific requests can be transferred while maintaining conversation context.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3.FEATURE MAP
&lt;/h2&gt;

&lt;p&gt;Bazaar Mitra is a Local Commerce AI voice assistant that can:&lt;/p&gt;

&lt;p&gt;converse using voice&lt;br&gt;
follow business and safety guardrails&lt;br&gt;
understand Hindi, English, and Hinglish&lt;br&gt;
remember returning callers with consent&lt;br&gt;
look up product information&lt;br&gt;
make outbound calls&lt;br&gt;
escalate payment/order issues to humans&lt;br&gt;
track call outcomes through analytics&lt;br&gt;
hand return/refund conversations to a specialist agent&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Voice + Guardrails - Defined identity, objectives, safety boundaries and concise voice responses.&lt;/li&gt;
&lt;li&gt;Indian / Mixed Language - Hindi, English and Hinglish communication based on the caller.&lt;/li&gt;
&lt;li&gt;Memory - Caller information is stored persistently only after explicit consent.&lt;/li&gt;
&lt;li&gt;Product Lookup - The agent calls a tool/API instead of inventing product information.&lt;/li&gt;
&lt;li&gt;Outbound Calls - The agent can initiate an outbound voice interaction through SIP.&lt;/li&gt;
&lt;li&gt;Human Escalation - Payment/refund or order-dispute issues can become a human-help request.&lt;/li&gt;
&lt;li&gt;Call Analytics - Real call outcomes feed Total, Successful and Failed call counts.&lt;/li&gt;
&lt;li&gt;Specialist Handoff - Returns/refunds conversations move from the general agent to a focused specialist.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4.ARCHITECTURE
&lt;/h2&gt;

&lt;p&gt;User&lt;br&gt;
  ↓&lt;br&gt;
LiveKit&lt;br&gt;
  ↓&lt;br&gt;
Deepgram STT&lt;br&gt;
  ↓&lt;br&gt;
Gemini LLM&lt;br&gt;
  ↓&lt;br&gt;
Tools / Memory / Handoff&lt;br&gt;
  ↓&lt;br&gt;
Murf Falcon TTS&lt;br&gt;
  ↓&lt;br&gt;
User&lt;/p&gt;

&lt;p&gt;Supporting Components :&lt;br&gt;
SQLite → persistent customer memory&lt;br&gt;
Product API → product lookup&lt;br&gt;
SIP/Linphone → outbound calls&lt;br&gt;
Escalation DB → human-help requests&lt;br&gt;
Analytics DB → call outcomes&lt;br&gt;
Specialist Agent → returns/refunds&lt;/p&gt;

&lt;h2&gt;
  
  
  5.DIFFICULT PARTS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Memory persistence problem:&lt;/strong&gt;&lt;br&gt;
Initially the agent could save information but couldn't remember it across calls. The issue was traced through the caller identity and database flow. Stable user IDs and SQLite persistence were required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool integration problems:&lt;/strong&gt;&lt;br&gt;
While adding Day 5 tools, tool definitions and API handling caused failures. Debugging logs helped identify whether the tool was being called, whether the API responded, and whether the result reached the voice pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outbound SIP setup:&lt;/strong&gt;&lt;br&gt;
Outbound calling required understanding the difference between the LiveKit SIP endpoint, SIP trunk, and destination SIP address. Environment-variable configuration was also important.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. PRACTICAL BUILD GUIDE
&lt;/h2&gt;

&lt;p&gt;Prerequisites: Python environment, LiveKit project, API credentials for the services used, and a public repository.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Basic Stack :&lt;/em&gt;&lt;br&gt;
Speech-to-Text → Deepgram&lt;br&gt;
LLM → Gemini&lt;br&gt;
Text-to-Speech → Murf Falcon&lt;br&gt;
Real-time transport → LiveKit&lt;br&gt;
Database → SQLite&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup Sequence :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository&lt;/li&gt;
&lt;li&gt;Install dependencies&lt;/li&gt;
&lt;li&gt;Create .env.local&lt;/li&gt;
&lt;li&gt;Add API keys there&lt;/li&gt;
&lt;li&gt;Never commit .env.local&lt;/li&gt;
&lt;li&gt;Start the LiveKit agent&lt;/li&gt;
&lt;li&gt;Start the frontend&lt;/li&gt;
&lt;li&gt;Open the browser&lt;/li&gt;
&lt;li&gt;Start a voice session&lt;/li&gt;
&lt;li&gt;Test a simple conversation&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  7. Evidence
&lt;/h2&gt;

&lt;p&gt;Bazaar Mitra frontend&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz63jvyfok2ng4693ct1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz63jvyfok2ng4693ct1a.png" alt=" " width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;product tool being called&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdfar9kbf9o0hsmznz06l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdfar9kbf9o0hsmznz06l.png" alt=" " width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Call analytics dashboard&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46zi1qjfs15at51ytzno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F46zi1qjfs15at51ytzno.png" alt=" " width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specialist handoff clip&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhex13wc7pi1dpcaxs7a1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhex13wc7pi1dpcaxs7a1.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. LEARNING
&lt;/h2&gt;

&lt;p&gt;Voice agents are not just an LLM plus TTS. Reliability depends on turn detection, STT quality, tool design,&lt;br&gt;
state management, database persistence, permissions, fallback behavior, and clear agent boundaries.&lt;/p&gt;

&lt;p&gt;the next version could include:&lt;/p&gt;

&lt;p&gt;real merchant inventory instead of demo/catalogue data&lt;br&gt;
proper order-management integration&lt;br&gt;
better multilingual voice support&lt;br&gt;
richer analytics&lt;br&gt;
real CRM/help-desk integration&lt;br&gt;
improved specialist routing&lt;br&gt;
authentication and production-grade data protection.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. LINKS
&lt;/h2&gt;

&lt;p&gt;GitHub Repository : &lt;a href="https://github.com/insyncerick/murf-livekit-starter" rel="noopener noreferrer"&gt;https://github.com/insyncerick/murf-livekit-starter&lt;/a&gt;&lt;br&gt;
My Linkedin Profile : &lt;a href="http://www.linkedin.com/in/tilak-raj-roy-83b85440a" rel="noopener noreferrer"&gt;www.linkedin.com/in/tilak-raj-roy-83b85440a&lt;/a&gt;&lt;br&gt;
(there is uploaded my day1 to day 10 full journey posts )&lt;/p&gt;

</description>
      <category>voiceforbharat</category>
      <category>voiceai</category>
      <category>murffalcon</category>
      <category>livekit</category>
    </item>
  </channel>
</rss>
