Inspiration

The current landscape of clinical research faces a massive bottleneck: over 80% of trials miss enrollment deadlines, and 1 in 5 terminate early due to poor participant recruitment. Traditional trial matching relies on manual, error-prone processes where clinicians parse complex registries against patient histories. Existing tools lack true AI reasoning, relying instead on rigid keyword filtering that results in a large ratio of patient disqualification. We were inspired to build ClinAgentX to bridge this gap, replacing overly rigid inclusion/exclusion criteria with smart, data-driven optimizations to accelerate life-saving research.

What it does

ClinAgentX is a multi-agent, LLM-powered system designed to solve the two biggest hurdles in clinical trials: matching and protocol design.

  • Clinical Trial Matching: It evaluates patient profiles and cross-references them with real-world trials to assess fit, providing a definitive match status, reasoning, and specific qualification requirements.
  • Protocol Optimization: It simulates the impact of adjusting trial parameters. By tweaking age ranges or biomarker thresholds, it provides actionable, quantitative estimates on how many more patients could become eligible, complete with clinical justification.

How we built it

We architected ClinAgentX around a robust multi-agent workflow to handle complex reasoning tasks, ensuring high-performance orchestration across the system.

  • Data & Tooling: We utilized AppWrite as our primary database for fetching patient records, connected directly to the ClinicalTrials.gov database to source real-world metadata, and integrated Tavily to conduct targeted web searches across 60+ medical sources.
  • Matching Engine: We deployed a Patient Eligibility Agent to evaluate logic, alongside a Tavily Search Agent to enrich the output with sponsor details, side effects, sample size, and statistical plans.
  • Optimization Engine: We orchestrated specialized LLM agents for Age Gap and Biomarker optimization. These feed into a Supervisor Summary Agent that synthesizes the data into a unified, actionable report.

To support this, we focused heavily on seamless API integration and efficient AI inference, ensuring the backend could swiftly process multi-agent communication and data hand-offs without latency bottlenecks.

Challenges we ran into

Parsing complex, unstructured medical criteria from ClinicalTrials.gov and converting it into a reliable format for the LLMs was incredibly difficult. Standardizing the reasoning logic so the agents provided accurate medical justifications required rigorous prompt engineering. Additionally, orchestrating the multi-agent pipeline—ensuring the Supervisor Agent effectively waited for and synthesized the quantitative inputs from the Age and Biomarker agents—required careful handling of asynchronous data flows and backend optimization.

Accomplishments that we're proud of

We successfully translated raw clinical and patient data into high-impact, explainable insights. Seeing the Protocol Optimization workflow simulate real-world impacts—like instantly calculating the percentage increase in eligible patients just by shifting an age limit by a few years—was a massive win. We are proud to have built an end-to-end full-stack workflow that goes beyond basic keyword matching to deliver genuinely intelligent, reasoning-based medical insights.

What we learned

We deepened our knowledge of multi-agent LLM orchestration and complex data fetching. Applying the 80/20 rule to our development process was crucial; we realized that focusing our agents on optimizing just a few core parameters—specifically age and biomarker thresholds—yielded the most dramatic, actionable improvements in trial eligibility, rather than trying to parse every single minor exclusion criterion at once.

What's next for ClinAgentX

We plan to introduce a wider array of Protocol Optimization agents, specifically targeting ECOG performance status, Histology, and Geographic/Location constraints. We also aim to deepen our Tavily integration to fetch historical and similar clinical trials, providing stronger clinical evidence for our recommendations. Finally, we want to continue optimizing the AI inference layer of our architecture to support the real-time processing of massive patient cohorts.

Built With

Share this project:

Updates