Tech

From Multi-Day Reports to a 60-Second Conversation: The OI Lightagent

Fredrick Kyalo · Jun 24, 2026 · 4 min read
From Multi-Day Reports to a 60-Second Conversation: The OI Lightagent

To prove that an AI assistant could turn raw operational data into plain-English answers, Ona Insights built the OI Lightagent and tested it end-to-end against a complete demo modelled on Kenya's community health system — architected from day one to connect to any organisation's database, in any sector.

Introduction

Organisations across every sector sit on top of enormous volumes of data. Community health programmes track antenatal care visits, CHW caseloads, and immunisation records. Climate initiatives monitor rainfall patterns, early warning indicators, and intervention outcomes. Education programmes measure enrolment, attendance, learning assessments, and resource allocation across hundreds of schools. In every one of these contexts, the same problem shows up: the data is there, but getting a straight answer out of it takes far too long.

Ona Insights built the OI Lightagent to close that gap. It is an AI-powered data assistant that connects directly to a structured database and lets anyone on a team ask questions in plain, everyday English instead of SQL. No dashboard to build in advance. No developer to wait on. Type the question, and the Lightagent returns a clean, formatted answer in seconds.

This is a project showcase rather than a client case study: before asking any organisation to connect a live database, we wanted to prove the concept worked end-to-end. So we built a complete sandbox modelled on Kenya's real community health system — counties, facility levels, and CHW workflows — and used it to test whether a conversational interface could genuinely replace the SQL-and-dashboard bottleneck. The architecture underneath doesn't hard-code any of that health-specific logic, which means the same conversational layer can sit on top of climate data, education records, or any other structured dataset an organisation already runs.

The Problem

Most organisations don't lack data; they lack fast access to it. Getting an answer out of a database usually means one of three things: knowing enough SQL to query it directly, waiting for a dashboard that happens to already answer the question being asked, or filing a request and waiting for an analyst to have time.

The people most affected by this lag are rarely the technical staff — they're the programme managers, M&E officers, CHW supervisors, county leads, and NGO coordinators whose decisions depend on the data but who have no way to query it themselves. In a health programme, that lag might mean a facility with falling immunisation coverage goes unnoticed for another reporting cycle, or a CHW approaching burnout doesn't get flagged for support until it shows up in the outcomes. In climate or education programmes, the same pattern plays out: an early-warning signal or a dropout-risk indicator sitting in a database is only useful if someone can ask about it the moment it matters, not weeks later when the next report is due.

Our Approach

Across the health, climate, and education programmes Ona Insights supports, the same bottleneck kept showing up in different clothes: the data existed, but the path from question to answer was too slow and too dependent on technical skill. Rather than build another dashboard — which only ever answers the questions it was designed to anticipate — we wanted a tool that could answer the question as it was actually asked, in the moment it was asked.

Because this was a showcase rather than a build for one organisation's specific schema, we chose to build on LibreChat, a mature, actively maintained open-source conversational AI platform, and to invest our own effort in the one piece that actually differentiates the product: a direct bridge from the chat layer into structured data, using the Model Context Protocol (MCP). That choice kept the platform adaptable rather than locked to one organisation's assumptions, which matters more for a tool meant to work across sectors than for one built around a single client's database.

The Technology

Under the hood, the Lightagent is built in three layers. LibreChat handles the conversational interface and orchestrates the AI model. ClickHouse serves as the analytics data warehouse where structured records live. And the ClickHouse MCP server sits between the two, acting as the bridge that lets the AI model query the database directly in response to a plain-English question. The entire stack is containerised and deployed via Docker, which keeps the infrastructure lightweight and portable rather than tied to one hosting setup.

The workflow itself is simple from the user's side: type a question into the chat, and the MCP bridge translates it into a structured database query, runs it against ClickHouse, and returns a clean, formatted result. For organisations running PostgreSQL instead of ClickHouse as their primary database, the integration works the same way: point the agent at an existing schema, and the team can start asking questions about live records without writing a line of code or opening a spreadsheet.

The built-in sandbox uses 100% synthetic data modelled on real Kenyan health system structures — counties, facility levels, and CHW workflows — so the demo feels like querying a live system.

Here's a sense of what it can already answer:

  • Instant programme insights: "Which facilities in Kisumu have the lowest immunisation coverage this quarter?"
  • CHW performance tracking: "Which CHW has the highest active caseload this month?"

Because none of that query logic is hard-coded to health data specifically, the same architecture is designed to answer an equivalent question about rainfall anomalies against a seasonal baseline, or about which schools have the highest dropout rates — the moment a climate or education dataset is connected in its place.

Key Takeaways

  • The bottleneck was never the data itself; it was the layer of SQL and pre-built dashboards standing between the data and the person who needed an answer.
  • Building on a mature open-source platform meant the team's effort went entirely into the integration that actually matters — the database bridge — instead of reinventing a chat interface that already exists.
  • Proving the concept first against a realistic, sector-specific dataset made the architecture decisions concrete instead of theoretical, even with 100% synthetic data.
  • The path from sandbox to live data is meant to be a configuration change, not a new project; the conversational experience stays identical; only the database underneath changes.

What's Next

Sitting on a database and tired of waiting on dashboards or analysts for a straight answer? Whatever your sector — health, climate, education, or anything else — we'd love to walk you through the Lightagent and talk about what connecting your own data could look like.

Try the OI Lightagent →