
AIdeas: NagrikAI - AI-Powered Government Benefits Navigator
Discover how Nagrik AI uses a multi-agent system to help Indian citizens access life-changing government benefits through natural conversations in their own regional languages
App Category
Social Impact
My Vision
In India, 40% of eligible citizens miss out on government benefits simply because they don't know they exist. A 70-year-old widow in rural Maharashtra might qualify for five different pension schemes but has no way to discover them. Language barriers, complex eligibility criteria, and lack of digital literacy create an invisible wall between citizens and their rightful benefits.
Nagrik AI is designed to bridge the massive information gap between the Indian government’s welfare schemes and the citizens who need them most. While thousands of benefits exist, navigating complex eligibility criteria and bureaucratic jargon is a significant barrier.
I built it as a Multi-agent AI system that acts as a personalized digital concierge. By leveraging generative AI, Nagrik AI allows users to discover, understand, and learn how to apply for government benefits through simple, natural language conversations. Whether a farmer in rural India needs information in Tamil via Voice, or a student in a city asks in English over WhatsApp, Nagrik AI meets them where they are.
Nagrik AI is an intelligent benefits navigator that analyzes citizen profiles against 100+ government schemes and explains eligibility in natural language - in Hindi, English, Tamil, and other regional languages. Citizens can interact through WhatsApp, voice calls, or a web dashboard. The AI doesn't just say "yes" or "no" - it explains why someone qualifies, what documents they need, and how to apply.



Why This Matters
This isn't just about technology - it's about dignity and access. When a senior citizen discovers they're eligible for ₹1,000/month pension they didn't know existed, that's life-changing. When a farmer learns about crop insurance before monsoon season, that's security. When a student finds scholarships they qualify for, that's opportunity.
Government schemes exist to help people, but the complexity of discovering and accessing them creates inequality. Those with education, internet access, and time can navigate the system. Those without - often the ones who need help most - get left behind.
NagrikAI democratizes access. A citizen can send a WhatsApp message in their native language and get personalized guidance. No forms to fill out initially, no jargon to decode, no office visits required. The AI meets people where they are, speaks their language, and guides them step by step.
Beyond individual impact, this creates systemic change. When benefits reach intended recipients, government programs achieve their goals. When citizens trust the system works for them, civic engagement increases. When data shows which schemes are underutilized, policymakers can improve outreach.
How I Built This
Architecture Overview
I designed NagrikAI as a serverless, event-driven system using 11 AWS services, all optimized for the AWS Free Tier to keep costs under $5/month:
Core Intelligence Layer:
- Amazon Bedrock (Nova Pro): Powers natural language understanding and eligibility reasoning across multiple Indian languages
- Amazon Bedrock (Nova Vision): Handles OCR for identity documents like Aadhaar cards and ration cards
Data & Storage:
- Amazon DynamoDB: Stores citizen profiles, government schemes, and eligibility results with single-digit millisecond latency
- Amazon S3: Securely stores citizen documents with encryption at rest
Compute & API:
- AWS Lambda: Runs six specialized AI agents serverlessly (Channel Orchestrator, Eligibility Reasoning, Policy Watcher, Document Processor, Notification Service, Context Monitor)
- Amazon API Gateway: Provides RESTful APIs with authentication and rate limiting
Communication & Events:
- Amazon EventBridge: Orchestrates event-driven workflows for policy updates and notifications
- Amazon SNS: Sends SMS notifications to citizens about new benefits
- Amazon Transcribe: Converts speech to text in Hindi, English, Tamil, Telugu, and Bengali
- Amazon Polly: Generates natural-sounding voice responses in regional languages
Monitoring:
- Amazon CloudWatch: Tracks system health, logs, and custom metrics
Development Journey
Phase 1: Core Engine (Week 1-2)
I started with the eligibility reasoning engine. The challenge wasn't just matching rules - it was explaining decisions in natural language. I used Amazon Bedrock's Nova Pro model with carefully crafted prompts that include:
- Citizen profile data (with PII masked)
- Scheme eligibility criteria
- Context about Indian government programs
- Instructions to explain reasoning in simple language
The breakthrough came when I implemented property-based testing using Hypothesis. Instead of testing specific cases, I defined universal properties like "eligibility must be deterministic" and "confidence scores must be between 0-100." This caught edge cases I never would have thought to test manually.
Phase 2: Multi-Channel Interface (Week 3)
Indians use WhatsApp more than any other platform, so I built a conversational interface. The Channel Orchestrator agent routes messages from WhatsApp, web, or voice to the appropriate handler while maintaining conversation context.
For voice, I integrated Amazon Transcribe and Polly. The tricky part was handling code-switching - when people mix Hindi and English in the same sentence. I solved this by using Transcribe's multi-language detection and having Bedrock understand the mixed input.
Phase 3: Document Processing (Week 4)
I used Nova Vision to extract data from Aadhaar cards, ration cards, and other documents. The model is remarkably accurate - it handles different card formats, poor image quality, and even handwritten annotations.
Security was critical here. All documents go to encrypted S3 buckets, and I implemented automatic PII masking before any data touches the LLM. Aadhaar numbers get tokenized, and the system tracks who accessed what document for audit compliance.
Phase 4: Event-Driven Workflows (Week 5)
I built a Policy Watcher agent that monitors government websites for scheme updates. When a policy changes, EventBridge triggers workflows that:
- Re-evaluate affected citizens' eligibility
- Send notifications to newly eligible people
- Update the knowledge base
- Log changes for audit trails
This makes the system proactive instead of reactive. Citizens don't need to check back - the system tells them when something changes.
Phase 5: Testing & Optimization (Week 6)
I wrote 187 tests covering all functionality. The property-based tests were game-changers - they found bugs I never anticipated. For example, one test discovered that eligibility could be non-deterministic due to timestamp precision issues.
I optimized for AWS Free Tier by:
- Using DynamoDB on-demand pricing (only pay for actual reads/writes)
- Implementing prompt caching to reduce Bedrock costs by 90%
- Batching EventBridge events to stay under free tier limits
- Using S3 lifecycle policies to archive old documents
Technical Highlights

