Skip to content

sidnov6/CADUCEUS

Repository files navigation

CADUCEUS — Virtual Molecular Tumor Board

A multi-agent clinical decision-support prototype that reconstructs the workflow of a hospital molecular tumor board. Given a full oncology case — pathology, radiology, genomics, labs and clinical notes — CADUCEUS convenes 55+ specialist agents across 7 layers that deliberate in parallel (with dynamic fan-out pushing genuine concurrency past 40) and produce a fully-cited, guideline-concordant treatment recommendation with documented dissent, ready for human review.

Positioning: decision support, not decision making. Every output is human-in-the-loop, traceable to a source, and built only on synthetic / de-identified public data. This is a research prototype and is explicitly not an FDA-cleared medical device.

This is a faithful implementation of the CADUCEUS architecture spec that runs two ways:

  1. Offline / synthetic — a curated, fully-cited clinical knowledge base ships in-repo, so the whole board executes with no external services, API keys, or credentialed data. npm run dev and go. Three synthetic cases (NSCLC, breast, colorectal).
  2. Live / real data — run the board on a real, de-identified TCGA patient pulled in real time from the NCI Genomic Data Commons open tier (no token), with variants annotated live against CIViC, drug safety from openFDA + FAERS, trials from ClinicalTrials.gov v2, and literature from Europe PMC — every source keyless and free. See Real data.

Quick start

npm install
npm run dev
# open http://localhost:3000

Pick a case on the landing page (or jump straight to /board/CADX-001). The board auto-convenes: watch the 7-layer agent graph light up, the concurrency meter climb, the map-reduce fan-out swarm fire, and the human-in-the-loop checkpoints clear — then the Tumor Board Report is revealed.

Run npm run build only in a separate terminal from npm run dev (they share the .next cache). For a production run: npm run build && npm start.


What you get

View What it shows
Live session The 55-agent / 7-layer orchestration executing in real time — per-agent status, genuine concurrency, dynamic fan-out (one worker per variant / trial / abstract), checkpoints, and the streaming findings ledger.
Case inputs The unified Gold "Patient Case" object — demographics, problem list, meds, pathology + IHC, stylised imaging (CT/PET/MRI), genomics, biomarkers, labs, and the clinical timeline.
Report The deliverable — case summary, fused disease state, ranked treatment options with evidence grades + inline citations, matched trials with eligibility scoring, pharmacy safety review (interactions, toxicity, dosing), supportive care, graded evidence, and documented dissent.
Provenance The append-only audit log: every clinical claim → retrievable source, with a citation-grounding rate (target ~100%).
Knowledge graph The structured backbone — genes · variants · drugs · diseases · biomarkers · trials connected by targets / indicated_for / interacts_with edges.

Three cases exercise distinct reasoning paths:

  • CADX-001 · NSCLC — EGFR exon 19-deleted adenocarcinoma, stage IVB with a solitary brain met (targeted therapy + SRS).
  • CADX-002 · Breast — HER2+/HR+ de novo metastatic (dual HER2 blockade → ADC).
  • CADX-003 · Colorectal — BRAF V600E, MSI-high (the immunotherapy-vs-BRAF-triplet board deliberation).

Architecture

app/
  page.tsx                     Landing — hero, architecture overview, principles, case selection
  board/[caseId]/page.tsx      Board route → BoardClient
  api/session/route.ts         SSE stream of a live board session (SessionEvent timeline)
  api/report/route.ts          Non-streaming report build (JSON)
lib/
  types.ts                     The typed blackboard, findings ledger, provenance, report shapes
  cases.ts                     Synthetic / de-identified patient cases (Gold objects)
  agents/
    registry.ts                The 55+ agents, 7 layers, dependency gates, fan-out flags
    runners.ts                 Per-agent reasoning → structured findings
    orchestrator.ts            Dependency-respecting schedule, concurrency + fan-out, event stream
  knowledge/
    sources.ts                 Citation registry (CIViC, openFDA, PubMed, NCI PDQ, ClinicalTrials.gov…)
    playbooks.ts               Per-case clinical "ground truth" (every claim carries source IDs)
  report.ts                    Folds findings + provenance + playbook → Tumor Board Report
  graph.ts                     Projects the case into a knowledge graph
