At 8:30 a.m. in a level 3 facility in rural Kenya, the outpatient queue is already snaking out the door.
A clinical officer has just seen a two-year-old with fever, fast breathing, and chest in-drawing. The oxygen concentrator is shared between rooms. There’s a laminated IMNCI chart on the wall, a dog-eared guideline booklet in a drawer, and a PDF of the latest child health policy saved—somewhere—on a personal phone.
Sound familiar?
This is the reality for thousands of frontline clinicians across Kenya. They are skilled, committed, and stretched thin. They don’t lack guidelines; they lack guideline access at the exact moment they’re making decisions.
The Hidden Friction of “Available” Guidelines
On paper, Kenya has a rich ecosystem of clinical guidance:
- Integrated Management of Childhood Illness (IMCI/IMNCI)
- Maternal and newborn care protocols
- HIV, TB, malaria, and NCD guidelines
- County-specific job aids and emergency charts
But in practice, those resources are:
- Scattered across PDFs, posters, and WhatsApp forwards
- Updated at different times, with older versions still in circulation
- Hard to search when you have 5 minutes per patient
So clinicians do what humans do under time pressure: rely on experience, memory, and colleagues. That often works—but it also leads to:
- Inconsistent management of common conditions
- Overuse of antibiotics “just in case”
- Missed danger signs or delayed referrals
The problem is not a lack of knowledge in the system. It’s that the knowledge is locked away in documents, not available as a conversation at the bedside.
Why Online-Only Tools Are Not Enough
There are excellent online medical resources and AI tools out there. But many level 2 and 3 facilities still face:
- Intermittent or expensive connectivity
- Power supply issues
- Shared devices and limited data bundles
In other words, a purely cloud-based tool—no matter how clever—can’t be the only answer.
If clinical decision support is going to work for Kenyan primary care, it must:
- Run offline or in low-connectivity settings
- Respect local guidelines and scope of practice
- Be fast, simple, and trustworthy
This is the gap Afya-Yangu AI is trying to fill.
What Is Afya-Yangu AI?
Afya-Yangu AI is an experiment in offline, guideline-grounded clinical AI for level 2 and 3 care in Kenya.
At its core, it’s three things:
- A Small Language Model (SLM)
We’re using a model called MedGemma as the backbone—essentially, a specialised medical language model that can understand clinical questions and generate structured, readable answers. - Retrieval-Augmented Generation (RAG)
Instead of relying on the model’s memory alone, we connect it to a knowledge base built from Kenyan guidelines. When you ask a question, Afya-Yangu AI first retrieves the most relevant guideline snippets, then uses the model to summarise and contextualise them. - Offline / Edge Deployment
The model and its knowledge base are designed to run on local hardware—a small server, a robust tablet, or a clinic “edge box”—so clinicians can use it even without internet.
Grounded in Kenyan Guidelines, Not the Global Average
The most important design decision we’ve made is this:
Afya-Yangu AI must speak Kenyan guidelines first.
Instead of training it on generic global resources, we’re anchoring it in the standards that actually govern practice here—Kenyan national and program-specific guidelines for:
- Child health
- Maternal and newborn care
- TB, HIV, malaria
- Common emergencies at primary care level
That grounding matters. It means that when a clinician asks:
“For a 32-week pregnant woman with BP 160/110 at a level 3 facility, what should I do?”
The answer doesn’t just sound plausible—it aligns with Kenyan policy.
A Vision of Clinical AI That Lives Where Patients Are
In the long run, we imagine Afya-Yangu AI as:
- A simple chat-style interface on a clinic tablet or laptop
- Able to handle free-text questions and structured vignettes
- Returning short, structured answers like:
- Assessment
- Immediate actions
- Treatment
- Referral criteria
- Patient counselling points
- Always citing the guideline sections it drew from
It’s not a replacement for clinical judgment. It’s a second brain that happens to have instant recall of hundreds of pages of guidelines—even after a 60-patient morning.
Over the coming blogs in this series, we’ll go deeper into:
- How MedGemma, RAG, and FAISS actually work together
- What it takes to make AI run offline on small devices
- How we’re thinking about safety, governance, and trust
For now, the takeaway is simple:
Afya-Yangu AI is our attempt to move from “guidelines on shelves” to “guidelines in the room” – every time, for every patient.