Multi-Agent Architecture: Six specialized Lambda functions handle different concerns - orchestration, reasoning, document processing, policy monitoring, notifications, and context tracking. They communicate via EventBridge events, making the system loosely coupled and scalable.
PII Protection: Before any citizen data reaches Bedrock, I mask Aadhaar numbers, phone numbers, and addresses. The AI reasons about eligibility without seeing sensitive identifiers.
Multilingual Support: The system detects the user's language and responds accordingly. Bedrock Nova Pro handles Hindi, English, Tamil, Telugu, and Bengali naturally without separate models.
Cost Optimization: Prompt caching saves 90% on repeated Bedrock calls. Event batching reduces EventBridge costs. DynamoDB on-demand pricing means zero cost when idle. Total monthly cost: $0-5.
Infrastructure as Code: Everything is defined in AWS CDK (TypeScript). I can deploy the entire stack to a new region in under 30 minutes.
Demo
Demo Highlights:
- 6 diverse demo citizens (ages 25-75, various states and circumstances)
- 5 government benefit schemes with complex eligibility criteria
- Real-time eligibility checking with AI-powered reasoning
- Add new citizens and see instant eligibility analysis
- Multilingual voice interface supporting 5 Indian languages
- WhatsApp-style conversational interface
What I Learned
1. Property-Based Testing Changes Everything
I thought I understood testing until I discovered Hypothesis. Instead of writing "test this specific input," I wrote "test this property holds for ALL inputs." For example:
1
2
3
4
5
def test_eligibility_is_deterministic(citizen, benefit):
result1 = check_eligibility(citizen, benefit)
result2 = check_eligibility(citizen, benefit)
assert result1 == result2This found bugs I never would have caught with traditional unit tests. It's like having a QA engineer who tries thousands of edge cases automatically.
2. LLMs Need Guardrails, Not Just Prompts
Early on, I thought good prompts were enough. But LLMs are probabilistic - they can hallucinate, leak PII, or give inconsistent answers. I learned to:
- Mask all PII before LLM calls
- Validate outputs with Pydantic models
- Use confidence scores to flag uncertain responses
- Implement retry logic with exponential backoff
- Cache prompts to ensure consistency
The system is now deterministic where it needs to be (eligibility decisions) and creative where it helps (explanations).
3. Serverless Scales, But Design Matters
Lambda and DynamoDB scale automatically, but poor design can still cause problems. I learned:
- Cold starts matter: Keep Lambda functions small and use provisioned concurrency for critical paths
- DynamoDB design is crucial: Single-table design with composite keys (CITIZEN#id, BENEFIT#id) enables efficient queries
- EventBridge is powerful: Event-driven architecture decouples services and enables async workflows
- Observability is essential: CloudWatch metrics and logs are your eyes in production
4. Accessibility Isn't Optional
Building for rural India taught me that accessibility isn't a feature - it's a requirement. I learned:
- Voice interfaces need to handle background noise and accents
- WhatsApp is more accessible than web apps for many users
- Simple language matters more than technical accuracy
- Progressive profiling (asking for info gradually) reduces friction
- Offline-first design is critical for areas with poor connectivity
5. Cost Optimization Enables Scale
AWS Free Tier seems limiting until you optimize for it. I learned:
- Prompt caching reduces Bedrock costs by 90%
- DynamoDB on-demand pricing is perfect for unpredictable workloads
- S3 lifecycle policies automatically archive old data
- EventBridge batching reduces event costs
- Lambda's pay-per-use model means zero cost when idle
The result: A system that can serve 100,000 citizens for $50-100/month.
6. Social Impact Requires Empathy
The biggest lesson wasn't technical - it was human. I learned:
- Technology alone doesn't solve problems; understanding users does
- Language support isn't just translation; it's cultural context
- Privacy matters more when users are vulnerable
- Simple explanations build trust more than technical accuracy
- Proactive notifications are more valuable than reactive queries
Building for social impact means building with empathy. Every design decision should ask: "Does this help the person who needs it most?"
Scale Potential:
- "Can handle 100+ government schemes"
- "Millions of citizens"
- "Integration with ABDM for healthcare benefits"
- "Proactive notifications when new schemes launch"
Beyond Benefits - Platform Extensibility:
"But here's the key - this isn't just a benefits platform. The same architecture can power:"
- Education: "Match students to scholarships, coaching programs, skill development schemes"
- Healthcare: "Connect patients to government hospitals, medicine subsidies, health insurance"
- Employment: "Link job seekers to NREGA, skill training, employment exchanges"
- Agriculture: "Guide farmers to crop insurance, MSP information, agricultural loans"
- Legal Aid: "Direct citizens to free legal services, consumer courts, grievance redressal"
"The AI reasoning engine, document processing, and multi-channel interface work for any citizen-government interaction. We've built a platform, not just an app."
Real-World Impact:
- "Imagine every eligible widow automatically notified about pension schemes"
- "Every student matched to scholarships they qualify for"
- "Every farmer guided to crop insurance before monsoon season"
- "Every patient connected to free healthcare programs"
[Final statement]
"NagrikAI is a universal citizen engagement platform. Today it's benefits, tomorrow it's education, healthcare, employment - any government service. It's built on AWS, it's scalable, it's secure, and it's ready to transform how 1.4 billion Indians access their government."
Made with ❤️ for Indian citizens to access their rightful benefits
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article