AI agent gives smart farming tips using IBM Granite—crop advice, pest control, and mandi rates
# 🌾 AI Agent for Smart Farming Advice
An AI agent that provides smart farming tips using IBM Granite — crop advice, pest control, irrigation tips, and mandi rates — all simulated intelligently without external APIs. Designed to support small-scale farmers with easy, multilingual access to agricultural knowledge.
---
## 🧠 Technologies Used
- IBM Watsonx.ai Studio
- IBM Granite Foundation Model (LLM)
- IBM Cloud Object Storage
---
## ☁️ IBM Cloud Services Used
- Watsonx.ai (LangGraph + ReAct)
- Granite Model (granite-13b-chat or granite-3-8b-instruct)
- IBM Cloud Lite Account (Free Tier)
- IBM Cloud Object Storage
---
## 🧱 PART 1: Building the Agent
### ✅ Step 1: Access Watsonx.ai
- Log in at IBM Cloud
- Open the navigation menu → Watsonx > Watsonx.ai
### ✅ Step 2: Open Agent Lab
- On the dashboard, go to **Gen AI**
- Click **Automating Tasks** → **Agent Lab**
### ✅ Step 3: Create a New Project
- Click **Create New Project**
- Name: Smart Farming Agent
- Add Cloud Object Storage when prompted
### ✅ Step 4: Build the Chat Agent
- Go to the project → Select **Chat and Build**
- Click **Associate Service** → Create new service
- Choose watsonx.ai Runtime
### ✅ Step 5: Model and Tool Selection
- Choose: granite-13b-chat (or granite-3-8b-instruct)
- Click **View All** → Open **Agent Lab**
- Add:
- Agent Instructions
- Sample Questions
- **Tools** (DO NOT select):
- ❌ WebCrawler
- ❌ Tavily Search
- ❌ Python Interpreter
- ❌ Document Search
---
## 🌾 Agent Instructions (Summary)
You are a smart farming assistant built using IBM Granite on IBM Cloud. You help small-scale farmers by answering questions about crops, seasons, soil, weather, pest control, and market prices.
When greeted, say:
"Hi, I’m your Smart Farming Assistant. Ask me anything about crops, seasons, soil, weather, or prices!"
Your tasks include:
- Recommending crops suitable for the current season and location
- Explaining basic soil and pest management practices
- Offering planting or harvesti …