demo video: https://www.loom.com/share/2cabc013af3c44e798ea77e04e86693f

The Story of Oncology Co-Pilot

Our Inspiration: Beyond the Data Point

In modern oncology, clinicians are drowning in data. EHRs are filled with lab results, genomic reports, imaging studies, and clinical notes, but this data often lacks a coherent narrative. A patient isn't a series of isolated data points; they are a person on a journey. We were inspired by the gap between this mountain of data and the clear, longitudinal story a physician needs to make the best possible decision. We didn't want to build another data dashboard. We wanted to build a co-pilot that could understand and articulate the patient's story, connecting the dots from hereditary risk to treatment and, ultimately, to relapse and resistance. Our goal was to transform data into a narrative, and that narrative into decisive clinical action.

What We Learned: From Simple APIs to a Clinical Narrative

This project was a profound learning experience, both technically and conceptually.

The Power of a Multi-Agent Architecture: We quickly learned that a single, monolithic AI model couldn't capture the specialized nuances of oncology. This led us to a multi-agent system where each AI agent is an expert in a specific domain—one analyzes hereditary risk, another tracks liquid biopsies for resistance mutations, and a third maps genomic findings to the Hallmarks of Cancer. Orchestrating these agents to work together was the key to unlocking deep, contextual insights.

The Frontend is the Storyteller: Our initial vision was backend-heavy. However, we realized that even the most brilliant AI analysis is useless if it's not presented in a clear, intuitive, and actionable way. This forced a major pivot in our thinking. We shifted our focus to building a user experience (LongitudinalViewPage) that tells the patient's story visually through timelines and dedicated report components. We learned that the frontend isn't just a "view"—it's an essential part of the clinical narrative.

State Management is Everything: Real-time applications are fragile. We learned this the hard way through a series of frustrating bugs with our WebSocket connection. A poorly implemented custom hook (useWebSocket) was at the heart of our issues, causing a cascade of "stale state" and import/export errors. This taught us a critical lesson: robust, reliable state management is the foundation upon which interactive and real-time features are built.

How We Built It: A Symphony of Agents and Components

Our Oncology Co-Pilot is built on a modern, decoupled stack designed for real-time interaction and specialized AI processing.

The Backend (Python, FastAPI, Bedrock): The core of our system is a Python backend powered by FastAPI, providing a fast and efficient API and WebSocket server.

At the center sits the AgentOrchestrator, which uses Google's gemini-1.5-flash model to perform intent recognition. When a user sends a prompt like "Explore therapy options for BRCA1," the orchestrator understands the intent and routes the task to the appropriate specialized agent.

We developed several Specialized AI Agents, each with a distinct role: -HereditaryRiskAgent and LiquidBiopsyAgent: Analyze specific moments in the patient's journey. -GenomicAnalystAgent: Performs a sophisticated analysis by mapping a patient's mutations to the fundamental "Hallmarks of Cancer," providing a biological framework for understanding the disease. -ComparativeTherapyAgent: Provides direct comparisons of treatment options. -Real-time communication is handled via a /ws/agent WebSocket endpoint, allowing the backend to stream results back to the frontend as soon as they are ready.

The Mid-Project Pivot: Our initial idea was building a CRISPR intelligence platform that creates therapies based on mutations using CRISPR with CrisPRO in-silico virtual design but we decided to build an EMR instead since it helps with early preventions and screenings

Built With

Share this project:

Updates