Skip to content
Juan Felipe Ortiz
Español
01 · Case study

Aegis framework

Multi-agent AI for antimicrobial-resistance research. I led the three-person team that won Best Patient Impact at the GSK × IE Biopharma & AI Gateway.

Project LeadJanuary 2026 – June 20263-person teamBest Patient Impact
Aegis architecture: how a TB case is analysed A structured tuberculosis case and an evidence context (live Europe PMC literature search plus scientist-uploaded files) feed four specialist agents: Pathogen, Host and Environment run in parallel, and Intervention also receives their merged findings. Each agent runs in parallel on OpenAI, Anthropic, Google Gemini and Ollama Cloud. Every output must pass a strict JSON schema, with a repair retry of up to three attempts. GPT-4o then merges the provider outputs per agent, keeping agreements, disagreements, open questions and a confidence rationale. The result is stored as an auditable case, and a pre-publish check blocks claims without citations or agent attribution. Aegis: how a TB case is analysed Multi-agent, multi-model reasoning over a structured case (demo data is synthetic) 1 Structured TB case Guided 5-step wizard: case overview, pathogen lab results, host profile, care setting, regimen Evidence context Live Europe PMC literature search (trusted hosts, links checked) + scientist-uploaded files Pathogen resistance profile, allowed / blocked drugs Host eligibility, toxicity, drug interactions Environment diagnostic, monitoring, drug-access readiness Intervention regimen recommendation, resistance outlook Pathogen, Host and Environment run in parallel; Intervention also receives their merged findings 2 Each agent runs on every configured provider, in parallel OpenAI Anthropic Google Gemini Ollama Cloud 3 Strict JSON schema check (Zod) Invalid output: the validation issues become a repair prompt and the call is retried (up to 3 attempts) 4 GPT-4o merges the provider outputs for each agent Keeps agreements, disagreements and open questions, plus a confidence rationale and a short summary 5 Auditable case Per-provider contributions, citations, agent attribution, confidence and conflicts, follow-ups, export, stakeholder view Pre-publish citation check Blocks claims without citations or agent attribution Run modes: standard; deep dive (sequential, 1 or 3 passes, asynchronous); comparative (whole pipeline per model profile).

Architecture

  1. Case and evidence

    A guided five-step wizard turns a tuberculosis case into structured data: pathogen lab results, host profile, care setting and regimen. Each agent also gets evidence: a live Europe PMC literature search (trusted hosts, links checked) plus files the scientist uploads. All demo data is synthetic.

    Jump to detail 1
  2. Four specialist agents

    Pathogen, Host and Environment agents run in parallel, each with its own prompt and output schema. The Intervention agent then reads their merged findings and recommends a regimen with a resistance outlook.

    Jump to detail 2
  3. Four providers, strict JSON

    Each agent runs at the same time on OpenAI, Anthropic, Google Gemini and Ollama Cloud. Every answer must pass a strict JSON schema; if it fails, the validation errors become a repair prompt and the call is retried, up to three attempts.

    Jump to detail 3
  4. GPT-4o synthesis

    GPT-4o merges the provider answers for each agent into one, keeping the agreements, the disagreements and the open questions, with a confidence rationale. The cross-check comes from several models answering the same question.

    Jump to detail 4
  5. Auditable case

    The result is saved as a case with the contribution of each provider, the citations and the confidence. The prompts ask for citations when evidence is available, and in comparative runs a pre-publish check blocks claims without a citation or agent attribution.

    Jump to detail 5

Problem

Antimicrobial-resistance (AMR) research moves fast, and the evidence is spread across a large, growing literature. Ask one model about a patient case and you get one answer, with no way to see where models disagree or where the evidence came from. Researchers need the reasoning, the conflicts and the sources laid out so they can check them.

What I built

Aegis is a research decision-support platform for AMR, with tuberculosis as the first disease. A scientist fills a five-step wizard that turns a TB case into structured data: pathogen lab results, host profile, care setting and treatment options. Every demo case is synthetic.

Four specialist agents then analyse the case: Pathogen, Host, Environment and Intervention. The first three run in parallel; Intervention reads their merged findings and recommends a regimen with a resistance outlook. Each agent runs at the same time on OpenAI, Anthropic, Google Gemini and Ollama Cloud. Every answer has to pass a strict JSON schema, and a failed one goes back to the model with the validation errors as a repair prompt. GPT-4o then merges the provider answers for each agent and keeps the agreements, the disagreements and the open questions.

The evidence comes from a live Europe PMC literature search, filtered to trusted hosts with every link checked before the model sees it, plus files the scientist uploads. The prompts ask for citations when evidence is available, and in comparative runs a pre-publish check blocks any claim without a citation or agent attribution. Each case is saved with every provider's contribution, so a reviewer can audit how the answer was built.

My role

I led a three-person team, with Sibylle and Carlos, at the GSK × IE University Biopharma & AI Gateway in Madrid, from January to June 2026. I wrote 102 of the project's 110 commits, including the agent orchestration, the provider adapters, the synthesis step, the literature search and the case wizard. Sibylle built case review, export and the evidence-source registry; Carlos worked on the agent personas and prompts.

Stack

TypeScript, Next.js 15, React 19, tRPC, Prisma and NextAuth, calling the OpenAI, Anthropic, Gemini and Ollama Cloud APIs and the Europe PMC REST API. 484 automated tests, and CI runs lint, typecheck, tests and the build.

Result

Aegis won Best Patient Impact at the GSK × IE Biopharma & AI Gateway. It is a research tool, not a clinical one: the app says so on every stored case, and the demo runs on synthetic cases.

Aegis stored case for a synthetic tuberculosis scenario: counts of key agreements, disagreements and contributing agents, and the evidence provenance with its citations.Final recommendation snapshot of a synthetic case: final option, status, expected response, resistance-overtake likelihood, clinical interpretation and the LLM synthesis summary, next to run health and feedback tags.Case export: key conclusions per agent, uncertainty indicators and eight evidence references from WHO tuberculosis guidance, ready to copy or print.