Inspiration
Across Africa, public health systems face the constant threat of disease outbreaks. From cholera to malaria, an outbreak can spread rapidly, overwhelming local clinics and costing lives. The inspiration for MilimaliHealth comes from the need for a proactive, intelligent system that can identify early warning signs of an outbreak and help health officials respond before it becomes a crisis. We wanted to build a solution that goes beyond simply reporting on the past, instead using data to predict the future and take meaningful action.
What it Does
MilimaliHealth is a multi-step agent that acts as a public health early-warning system. It continuously monitors a variety of data sources to predict, track, and alert officials to potential disease outbreaks. The core functionality is a sophisticated, automated workflow that performs the following steps:
- Ingest & Index: It pulls in data from multiple sources, including anonymized patient records, real-time sensor data (like water quality and temperature), and social media feeds. This diverse data is indexed into a TiDB Serverless database.
- Search & Analyze: The agent uses TiDB's vector search to find patterns in the data that are similar to past outbreaks. For example, it might find a cluster of patient records with specific symptoms in a single neighborhood, and then use vector search to match this pattern to historical outbreaks with similar characteristics.
- Predict & Report: An LLM analyzes the search results, determines the probability of a new outbreak, and generates a detailed risk assessment report.
- Automated Action: If the risk is high, the agent triggers real-world actions via APIs. This could involve sending an automated alert to public health officials, publishing a public service announcement via SMS, or drafting an official report for review.
How We Built It
We built MilimaliHealth using a powerful combination of tools to create a seamless, end-to-end agentic workflow.
- Database: TiDB Serverless was the backbone of our project. We leveraged its powerful vector search to store and query embeddings of environmental data, patient symptoms, and historical outbreak patterns. We also used its full-text search to analyze social media and news feeds for key phrases. The ability to handle both structured and unstructured data in a single database was crucial for building a unified agent.
- Data Ingestion: We used Python scripts to pull data from simulated APIs for patient records and sensor data, and from public social media APIs. These scripts continuously fed the data into our TiDB Serverless cluster.
- Agent Orchestration: We used a framework like LangChain or LlamaIndex to create a multi-step agent. This allowed us to chain together the database queries, the LLM calls, and the final API actions into a single, automated process.
- LLM Integration: We integrated with a large language model via an API to perform complex analysis and generate reports. The LLM's role was to provide a human-readable diagnosis and a set of recommended actions based on the data retrieved from TiDB.
- External Tools: We connected our agent to external APIs for communication. This included a Twilio API to send SMS alerts and a custom API that simulated sending a report to public health officials.
Challenges We Ran Into
One of the biggest challenges was handling the diversity of data sources. Integrating structured, numerical sensor data with unstructured text from social media and medical records required a robust database that could handle it all. TiDB Serverless's ability to act as a single source of truth for both types of data, with its vector and full-text search capabilities, was key to overcoming this. Another challenge was ensuring the LLM's output was grounded in the data we provided, rather than generating a generic response. We achieved this by carefully structuring the prompts and feeding the most relevant, context-rich information from our database searches.
Accomplishments We're Proud Of
We are most proud of the end-to-end functionality of our agent. It's not just a demo; it's a working prototype that can ingest data, analyze it, make a decision, and take a tangible action. The agent’s ability to use TiDB’s vector search to find a "pattern" of an outbreak, rather than just a keyword, is a significant technical achievement. We were also able to build this entire solution using a free TiDB Serverless account, demonstrating the platform’s accessibility and power for developers.
What We Learned
We learned that building an effective multi-step agent requires more than just connecting tools; it requires a deep understanding of the problem and a solid data architecture. The core of our agent’s intelligence came from our ability to combine different types of data within TiDB Serverless and use its advanced search features to find meaningful connections. We also learned the importance of clear, structured prompts when working with LLMs to ensure the output is accurate and actionable.
What's Next for MilimaliHealth
Our vision is to expand MilimaliHealth to be a truly comprehensive public health platform. We plan to:
- Integrate more data sources: We want to connect with real-world APIs for weather, climate, and official health records to make our predictions even more accurate.
- Build a user-friendly dashboard: A dashboard for public health officials would allow them to visualize the data, track outbreaks in real-time, and manually trigger actions.
- Develop a mobile application: A community-driven mobile app would allow citizens to report symptoms and environmental issues, adding a crucial crowdsourced layer to our data.
- Scale the solution: As MilimaliHealth grows, we'll explore moving to a larger TiDB Cloud cluster to handle the increased data volume and user load, ensuring the system remains responsive and reliable.
Built With
- gcp

Log in or sign up for Devpost to join the conversation.