-
-
Login Page
-
Login Mobile View Page
-
Register Page
-
Kisan Mitra - AI Dashboard Page
-
Mobile View Dashboard Page
-
Soil Analysis Page
-
Soil Analysis History Page
-
Soil Analysis Saved Report Page
-
Soil Analysis Recommendation Page
-
Soil Analysis 12 Months Regenerative Plan Page
-
Quality Grading Page
-
Quality Grading History Results Page
-
Voice Query Page
-
Voice Query with Result Page
-
Voice Query Mobile ViewPage
-
Planting Advisory Page
-
Planting Advisory History Result Page
-
Kisan Mitra - AI About Page
Kisan-Mitra AI - Amazon Nova AI Hackathon Submission
🌟 Inspiration
Agriculture is the backbone of India's economy, supporting over 58% of the rural population. Yet, farmers face numerous challenges daily:
- Language Barriers: Most agricultural information is available only in English, creating a massive accessibility gap for regional language speakers
- Information Asymmetry: Farmers struggle to access real-time market prices, leading to exploitation by middlemen
- Limited Expert Access: Agricultural experts are scarce in rural areas, leaving farmers without timely guidance
- Soil Health Ignorance: Expensive soil testing and complex reports prevent farmers from understanding their land's needs
- Quality Assessment Challenges: Farmers lack tools to objectively grade their produce, resulting in unfair pricing
We were inspired to bridge this digital divide by creating an AI-powered companion that speaks the farmer's language, understands their challenges, and provides actionable insights at their fingertips. Kisan-Mitra AI (Farmer's Friend AI) was born from the vision of democratizing agricultural knowledge through cutting-edge AI technology.
💡 What it does
Kisan-Mitra AI is a comprehensive, voice-first agricultural intelligence platform that empowers farmers throughout the entire farming lifecycle. It combines Amazon Bedrock's Nova Pro model with AWS AI services to deliver:
1. 🎤 Krishi-Vani (Voice Intelligence)
- Natural Language Conversations: Farmers can speak naturally in Hindi, English, or regional dialects
- Real-time Advisory: Ask about market prices, weather forecasts, crop diseases, or farming techniques
- Voice Responses: Get answers in their preferred language through text-to-speech
- Example Queries:
- "Aaj ke aloo ke bhav kya hain Delhi mein?" (What are today's potato prices in Delhi?)
- "Mere khet mein gehun ki patti peeli ho rahi hai, kya karun?" (My wheat leaves are turning yellow, what should I do?)
2. 📸 Quality Grader (Vision AI)
- Instant Produce Grading: Take a photo of fruits or vegetables to get quality assessment
- AI-Powered Analysis: Detects defects, analyzes size, color uniformity, and freshness
- Market Price Estimation: Provides grade (A, B, C) with estimated market value
- Supported Crops: Potatoes, tomatoes, onions, apples, and more
3. 🌱 Dhara-Analyzer (Soil Intelligence)
- Digital Soil Health Cards: Upload a photo of soil test reports for instant digitization
- Automated Data Extraction: AI extracts all nutrient values (N, P, K, pH, organic carbon, micronutrients)
- Personalized Recommendations: Get fertilizer plans and regenerative farming strategies
- Soil-Specific Crop Suggestions: Recommendations tailored to your soil's unique characteristics
4. 🌾 Sowing Oracle (Planting Advisor)
- Smart Crop Recommendations: AI suggests what to plant based on location, season, and soil conditions
- Optimal Planting Windows: Know exactly when to sow for maximum yield
- Seed Variety Selection: Get recommendations for specific seed varieties with yield potential
- Market Demand Forecasts: Understand which crops will be profitable
5. 💰 Mandi Price Intelligence
- Real-time Market Prices: Access live wholesale prices from major mandis across India
- Historical Trends: Analyze price patterns to make informed selling decisions
- Location-based Pricing: Get prices specific to your region
🛠️ How we built it
Architecture Overview
We built Kisan-Mitra AI using a modern, serverless architecture on AWS, with Amazon Bedrock's Nova Pro model as the core intelligence engine.
┌─────────────┐
│ Farmer │ (Voice/Photo/Text Input)
└──────┬──────┘
│
▼
┌─────────────────────────────────────┐
│ React Frontend (PWA) │
│ - Voice Recording (Web Audio API) │
│ - Image Upload & Preview │
│ - Real-time Chat Interface │
└──────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ API Gateway + AWS Lambda │
│ - ASP.NET Core 8 API │
│ - JWT Authentication (Cognito) │
│ - Request Routing & Validation │
└──────────────┬──────────────────────┘
│
┌───────┴───────┐
▼ ▼
┌─────────────┐ ┌─────────────┐
│ AWS AI │ │ Data Layer │
│ Services │ │ │
│ │ │ - DynamoDB │
│ - Bedrock │ │ - S3 │
│ Nova Pro │ │ - Timestream│
│ - Transcribe│ │ │
│ - Rekognition│ │ │
│ - Textract │ │ │
│ - Polly │ │ │
└─────────────┘ └─────────────┘
Technology Stack
Backend (.NET 8 / C#)
- Framework: ASP.NET Core 8 Web API
- Architecture: Clean Architecture (Core, Infrastructure, API layers)
- Deployment: AWS Lambda with Function URLs
- Authentication: Amazon Cognito with JWT tokens
- Testing: xUnit with property-based testing (FsCheck)
AI & Cloud Services (AWS)
- Amazon Bedrock Nova Pro: Core AI reasoning engine for all intelligent features
- Voice query understanding and response generation
- Seed variety recommendations with soil-specific reasoning
- Planting advisory with context-aware suggestions
- Soil analysis interpretation and regenerative farming plans
- Amazon Transcribe: Multi-language speech-to-text (Hindi, English, Punjabi, Bengali)
- Amazon Polly: Natural-sounding text-to-speech responses
- Amazon Rekognition: Image analysis for quality grading and defect detection
- Amazon Textract: OCR for soil health card digitization
- Amazon S3: Scalable object storage for images and audio files
- Amazon DynamoDB: NoSQL database for user profiles and mandi prices
- Amazon Timestream: Time-series data for price trends and weather
- AWS Lambda: Serverless compute for cost-effective scaling
- Amazon Cognito: Secure user authentication and authorization
- Amazon CloudFront: Global CDN for low-latency content delivery
Frontend (React + TypeScript)
- Framework: React 18 with TypeScript
- State Management: Redux Toolkit
- UI Components: Material-UI with custom theming
- Audio Recording: Web Audio API for voice capture
- Image Handling: Canvas API for client-side optimization
- PWA: Progressive Web App for mobile-first experience
Key Implementation Details
1. Direct Bedrock Nova Pro Integration
We implemented direct API calls to Amazon Bedrock's Nova Pro model for maximum flexibility and cost efficiency:
// DirectBedrockSeedVarietyRecommender.cs
public async Task<List<SeedVariety>> RecommendVarietiesAsync(
PlantingWindow window,
string location,
SoilAnalysisResult soilData)
{
// Build context-rich prompt with soil data
var prompt = BuildPrompt(window, location, soilData);
// Direct Bedrock API call
var request = new InvokeModelRequest
{
ModelId = "us.amazon.nova-pro-v1:0",
Body = JsonSerializer.SerializeToUtf8Bytes(new
{
messages = new[] { new { role = "user", content = prompt } },
inferenceConfig = new {
temperature = 0.7,
maxTokens = 2000
}
})
};
var response = await _bedrockRuntime.InvokeModelAsync(request);
// Parse AI-generated recommendations
return ParseVarieties(response);
}
2. Voice Query Pipeline
// VoiceQueryService.cs
public async Task<VoiceQueryResponse> ProcessVoiceQueryAsync(
Stream audioStream,
string language)
{
// Step 1: Speech-to-Text
var transcription = await _transcribeService
.TranscribeAudioAsync(audioStream, language);
// Step 2: AI Understanding & Response (Nova Pro)
var aiResponse = await _bedrockService
.GenerateResponseAsync(transcription, userContext);
// Step 3: Text-to-Speech
var audioResponse = await _pollyService
.SynthesizeSpeechAsync(aiResponse, language);
return new VoiceQueryResponse
{
Transcription = transcription,
TextResponse = aiResponse,
AudioResponse = audioResponse
};
}
3. Soil Analysis with AI Interpretation
// SoilAnalysisService.cs
public async Task<SoilAnalysisResult> AnalyzeSoilHealthCardAsync(
Stream imageStream)
{
// Step 1: Extract text from image
var extractedData = await _textractService
.ExtractTextAsync(imageStream);
// Step 2: Parse soil parameters
var soilParams = ParseSoilParameters(extractedData);
// Step 3: AI-powered interpretation (Nova Pro)
var analysis = await _bedrockService
.InterpretSoilDataAsync(soilParams);
// Step 4: Generate regenerative farming plan
var plan = await _bedrockService
.GenerateRegenerativePlanAsync(soilParams, analysis);
return new SoilAnalysisResult
{
Parameters = soilParams,
Analysis = analysis,
RegenerativePlan = plan
};
}
4. Quality Grading with Vision AI
// QualityGradingService.cs
public async Task<QualityGrade> GradeProduceAsync(
Stream imageStream,
string cropType)
{
// Step 1: Image analysis
var imageAnalysis = await _rekognitionService
.DetectImagePropertiesAsync(imageStream);
// Step 2: Defect detection
var defects = await _rekognitionService
.DetectDefectsAsync(imageStream);
// Step 3: Calculate quality score
var score = CalculateQualityScore(imageAnalysis, defects);
// Step 4: AI-powered grading explanation (Nova Pro)
var explanation = await _bedrockService
.ExplainGradingAsync(score, imageAnalysis, defects);
return new QualityGrade
{
Grade = DetermineGrade(score),
Score = score,
Explanation = explanation,
EstimatedPrice = GetPriceRange(cropType, score)
};
}
Development Process
- Requirements Gathering: Interviewed farmers to understand pain points
- Architecture Design: Designed serverless, cost-optimized architecture
- Backend Development: Built .NET 8 API with clean architecture principles
- AI Integration: Integrated Amazon Bedrock Nova Pro with custom prompting strategies
- Frontend Development: Created responsive React PWA with voice and image capabilities
- Testing: Comprehensive unit and integration testing
- Deployment: Automated deployment to AWS Lambda with CI/CD
- Optimization: Iterative performance and cost optimization
🚧 Challenges we ran into
1. Cost Optimization Challenge
Problem: Initial architecture used Amazon OpenSearch Serverless for RAG (Retrieval-Augmented Generation), costing $197/month (~$7,114/year) for a prototype.
Solution: Pivoted to direct Amazon Bedrock Nova Pro API calls with intelligent prompting, reducing costs to ~$2/month while maintaining high-quality recommendations. This 98.5% cost reduction made the solution viable for scale.
2. Multi-language Voice Recognition
Problem: Indian farmers speak various dialects with regional accents, making accurate transcription difficult.
Solution: Leveraged Amazon Transcribe's multi-language support with custom vocabulary for agricultural terms. Implemented fallback mechanisms and confidence scoring to handle unclear audio.
3. Soil Health Card Variability
Problem: Soil test reports come in different formats from various labs, making consistent data extraction challenging.
Solution: Used Amazon Textract with custom post-processing logic to handle format variations. Implemented fuzzy matching for parameter names and unit conversion for standardization.
4. Real-time Performance on Lambda
Problem: Cold starts on AWS Lambda caused delays in voice query responses (3-5 seconds).
Solution:
- Implemented Lambda provisioned concurrency for critical functions
- Optimized .NET 8 startup time with ReadyToRun compilation
- Used Lambda function URLs for direct invocation (bypassing API Gateway overhead)
5. Image Quality Grading Accuracy
Problem: Produce images taken in varying lighting conditions and angles affected grading accuracy.
Solution:
- Implemented client-side image preprocessing (brightness normalization, rotation correction)
- Used Amazon Rekognition's ImageProperties API for lighting analysis
- Combined multiple detection features (color, texture, shape) for robust scoring
6. Context Preservation in Voice Conversations
Problem: Farmers often ask follow-up questions that require context from previous queries.
Solution: Implemented conversation history tracking in DynamoDB with sliding window context. Nova Pro's large context window allowed us to include relevant conversation history in prompts.
7. Prompt Engineering for Agricultural Domain
Problem: Generic AI responses lacked agricultural expertise and regional context.
Solution: Developed domain-specific prompts with:
- Agricultural terminology and best practices
- Regional crop calendars and climate considerations
- Soil science principles for interpretation
- Market dynamics and pricing factors
8. Authentication & Security
Problem: Farmers often share devices, requiring secure yet simple authentication.
Solution: Implemented Amazon Cognito with SMS-based OTP for passwordless login, combined with JWT tokens for API security and Google reCAPTCHA for bot protection.
🏆 Accomplishments that we're proud of
1. Real-world Impact
Built a production-ready application that addresses genuine farmer challenges, not just a hackathon demo. The voice-first interface makes AI accessible to farmers with limited literacy.
2. Cost-Effective AI at Scale
Achieved 98.5% cost reduction (from $197/month to $2/month) by optimizing our use of Amazon Bedrock Nova Pro, making the solution economically viable for widespread deployment.
3. Seamless Multi-modal Experience
Successfully integrated voice, vision, and text interfaces into a cohesive user experience. Farmers can interact naturally through their preferred mode.
4. Direct Bedrock Integration Mastery
Implemented sophisticated prompt engineering with Amazon Bedrock Nova Pro that delivers context-aware, soil-specific recommendations without requiring expensive vector databases.
5. Clean Architecture Implementation
Built a maintainable, testable codebase following clean architecture principles with comprehensive unit and integration tests.
6. Serverless Excellence
Deployed a fully serverless application on AWS Lambda that scales automatically from zero to thousands of requests with minimal operational overhead.
7. Accessibility First
Created an inclusive platform that works in multiple Indian languages, supports low-bandwidth scenarios, and functions as a Progressive Web App on any device.
8. End-to-End AWS Integration
Leveraged 10+ AWS services cohesively (Bedrock, Transcribe, Polly, Rekognition, Textract, Lambda, DynamoDB, S3, Cognito, CloudFront) to create a comprehensive solution.
📚 What we learned
Technical Learnings
Amazon Bedrock Nova Pro Capabilities
- Nova Pro's reasoning abilities excel at agricultural advisory when provided with rich context
- Direct API calls offer more flexibility than Knowledge Bases for dynamic use cases
- Proper prompt engineering is crucial for domain-specific applications
- Temperature tuning (0.7) balances creativity with factual accuracy
Serverless Architecture Best Practices
- Lambda cold starts can be mitigated with provisioned concurrency and optimization
- Single Lambda function approach reduces complexity and cost for moderate traffic
- Function URLs provide lower latency than API Gateway for simple use cases
- .NET 8 with ReadyToRun compilation significantly improves Lambda performance
Multi-modal AI Integration
- Combining voice, vision, and text requires careful UX design for seamless transitions
- Audio quality preprocessing dramatically improves transcription accuracy
- Image normalization is essential for consistent vision AI results
- Context management across modalities enhances user experience
Cost Optimization Strategies
- Vector databases (OpenSearch) are expensive for low-traffic applications
- Direct LLM calls with good prompting can replace RAG for many use cases
- Serverless pay-per-use model is ideal for variable agricultural workloads
- S3 lifecycle policies and DynamoDB on-demand pricing reduce storage costs
Domain Learnings
Agricultural Challenges
- Language accessibility is the biggest barrier to technology adoption in rural areas
- Farmers need actionable insights, not just data
- Trust is built through consistent, accurate recommendations
- Regional variations in crops, climate, and practices require localized solutions
User Experience for Rural Users
- Voice-first interfaces are more intuitive than text for low-literacy users
- Simple, focused features work better than complex multi-step workflows
- Visual feedback (images, icons) aids understanding across language barriers
- Offline capabilities are essential for areas with poor connectivity
AI Ethics in Agriculture
- AI recommendations must be explainable and transparent
- Fallback mechanisms are critical when AI confidence is low
- Cultural sensitivity in language and advice is paramount
- Data privacy is crucial when handling farmer information
Team Learnings
- Rapid Prototyping: Iterative development with user feedback led to better product-market fit
- Technical Debt Management: Balancing speed with code quality for sustainable development
- Cloud Cost Awareness: Monitoring and optimizing cloud costs from day one prevents surprises
- Documentation Importance: Comprehensive documentation accelerated development and debugging
🚀 What's next for Kisan-Mitra AI
Short-term Enhancements (3-6 months)
Expanded Language Support
- Add 10+ Indian regional languages (Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Odia, Assamese)
- Dialect-specific models for better transcription accuracy
- Regional crop knowledge bases
Mobile Native Apps
- iOS and Android native applications for better performance
- Offline mode with local caching for low-connectivity areas
- Push notifications for weather alerts and price updates
Crop Disease Detection
- Image-based disease identification using Amazon Rekognition Custom Labels
- Treatment recommendations with pesticide/organic alternatives
- Disease outbreak tracking and alerts
Weather Integration
- Real-time weather forecasts integrated with planting advice
- Extreme weather alerts (frost, heatwave, heavy rain)
- Climate-smart agriculture recommendations
Community Features
- Farmer-to-farmer knowledge sharing
- Local expert Q&A forums
- Success story showcases
Medium-term Goals (6-12 months)
Government Scheme Integration
- Automatic eligibility checking for subsidies and schemes
- Application assistance for government programs
- Direct benefit transfer tracking
Marketplace Integration
- Connect farmers directly with buyers
- Fair price negotiation platform
- Quality-based pricing transparency
Financial Services
- Crop insurance recommendations
- Micro-loan eligibility assessment
- Input financing options
Advanced Analytics
- Yield prediction models
- Profit optimization recommendations
- Multi-season crop rotation planning
IoT Integration
- Soil moisture sensor data integration
- Automated irrigation recommendations
- Real-time field monitoring
Long-term Vision (1-2 years)
AI-Powered Farm Management
- Complete farm digitization
- Automated record-keeping (expenses, yields, sales)
- Multi-year farm performance analytics
Precision Agriculture
- Drone imagery integration for field health monitoring
- Variable rate application recommendations
- GPS-guided farming advice
Supply Chain Transparency
- Farm-to-fork traceability
- Blockchain-based quality certification
- Export market access
Climate Resilience
- Carbon credit calculation and trading
- Regenerative agriculture transition support
- Climate adaptation strategies
Scale & Impact
- Reach 1 million farmers across India
- Partner with agricultural universities and research institutions
- Expand to other developing countries in Asia and Africa
Technical Roadmap
Enhanced AI Capabilities
- Fine-tune Nova Pro on agricultural datasets
- Implement multi-agent AI systems for complex queries
- Add computer vision models for pest and disease detection
Performance Optimization
- Edge computing for offline AI inference
- Model quantization for faster mobile performance
- Caching strategies for frequently accessed data
Data Platform
- Build comprehensive agricultural data lake
- Implement data analytics for insights and trends
- Create open APIs for third-party integrations
Security & Compliance
- Achieve ISO 27001 certification
- Implement end-to-end encryption for sensitive data
- GDPR and data localization compliance
🎯 Impact Metrics
Current Achievements
- ✅ 4 Core Features: Voice queries, quality grading, soil analysis, planting advisory
- ✅ 10+ AWS Services: Seamlessly integrated
- ✅ Multi-language Support: Hindi, English, and extensible to 10+ languages
- ✅ 98.5% Cost Reduction: From $197/month to $2/month
- ✅ Production-Ready: Deployed on AWS with CI/CD pipeline
Target Impact (Year 1)
- 🎯 10,000 Farmers: Active users across 5 Indian states
- 🎯 100,000 Queries: Voice and text queries processed
- 🎯 15% Income Increase: Average farmer income improvement through better pricing and crop selection
- 🎯 50% Time Savings: Reduction in time spent seeking agricultural information
- 🎯 30% Soil Health Improvement: Through regenerative farming recommendations
🛠️ Technical Specifications
Amazon Bedrock Nova Pro Usage
Model: us.amazon.nova-pro-v1:0
Use Cases:
- Voice query understanding and response generation
- Seed variety recommendations with soil-specific reasoning
- Planting advisory with context-aware suggestions
- Soil analysis interpretation
- Quality grading explanations
Prompt Engineering Strategy:
- Context-rich prompts with soil data, location, and historical information
- Structured output formats (JSON) for reliable parsing
- Temperature: 0.7 for balanced creativity and accuracy
- Max tokens: 2000 for comprehensive responses
Cost Efficiency:
- Average tokens per request: 1,500 (input) + 500 (output)
- Cost per request: ~$0.001
- Monthly cost (1000 requests): ~$2
Performance Metrics
- API Response Time: <2 seconds (p95)
- Voice Query Latency: <5 seconds end-to-end
- Image Analysis Time: <3 seconds
- Transcription Accuracy: >90% for clear audio
- Uptime: 99.9% (AWS Lambda SLA)
📹 Demo & Resources
- Video Demo: https://youtu.be/cArJ_4qVSy0
- GitHub Repository: https://github.com/Rajatsahu0/Kisan-Mirta-AI
👥 Team
Built with ❤️ by developers passionate about using AI to solve real-world agricultural challenges.
🙏 Acknowledgments
- AWS: For providing world-class cloud infrastructure and AI services
- Amazon Bedrock Team: For the powerful Nova Pro model
- Farmers: Who provided invaluable feedback and testing
- Agricultural Experts: For domain knowledge and validation
📄 License
Copyright © 2026 Kisan Mitra AI Team. All rights reserved.
Kisan-Mitra AI - Empowering Farmers with AI-Powered Agricultural Intelligence
Built for the Amazon Nova AI Hackathon
Built With
- ai
- amazon-cloudfront-cdn
- amazon-cloudwatch
- amazon-dynamodb
- amazon-nova
- api-gateway
- aws-lambda
- awscognito
- bedrock
- dotnet
- dotnet-api
- nova
- polly
- s3
- textract
- transcribe
Log in or sign up for Devpost to join the conversation.