This is a submission for the GitHub Copilot CLI Challenge
What I Built
I built MedGuard, a secure clinical intelligence platform that bridges the gap between patient privacy and the power of modern AI.
In the medical field, seconds matter, but so does privacy. Doctors are often stuck between outdated software and powerful AI tools they can't legally use due to HIPAA and GDPR regulations. I wanted to solve this paradox: How can we give doctors access to state-of-the-art LLMs in real-time without ever exposing patient data?
MedGuard is the answer. It is a "Zero-Trust" AI middleware that acts as a firewall for clinical data.
Here is how I architected the solution:
The Privacy Firewall: I built a hybrid sanitization engine using Microsoft Presidio and custom Regex patterns. This layer automatically strips names, MRNs, and dates from PDF reports and scanned notes before they leave the hospital's local environment.
The Speed of Cerebras: To make this viable for emergency rooms, I couldn't afford slow inference. I integrated the Cerebras Inference Cloud (Llama-3.3-70b), which allows MedGuard to analyze complex medical histories and generate triage recommendations in milliseconds, not seconds.
Governance via Archestra: I didn't want a "hallucinating" AI. I used Archestra as my central orchestrator to manage BioMCP (Bio-Medical Control Protocol). Archestra ensures that every AI response is grounded in verified medical protocols (like OpenFDA and AHA guidelines) and monitors the system for data exfiltration attempts and token costs.
What it means to me:
Building MedGuard wasn't just about connecting APIs; it was about proving that we don't have to compromise on security to innovate in healthcare. By combining the raw speed of Cerebras with the governance of Archestra, I’ve created a prototype that demonstrates how AI can be safely deployed in sensitive industries today.
Demo
https://huggingface.co/spaces/dhruvawani17/medguardpro
https://youtu.be/9EX1pynXZKc
My Experience with GitHub Copilot CLI
Using GitHub Copilot CLI transformed my terminal from a simple command executor into an intelligent pair programmer. Instead of constantly context-switching between my code editor and browser documentation, I could stay in the flow and resolve complex infrastructure challenges directly in the command line.
Key ways it impacted my development:
Taming the Regex Beast: Writing robust Regular Expressions for PII redaction is notoriously difficult and error-prone. I used Copilot CLI to generate precise patterns for catching medical record numbers, varying date formats (e.g., "12/05/1984" vs "Feb 14, 2026"), and email addresses. A simple query like ?? "regex python to match medical record numbers and dates" gave me a solid foundation that I could immediately integrate into my redact_pii function.
Streamlining Docker Deployment: Deploying a Python app with system-level dependencies like Tesseract and Poppler is tricky. When my build failed due to missing Linux libraries (libgl1), Copilot CLI was invaluable. I could ask ?? "how to install tesseract and poppler in python slim docker image" and it suggested the correct apt-get commands and the switch to python:3.9-slim-bookworm, saving me hours of debugging "dependency hell."
Rapid Prototyping: For the Streamlit UI, Copilot CLI helped me scaffold the layout commands quickly. I used it to remember the syntax for complex Streamlit widgets like st.data_editor and column layouts without needing to dig through the docs.
Impact:
Copilot CLI didn't just write code; it acted as a DevOps engineer and a Regex specialist. It significantly reduced my debugging time, allowing me to focus on the core logic of MedGuard—security and clinical accuracy—rather than getting bogged down in syntax and configuration errors.
Top comments (0)