AI-powered smart farming assistant with weather, mandi prices, crop advice, and photo-based pest/disease diagnosis
# πΎ AgriMitra β AI Agent for Smart Farming Advice
A RAG-ready, multi-language Streamlit application that gives farmers grounded,
conversational advice on weather, market (mandi) prices, and crop health.
This is a **demo/scaffold** build: all data services (weather, market prices,
knowledge retrieval) are simulated with realistic mock logic so the app runs
instantly with zero API keys. Clear placeholder functions are provided so you
can plug in real APIs and an LLM in minutes.
---
## β¨ Features
- **Multi-language UI**: English, Hindi, Spanish, Swahili (easy to extend)
- **Farmer profile sidebar**: Location, Soil Type, Current Crop
- **Live dashboard tabs**: Weather forecast, Mandi/market prices, Knowledge base
- **AI chat interface**: `st.chat_input` / `st.chat_message`, with session-persisted history
- **RAG-ready architecture**: simulated vector retrieval + LLM orchestration function,
structured for easy integration with OpenAI, Google Gemini, or LangChain
- **Trusted sources footer**: builds farmer confidence in the data
---
## π Project Structure
```
agrimitra_project/
βββ app.py # Main Streamlit application
βββ requirements.txt # Python dependencies
βββ .env.example # Template for environment-variable secrets
βββ .gitignore # Keeps secrets & venvs out of git
βββ .streamlit/
β βββ config.toml # App theme (greens/earth tones)
β βββ secrets.toml.example # Template for Streamlit-native secrets
βββ README.md # This file
```
---
## π Quick Start
```bash
# 1. Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the app
streamlit run app.py
```
The app opens at `
localhost`. No API keys are required to explore
the demo β everything works out of the box with simulated data. β¦