{
  "id": 958743,
  "title": "How I Built Kisan Vaani: A Multi-Agent Voice AI Assistant for Indian Farmers",
  "url": "https://urgent.news/2026/08/15/how-i-built-kisan-vaani-a-multi-agent-voice-ai-assistant-for-indian",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-15T05:05:19.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/_adi_17/how-i-built-kisan-vaani-a-multi-agent-voice-ai-assistant-for-indian-farmers-550c"
  },
  "original_language": "en",
  "account": "In a recent 10-day challenge, I took part in the 10 Days of AI Voice Agents (Voice for Bharat Edition) challenge by Murf AI with the goal of building a voice application that addresses a real-world problem in India. Chosen from the Farm & Field Track, Kisan Vaani is an AI-powered voice assistant designed to provide Indian farmers with instant market prices, weather updates, and agricultural advice through natural Hindi voice calls. Here's a detailed look at what I built, the system architecture, the hardest bugs I encountered, and how you can run the project yourself.\n\n**The Problem I Set Out to Solve**\n\nIn rural India, most agricultural information is difficult to access due to text-heavy websites or complex mobile apps. Farmers often struggle to find crucial information like mandi prices, weather forecasts, or crop disease advice. Kisan Vaani aims to solve this by offering a natural and efficient voice-based solution. By simply calling the service, farmers can receive immediate assistance in their native Devanagari Hindi, making the interaction much more user-friendly and effective compared to navigating through apps or websites.\n\n**System Architecture**\n\nThe core components of Kisan Vaani's architecture include:\n\n1. **Web Interface**: A Next.js web frontend that visualizes audio and interacts with users.\n2. **Real-Time Communication**: Utilizes LiveKit for WebRTC streaming, enabling real-time audio interactions.\n3. **Voice Synthesis**: Murf Falcon 2 TTS (Anisha voice for general interactions and Samar voice for specialist consultations) provides high-quality, natural-sounding speech.\n4. **Speech Recognition**: Deepgram Nova-3 STT is used for converting spoken words into text.\n5. **Language Model**: Groq Llama 3.1 (8B) handles complex queries and provides responses.\n6. **Database**: SQLite is employed for storing farmer profiles, call escalations, and call logs, ensuring quick access and storage efficiency.\n\n**Key Features Developed**\n\n1. **Natural Hindi Voice with Ultra-Low Latency**: Powered by Murf Falcon 2, Kisan Vaani responds almost instantly, with a time-to-first-byte (TTFB) under 100 ms. This ensures that farmers receive quick and natural-sounding responses, simulating a personal phone call.\n2. **Caller Profile Memory**: Using SQLite, the system remembers farmer profiles across calls. For example, if Ramesh from Noida calls back, the assistant can tailor its responses to his specific location and crop needs, enhancing the personalized experience.\n3. **Live Mandi Prices & Weather Alerts**: Kisan Vaani integrates real-time tools to fetch current market prices for agricultural products like wheat, paddy, and mustard from e-NAM, along with district weather forecasts from Open-Meteo API. This ensures farmers have the most up-to-date information to make informed decisions.\n4. **Human Escalation & Call Analytics Dashboard**: When a farmer faces an emergency or a more complex issue, Kisan Vaani escalates the call to a specialist (Dr. Samar) and logs the call details, including duration and outcome, in SQLite databases. A glassmorphism dashboard built with Next.js provides a visual overview of these metrics, helping farmers and service providers track performance.\n5. **Multi-Agent Specialist Handoff**: For issues like crop diseases, Kisan Vaani seamlessly transfers the call to a specialist (Dr. Samar) with a clear announcement. The voice switches to Murf Falcon Samar, a designated male doctor voice, ensuring that the farmer receives the most relevant and precise advice.\n\n**Engineering Challenges & Solutions**\n\n1. **Stopping LLM from Speaking Raw Tool Tags**: Initially, the Llama 3.1 model occasionally outputted literal function names like `{name_or_id : रमेश}` within the conversation, confusing the flow. This issue was resolved by removing all function names from the prompt and instructing the LLM to execute tools silently, thus ensuring clean, uninterrupted conversation.\n2. **Overcoming Groq 429 Rate Limits**: During multi-turn calls, the Groq LLM encountered rate limit errors (429) due to the accumulation of conversation history. The solution was to clear the old chat context when transitioning to a specialist doctor. This reduced the payload size, eliminating the rate limit issues and allowing uninterrupted, seamless conversations.\n3. **Fixing LiveKit Read-Only Property Error**: An AttributeError occurred when trying to assign a new TTS instance to the LiveKit agent, as the property is read-only. The fix was to pass the TTS instance directly during the agent class initialization. This approach ensured the LiveKit agent could dynamically update its voice settings without errors.\n\n**How to Run Kisan Vaani**\n\nTo run the Kisan Vaani project, you can follow these steps, as outlined in the source material:\n\n1. **Set Up the Environment**: Ensure you have Python, Next.js, and the necessary libraries (LiveKit, Deepgram, Groq) installed.\n2. **Configure API Keys**: Obtain your API keys for Deepgram, Murf, and other services and configure them in the project's environment variables.\n3. **Initialize the Database**: Set up the SQLite database with tables for farmers, escalations, and call logs.\n4. **Start the Application**: Run the Next.js frontend and the backend Python scripts. Ensure all components are properly connected and functional, testing the natural Hindi voice, real-time data fetching, and specialist handoffs as described in the system architecture.\n\nBy following these steps, you can create and deploy Kisan Vaani, providing a valuable service to Indian farmers, helping them navigate the complexities of agriculture through the simplicity of voice communication.",
  "summary": "Over the last 10 days, I participated in the 10 Days of AI Voice Agents (Voice for Bharat Edition) challenge by Murf AI. My goal was to build a real-world voice application that solves an actual problem in India. I chose the Farm & Field Track and built Kisan Vaani (किसान वाणी) — an AI-powered voice assistant designed to help Indian farmers get instant market prices, weather updates, and…",
  "key_points": [],
  "editors_take": "Kisan Vaani's launch marks a shift towards accessible, voice-based agricultural information for Indian farmers, bridging the gap between complex digital platforms and their needs for timely, relevant advice.",
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Dev.to",
        "title": "I Built a Voice AI Assistant for Indian Farmers — My 10-Day Voice Agent Journey",
        "url": "https://urgent.news/2026/08/15/i-built-a-voice-ai-assistant-for-indian-farmers-my-10-day-voice-agent",
        "published": "2026-08-15T05:59:16.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}