
KrishiRakshak AI: Building an AI-Powered Weather Risk and Crop Advisory Assistant for Indian Farmers
KrishiRakshak AI is an AI-powered weather risk monitoring and crop advisory application designed to help Indian farmers make more informed agricultural decisions. Built using Python, Streamlit, and the Strands Agents SDK, the application combines live weather data from the Open-Meteo API, two-day weather forecasts, rule-based weather risk analysis, and crop-specific precautions. It supports Marathi, Hindi, and English, making weather insights more accessible to farmers.
KrishiRakshak AI: Building an AI-Powered Weather Risk and Crop Advisory Assistant for Indian Farmers
Introduction
Agriculture plays a vital role in India's economy, supporting millions of farmers and their families. However, unpredictable weather conditions, sudden rainfall, high temperatures, and changing environmental patterns create significant challenges for agricultural productivity.
For many farmers, timely access to understandable weather information and crop-specific precautions can make an important difference in protecting their crops.
To address this challenge, I developed KrishiRakshak AI, an AI-powered weather risk monitoring and crop advisory application designed to help Indian farmers understand weather conditions and make more informed agricultural decisions.
The project combines live weather data, rule-based risk analysis, crop-specific recommendations, and an AI agent built using the Strands Agents SDK.
The Problem
Farmers frequently face challenges such as:
- Unexpected rainfall that can affect crop growth.
- High temperatures and changing weather conditions.
- Difficulty understanding weather forecasts and their agricultural impact.
- Limited access to crop-specific precautions in regional languages.
- The need to interpret weather information before making farming decisions.
Weather information alone is not always enough. Farmers also need simple explanations of potential risks and practical precautions relevant to their crops.
This inspired me to build KrishiRakshak AI.
The Solution: KrishiRakshak AI
KrishiRakshak AI is an interactive web application that converts weather information into understandable agricultural insights.
Users can select their location and crop to explore current weather conditions, upcoming forecasts, potential weather risks, and crop-specific precautions.
The goal is simple:
Make weather information more useful, understandable, and actionable for farmers.
Key Features
1. Live Weather Monitoring
The application retrieves live weather information using the Open-Meteo API, helping users understand current weather conditions.
2. Two-Day Weather Forecast
Users can view upcoming weather conditions to better understand possible changes that may affect their crops.
3. Weather Risk Analysis
A rule-based risk analysis system evaluates weather conditions and identifies potential risks based on predefined thresholds.
4. Crop-Specific Precautions
The application provides precautions based on the selected crop, helping users understand what they should consider under different weather conditions.
5. Multilingual Interface
KrishiRakshak AI supports three languages:
- Marathi
- Hindi
- English
This makes the application more accessible to users who prefer regional languages.
6. AI Agent Integration Using Strands Agents SDK
One of the important components of this project is its integration with the Strands Agents SDK.
The application includes an AI agent that uses a local Ollama model, Qwen 2.5 (1.5B), to generate English-language responses.
This integration demonstrates how an AI agent can be incorporated into a practical application to provide more understandable responses.
How Strands Agents SDK Is Used
I used the Strands Agents SDK to integrate agent-based AI capabilities into KrishiRakshak AI.
The agent is designed to support the application's agricultural advisory experience by generating responses using the configured local language model.
The project uses:
- Strands Agents SDK for agent integration.
- Ollama for running the local language model.
- Qwen 2.5 (1.5B) as the configured model.
The agent operates as part of the application's AI advisory functionality.
This approach allowed me to explore how the Strands Agents SDK can be integrated into a real-world problem-solving application.
Technology Stack
The project uses the following technologies:
Technology | Purpose |
|---|---|
Python | Core application development |
Streamlit | Interactive web application |
Strands Agents SDK | AI agent integration |
Ollama | Local model execution |
Qwen 2.5 (1.5B) | Language model |
Open-Meteo API | Weather data and forecasts |
AWS EC2 | Application hosting and deployment |
Nginx | Reverse proxy and web server |
HTTPS / SSL | Secure website access |
Application Architecture and Workflow
The application follows a straightforward workflow:
- The user opens the KrishiRakshak AI web application.
- The user selects a location and crop.
- The application retrieves weather information from the Open-Meteo API.
- The system evaluates weather conditions using predefined risk-analysis rules.
- Crop-specific precautions are displayed.
- The integrated Strands-based AI agent provides English-language AI responses using the configured local model.
- Results are presented through an interactive Streamlit dashboard.
This workflow brings together weather data, rule-based analysis, and AI capabilities in a single application.
AWS Deployment
To make KrishiRakshak AI accessible through the internet, I deployed the application on an Amazon EC2 instance.
The deployment includes:
- Amazon EC2 for hosting the application.
- Nginx as a reverse proxy to forward incoming web requests to the Streamlit application.
- SSL/TLS configuration for HTTPS access.
- A custom domain for accessing the application.
This deployment gave me practical experience in hosting a Python-based application on AWS and configuring web access through a custom domain.
Challenges and Learning Experience
Building KrishiRakshak AI involved learning and solving several practical challenges.
Integrating an AI Agent
Understanding how to integrate the Strands Agents SDK with an existing Streamlit application was an important learning experience.
Working with Local Language Models
Configuring Ollama and running a lightweight language model helped me explore local AI inference.
Weather Data Processing
Converting raw weather information into understandable risk insights required defining suitable analysis rules and connecting them with crop-specific precautions.
AWS Deployment
Deploying the application on EC2 and configuring Nginx, HTTPS, and a custom domain provided valuable hands-on cloud deployment experience.
Through this project, I gained practical experience in Python application development, AI agent integration, API usage, and AWS infrastructure.
Current Limitations
KrishiRakshak AI is a prototype, and there are opportunities for further improvement.
- Weather risk alerts currently rely on predefined thresholds.
- Marathi and Hindi advisory responses are rule-based.
- The Strands-based AI agent currently supports English-language responses.
- The application does not replace official weather alerts or professional agricultural advice.
Agricultural recommendations should be verified with qualified agricultural experts before making important farming decisions.
Future Scope
I plan to improve KrishiRakshak AI with additional capabilities, including:
- More advanced AI-powered crop advisory.
- Improved multilingual AI responses.
- Integration of additional agricultural data sources.
- More detailed weather-risk prediction.
- Crop disease identification and early-warning capabilities.
- Expanded regional and crop coverage.
These improvements could make the application more useful and accessible to a wider farming community.
Social Impact
The main motivation behind KrishiRakshak AI is to explore how accessible technology can help address practical agricultural challenges.
By combining weather information, understandable risk analysis, crop-specific precautions, and AI capabilities, the project aims to support farmers in making more informed decisions.
I believe that AI and cloud technologies can create meaningful solutions when they are developed with real-world problems in mind.
Conclusion
KrishiRakshak AI is my attempt to combine Artificial Intelligence, the Strands Agents SDK, weather APIs, and AWS cloud infrastructure to address a real-world agricultural challenge.
This project has helped me move beyond theoretical learning and gain practical experience in building, integrating, and deploying an AI-powered application.
More importantly, it has strengthened my belief that technology should not only demonstrate technical capabilities but also solve problems that matter to people.
Building technology with purpose — one step towards smarter and more informed agriculture.
Project: KrishiRakshak AI
Category: AI Agents | Agriculture | Climate Resilience
Built With: Python, Streamlit, Strands Agents SDK, Ollama, Open-Meteo API, and AWS EC2
GitHub Repository: Aniket-9009/KrishiRakshak-AI: AI-Powered Weather Risk & Crop Advisory for Indian Farmers
Live Application: cloudtake.in
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article