Inspiration
Farma was born from one urgent reality: 33 million Nigerians face hunger, yet the farmers who could grow more food cannot access credit. Most smallholder farmers have no collateral, no credit history, and no formal address. Banks cannot verify what they cannot see, which is why Africa still faces a $75 billion agricultural financing gap.
I set out to build a system that could assess farm viability using satellite imagery and process loan requests through SMS, with no smartphone.
But while building it, a harder truth emerged. Many farmers are in conflict-affected regions like Borno, Adamawa, and Zamfara. A low NDVI score does not always mean a weak farmer. It can mean insurgency, displacement, or burned neighbouring fields. A loan model without a crisis context would reject the people who need help most.
That led to AEGIS: a humanitarian intelligence layer that injects live conflict, displacement, and food security signals into loan decisions, while also generating aid request reports for responders.
Then came the final constraint: humanitarian data can be weaponised. Location details in aid systems have been used to target vulnerable communities. So privacy had to be built into the architecture from day one. AEGIS outputs are aggregated at the LGA level only, never individual coordinates.
One problem. Two systems. One integrated solution: crisis-aware agricultural finance and privacy-preserving humanitarian intelligence.
What it does
AEGIS scans conflict, displacement, food security, and economic signals across Nigerian states, synthesises findings into humanitarian reports with AI-generated infographics, and maintains weekly reasoning continuity.
The Farmer system processes SMS loan requests in local languages, validates farm plausibility via satellite, and injects AEGIS crisis context into loan decisions. Privacy by architecture: All outputs are LGA-level aggregates, never camp coordinates. The system can't leak what it never computes.
How we built it
Gemini 3 + Google Search Grounding drives AEGIS intelligence. Four parallel agents scan Nigerian states for conflict, displacement, food security, and economic signals, each grounded in real-time web search with source citations. Static training data couldn't do this; grounding is essential.
Gemini 3 handles synthesis and loan decisioning. The model reasons over uncertain signals, satellite NDVI, landmark-based location confidence, AEGIS crisis context, outputting structured JSON with explicit reasoning chains and schema-constrained validation.
Thought Signatures enable marathon agents. Weekly continuity analysis replays previous thought signatures, allowing the model to reference prior reasoning: "Last week I flagged Borno as escalating, this week confirms." Multi-day reasoning continuity is core to the Marathon Agent track.
Gemini 3 Image Pro Preview (Nano Banana) generates infographics for humanitarian reports, risk heatmaps, needs assessments, and displacement charts in pdf.
Gemini 3 Flash handles high-throughput tasks: SMS parsing, language detection, crop disease diagnosis, and response generation in the farmer's dialect.
Stack: FastAPI, LangGraph, Gemini 3, Google Earth Engine, PostgreSQL(Cloud SQL), Cloud Run, Firebase
Challenges we ran into
Location verification without GPS. Farmers describe landmarks, not coordinates. We reframed: assess "is farming plausible here?" via satellite signals, not "is this the exact farm?"
Autonomous agents blocking themselves. The marathon agent synchronously awaited 60-second sub-pipelines, killing autonomy. Fix: fire-and-forget with
asyncio.create_task()Thought signature serialisation. Gemini 3's thought signatures are
memoryviewblobs. Storing them in PostgreSQL required custombase64encoding and recursive type handling.Infographics crashing reports. One failed infographic killed the entire PDF pipeline. Fix: per-image fallback to text-only equivalents.
Accomplishments that we're proud of
- Built a true end-to-end system that can run a real pilot — not just a UI prototype
- Connected humanitarian intelligence directly to farmer loan decisioning in a single pipeline
- Delivered report generation with structured narrative + AI-generated visuals + source citations
- Implemented durable job tracking and persisted state to support repeatable demos and debugging
- Reached cloud deployment and production-style operational readiness
- Designed privacy-preserving outputs from the ground up, not as an afterthought, with plan for even more privacy preservation.
What we learned
Self-correction beats accuracy. A system that says "I was wrong about X" is more trustworthy than one that's usually right but never acknowledges uncertainty. Privacy is architecture, not policy. AEGIS can't leak camp coordinates because it never computes them. Continuity beats snapshots. The marathon agent's third-day analysis is dramatically more useful than three independent reports.
What's next for Farma
Farma was built on a possibility: what if humanitarian intelligence could directly inform agricultural finance? What if we could use the data from humanitarian intelligence to genrate request for aid reports? Within a short build period, we proved it could work.
But this is a prototype: a validated idea, not a production system. What's next:
- Pilot with one cooperative in one state to validate the full loop: SMS request → satellite validation → AEGIS context → loan disbursement → repayment tracking
- Research what has failed and what has worked in agricultural finance for conflict-affected regions we need to build on existing evidence, not just intuition
- Partnerships with banks and MFIs willing to finance smallholders but held back by verification challenges
- Robust identity systems beyond SIM registration: community leader vouching, cooperative membership verification, mobile money agent partnerships
- Field agent deployment: particularly NYSC members posted to these areas, to verify farm locations before disbursement.
- Continuous refinement of AEGIS intelligence as we learn which signals actually predict displacement and food insecurity
Farma exists because 33 million Nigerians face food insecurity, and the systems meant to help them are either too slow, too rigid, or too dangerous. We built a prototype that shows another way is possible. Now we need to prove it works in the field.
Log in or sign up for Devpost to join the conversation.