components/                    Landing, board (live), report, and graph UI

How the orchestration models the spec (§6)

  • Inter-department parallelism — Pathology, Radiology, Molecular and Labs have no mutual dependency, so all four departments execute in one parallel wave.
  • Intra-department fan-out (map-reduce) — Variant Actionability, Patient–Trial Matcher and Abstract Screening spawn one ephemeral worker per item; the reduce step aggregates. This is what drives peak concurrency well past 40 (≈150 with the bundled cases).
  • Dependency gates — therapeutics wait for diagnosis; pharmacy waits for the proposed regimen; synthesis waits for all specialists; the report waits for the Citation Validator to pass.
  • Human-in-the-loop checkpoints — the graph surfaces sign-off points after diagnosis and before finalisation (auto-confirmed in the demo; pauses for a clinician in deployment).

Real data (live)

The landing page's “Real patients · live” section runs the board on actual TCGA patients. Each card discovers a real patient carrying a driver alteration and assembles a Gold PatientCase live:

Source Used for Keyless
NCI GDC / TCGA (api.gdc.cancer.gov) real demographics, diagnosis, AJCC stage, somatic variants (open tier)
CIViC (GraphQL, CC0) variant → sensitising/resistant therapies + A–E evidence level + PMID
openFDA (label + FAERS) per-drug boxed warnings, toxicity, real adverse-event signals
ClinicalTrials.gov v2 live trial matches + eligibility
Europe PMC primary literature citations

It is honest about the open tier's limits (surfaced in the report and inputs view, never faked): no free-text pathology/radiology reports (narrative is synthesized + labeled), no ECOG, no PD-L1/TMB/MSI, no labs or medications, and no live NCI PDQ guideline-concordance (PDQ has no machine-readable API — the metric is relabeled “Evidence A/B-backed”). Drug–drug interaction checking is skipped (no medication list in the open tier). Live calls are cached server-side (lib/live/http.ts); the first load takes a few seconds.

MIMIC (real ICU notes + chest X-rays) is free but requires PhysioNet credentialing + a CITI course (~1–2 weeks) — out of scope for an instant demo, but the same lib/live/* pattern applies. Live mode lives in lib/live/ (gdc.ts, civic.ts, openfda.ts, trials.ts, pubmed.ts, casebuilder.ts, registry.ts); the orchestrator resolves a live caseId (GDC-*) through it and feeds the existing engine + UI unchanged.

Upgrading further (real LLMs / more sources)

The engine is deliberately decoupled: lib/agents/runners.ts is where each agent turns case state into findings. Swap a runner's body for a real LLM call (the agent's role + the case slice as the prompt, any model/provider), point lib/knowledge/* at live APIs (CIViC, openFDA, PubMed, ClinicalTrials.gov), and the rest of the system — orchestration, streaming, provenance, UI — is unchanged. The data-source catalogue in the architecture spec lists the free endpoints to wire in.


Stack

Next.js 15 (App Router) · React 19 · TypeScript · Tailwind CSS · Framer Motion · d3-force · lucide-react.

Safety & governance

Software-as-a-Medical-Device clinical decision support — non-autonomous, human-in-the-loop, a research prototype, not FDA-cleared and not for clinical use. Built only on synthetic + de-identified public data; evidence is bounded by free sources (no NCCN / UpToDate). Requires clinical validation before any real-world use.

About

Virtual molecular tumor board — 55+ agents across 7 layers produce a fully-cited, guideline-concordant oncology recommendation with documented dissent. Runs on synthetic cases or LIVE on real de-identified TCGA patients via free public APIs (GDC, CIViC, openFDA, ClinicalTrials.gov, Europe PMC). Keyless. Next.js.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages