FarmerChat widget with OpenAI ChatKit integration for Kenya agriculture intelligence
# πΎ FarmerChat Widget
**OpenAI ChatKit-powered chat widget for agricultural intelligence.**
Complete chat interface with session server that connects farmers to real-time weather forecasts, planting recommendations, and irrigation advice through conversational AI.
## β¨ Features
- π¬ Floating chat widget with clean agricultural theme
- π€οΈ Real-time weather forecasts via OpenAI Agent Builder + MCP
- π€ **Voice input/output** - Speak your questions, hear responses (English & Swahili)
- π **Bilingual support** - Full English and Swahili language support
- πΈ **Plant disease diagnosis** - Upload photos for AI-powered health analysis
- π **Location-aware** - Auto-detect location or use default coordinates
- π± User-friendly responses (no technical jargon)
- π± Fully responsive (desktop, tablet, mobile)
- β‘ Session server with configurable default coordinates
- π Auto-session management with ChatKit
## ποΈ Architecture
```
Frontend (index.html + chatkit.js)
β
Session Server (server.js)
- Creates ChatKit sessions
- Injects default farm coordinates via headers
β
OpenAI ChatKit API
β
OpenAI Agent Builder Workflow
- Configured with SYSTEM_PROMPT.md
β
MCP Server (gap-agriculture-mcp)
- Receives coordinates from headers
- Provides 4 agricultural tools
```
## π Geographic Coverage
**IMPORTANT:** This chat widget depends on the gap-agriculture-mcp server, which uses TomorrowNow's Global Access Platform (GAP) for weather data.
**GAP coverage is limited to specific regions.** Before deploying, verify that GAP supports your target region at tomorrownow.org.
Current GAP coverage includes parts of East Africa (Kenya, Tanzania, Uganda, Ethiopia, Somalia) and potentially other regions.
## π Quick Start
### Prerequisites
- Node.js >= 18.0.0
- OpenAI API key
- Agent Builder workflow ID
- MCP server deployed (see gap-agriculture-mcp)
- **Verify GAP covers your target region**
### Local Development
```bash
# Clone and install
git clone
github.com β¦