Give farmers agricultural advice through AI chat
Workflow purpose
This guide demonstrates how to use Proto's AI agent to give farmers practical advice on the channels they already use – crop and livestock guidance, help with pests and diseases, local weather and current market prices.
The workflow answers questions from your approved extension material, fetches the forecast for the farmer's area and the latest prices from your market information system, and shows price trends as a chart. Farmers can send a photo of an affected crop or animal, and anything that needs an expert is passed to an extension officer with the details attached.
Extension services rarely have enough officers to reach every farmer in person. An AI agent can answer routine questions at any hour and in local languages, so officers can spend their time on farm visits and outbreaks.
Who can benefit from this guide:
- Ministries and departments of agriculture
- Agricultural extension and advisory services
- Farmer cooperatives and agri-development programmes
- Agricultural research institutes and development partners
Agricultural advisory
This workflow gives farmers advice, weather and market prices 24/7, and connects them to an extension officer when needed. See how to build an agricultural advisory workflow.
1. Add your extension material to the knowledge base
Ground every answer in advice your experts have approved.
In the AI agent’s Knowledge base, add your extension guides as a File or URL – crop calendars, planting and fertiliser guidance, livestock health, pest and disease identification, and water and soil management. The AI agent answers general farming questions from this content in its own words, so keep it current for each season.
2. Create a trigger
Start the flow when a farmer asks for advice.
- Navigate to the Workflows tab in the AI agent settings.
- Click New workflow and select Message received as the Workflow type.
- Name the trigger (e.g. “Farm Advisory”) and add a short description (e.g. “Triggers if user asks about crops, livestock, pests, diseases, weather or market prices for their farm.”).
- Add training phrases (e.g. “When should I plant maize”, “My cattle are sick”, “There are insects on my crops”, “Will it rain this week”, “What’s the price of beans”).
If farmers in your area speak several languages, add a Switch language action, or offer a language choice at the start of the chat, so advice is given in the farmer’s language.
3. Ask about the farm
Collect the details that make advice local.
Add an Ask survey action. Action title: Farm details
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| Which district or region is your farm in? | region |
Text | Please enter your district or region |
| What do you farm? | farm_type |
Text | Please choose one of the options below |
Add Quick answers to the second field: Crops | Livestock | Both. Then add a Send message with quick reply options: Crop or livestock advice | Pests and diseases | Weather | Market prices, and a Message received sub-trigger for each.
4. Help with pests and diseases
Under the Pests and diseases sub-trigger, add an Ask survey action. Action title: Symptom report
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| Which crop or animal is affected? | affected |
Text | Please tell me the crop or animal |
| What are you seeing? | symptoms |
Text | Please describe what you’re seeing |
| Send a photo if you can | symptom_photo |
Attachment | Not applicable |
Turn Enable skip on for the photo. Then add an LLM Processing action with a system prompt that tells it to suggest likely causes and first steps only from your approved guidance, to say when it isn’t sure, and to recommend an extension officer for anything serious. Input: {affected} – {symptoms} – {region}. Resulting variable: pest_advice. Send it with a Send message.
5. Share the weather forecast
Under the Weather sub-trigger, add a Send API action (HTTP method: GET) to your meteorological service or weather provider, passing region. Resulting variable: forecast.
Add a Send message with the forecast for the coming days, e.g. “Next 3 days in {region}: {forecast[“summary”]}. Expected rainfall: {forecast[“rain_mm”]} mm.“
6. Share market prices
Under the Market prices sub-trigger, add an Ask survey for the commodity (commodity, Text), then a Send API action (HTTP method: GET) to your market information system. Resulting variable: prices.
Add a Send graph action:
- Graph type: line
- Graph title: e.g. “{commodity} prices – last 8 weeks”
- Chart data input: the weeks and prices from
prices - X-axis label: Week. Y-axis label: Price per kg
Send graph is available on Enterprise plans, and its chart shows only in Webchat and full-screen Webchat. Put it under a Branch with the condition _channel.type == "webchat" or _channel.type == "fullscreen_webchat", and under Else add a Send message with the last few weekly prices instead, for farmers on WhatsApp and other channels.
Follow it with a Send message giving the latest price at the nearest markets.
7. Connect to an extension officer
Pass anything serious – a suspected outbreak, sick livestock, crop failure – to a person.
After each answer, add a Send message with quick reply options: That’s all | Talk to an extension officer. Under a Message received sub-trigger for Talk to an extension officer:
- If officers work in the chat, add a Live agent handoff action assigned to the team for that region.
- If officers follow up by visit or phone, add a Create ticket action with
region,affected,symptomsand the photo in the description, assigned to the regional team, with Auto-apply tags such as pest-report so you can spot outbreaks by area.
8. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Ask general crop and livestock questions and check the answers match your extension material.
- Report a pest with and without a photo, and confirm uncertain cases are referred to an officer.
- Check the forecast and price chart for several regions and commodities.
- Test each language you support.
- Build and test in an undeployed version – Duplicate the live version first – then Deploy it once every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)