AWS Builder Center
AWS AIdeas Final Article: 
AIdeas: OncoAI – Multi-Agent AI for Precision Cancer Treatment

AWS AIdeas Final Article: AIdeas: OncoAI – Multi-Agent AI for Precision Cancer Treatment

App category: Social Impact

My Vision:



Cancer treatment decisions are among the most complex problems in modern medicine. Every patient is unique. Their tumor biology, genetic mutations, treatment history, and overall health all influence which therapy might work best. Yet oncologists often have to analyze enormous amounts of information in limited time such as clinical guidelines, genomic data, research papers, and evolving treatment protocols.
I began thinking about this problem after watching a close family member navigate cancer treatment.
My aunt was diagnosed with cancer, and during her treatment journey I realized how complex and overwhelming the decision-making process was. Doctors were doing their best, but the amount of data involved in choosing the right therapy such as genetics, pathology, reports, treatment options, research literature was immense.
It made me wonder:
What if AI could help doctors synthesize this complexity and support better treatment decisions ?
That question led me to build OncoAI, an AI powered multi-agent system designed to assist oncologists in navigating complex cancer decisions.
OncoAI analyzes patient information, genomic mutations, and relevant medical knowledge to generate structured treatment insights.
Rather than replacing doctors, the system acts as a clinical intelligence layer that helps physicians evaluate treatment options more efficiently.
The long-term vision is to build AI systems that help make precision oncology truly accessible, enabling more personalized and data-driven cancer treatment worldwide.

Why this matters ?

Cancer care is entering the era of precision medicine.
Modern oncology increasingly relies on:
  • genomic sequencing
  • biomarker analysis
  • targeted therapies
  • immunotherapies
  • clinical trial matching
While these advances have dramatically improved treatment possibilities, they have also made treatment decisions far more complex.
A single tumor may contain dozens genetic mutations. Each mutation could potentially influence drug response or eligibility for certain therapies. At the same time, thousands of oncology research papers are published every year, making it difficult for clinicians to stay fully updated.
As a result, valuable insights can sometimes remain buried in massive datasets or or research literature. AI systems have the potential to act as intelligent assistants that help clinicians process and synthesize this information quickly.
OncoAI explores how multi-agent AI systems can support oncologists by:
  • analyzing genomic mutation profiles
  • connecting patient data with treatment knowledge
  • synthesizing research insights
  • generating structured treatment suggestions
By augmenting human expertise with AI-driven analysis, systems like this could ultimately help doctors make faster, more informed treatment decisions thus, improving outcomes for patients.

How I built this:

OncoAI was designed as a safety-bounded multi-agent clinical decision support system rather than a traditional single-model AI application.
The goal was to create an architecture where multiple specialized AI agents collaborate in a controlled pipeline while maintaining strict safety, regulatory, and audit requirements required for healthcare environments.
System architecture:

The system is composed of five primary layers:
Client Layer
A React-based clinical interface allows users to submit patient cases and visualize how the AI system evaluates them.
The interface includes:
  • sequential decision flow visualization
  • toxicity heatmaps
  • AI reasoning outputs
  • confidence score tracking
The UI is delivered through CloudFront CDN for global performance.
API Layer
Requests enter through AWS API Gateway, which handles authentication, routing, and request validation.
Authentication is managed through AWS Cognito, enabling secure clinician access with role-based permissions.
The API communicates with the orchestration system through both REST and WebSocket endpoints, allowing real-time updates while the AI agents process a case.
Orchestration Layer
At the core of the system is an Orchestrator Lambda, which acts as a deterministic controller responsible for executing the AI agents in a strict sequence.
Unlike many AI systems that allow agents to interact freely, OncoAI enforces a state machine pipeline that guarantees predictable behavior and safety.
The pipeline follows this execution flow:
  1. Diagnostics & vision analysis
  1. Genomic variant interpretation
  1. Oncology treatment category evaluation
  1. Clinical trial eligibility matching
  1. Toxicology safety assessment
  1. Compliance and regulatory validation
Each stage must complete before the next begins, ensuring a fully traceable reasoning process.
Agent execution is coordinated through AWS SQS queues, allowing the system to scale while maintaining ordered execution.

Multi-agent AI system

Instead of relying on a single AI model, OncoAI uses six specialized AI agents, each responsible for a specific domain of oncology decision support.

Diagnostics & Vision Agent

This agent processes unstructured clinical notes and imaging inputs.
Using AWS Comprehend Medical, the system extracts standardized medical entities such as:
  • medications (RxNorm)
  • clinical conditions (SNOMED CT)
  • procedures (ICD-10)
  • lab results
For image and multimodal data analysis, the system uses Claude 3 Sonnet via AWS Bedrock.
The output of this step is a structured clinical case representation.

Genomics Agent

The genomics agent analyzes tumor mutations and classifies variants as:
  • Driver mutations
  • Passenger mutations
  • Variants of Uncertain Significance (VUS)
Variant interpretation integrates data from genomic databases such as:
  • ClinVar
  • OncoKB
  • COSMIC
The system also identifies actionable mutations that may influence therapy strategies.

Oncology Agent

This agent evaluates treatment approaches using established oncology guidelines including:
  • NCCN
  • ASCO
  • ESMO
Importantly, the system is designed as clinical decision support rather than treatment prescription.
Instead of recommending specific drugs or dosages, the agent produces treatment categories, such as:
  • targeted therapy
  • immunotherapy
  • chemotherapy strategies
Each recommendation includes guideline references and rationale.

Clinical Trial Matching Agent

The trial agent queries ClinicalTrials.gov and evaluates patient eligibility against trial inclusion and exclusion criteria.
For each trial, the system calculates:
  • eligibility score
  • matched criteria
  • unmet criteria
  • uncertainty factors

Toxicology Agent

Patient safety is handled by a dedicated toxicology agent that evaluates potential treatment risks across five organ systems:
  • cardiac
  • hepatic
  • renal
  • neurologic
  • hematologic
Toxicity is scored using CTCAE-style severity levels (0–4).
If any organ toxicity score reaches ≥3, the system triggers a safety block, suppressing the risky treatment option and applying a confidence downgrade.
This ensures that safety signals override lower-level recommendations.

Compliance Agent

The final stage in the pipeline is the compliance agent, which enforces regulatory safeguards.
The system validates outputs against requirements including:
  • FDA Clinical Decision Support guidance
  • HIPAA privacy protections
  • GDPR data handling rules
  • 21 CFR Part 11 auditability standards
The compliance agent holds absolute veto authority.
If a regulatory violation is detected (for example, prescriptive medical advice), the system blocks the output and sets confidence to zero.

Confidence scoring and conflict resolution

Because multiple agents contribute to the final output, the platform tracks confidence scores across the entire pipeline.
Confidence begins at 100% and may decrease when agents detect disagreements or safety concerns.
Examples include:
  • minor reasoning disagreement (−10%)
  • safety block from toxicology (−30%)
  • compliance violation (−100%)
This approach makes the system’s reasoning transparent and allows clinicians to understand how confident the AI is in its analysis.

Data storage and auditability

All case data, agent outputs, and system decisions are stored across AWS services including:
  • Amazon S3 for case data and immutable audit logs
  • DynamoDB for system state and metadata
  • SQS for agent task queues
Each case produces a cryptographically hashed audit log containing:
  • all agent inputs and outputs
  • confidence score changes
  • conflict events
  • system state transitions
These logs provide a complete trace of how the system reached its conclusions.

Development approach

The platform was built using a serverless architecture on AWS free-tier infrastructure, enabling rapid experimentation while maintaining production-grade architectural patterns.
Key technologies used in development include:
  • AWS Lambda
  • AWS Bedrock (Claude 3 Sonnet)
  • AWS Comprehend Medical
  • DynamoDB
  • Amazon S3
  • Amazon SQS
  • React + TypeScript frontend
The backend system was implemented in TypeScript with strongly typed agent interfaces, enabling structured communication between agents and deterministic execution.

Key design philosophy

The most important design decision behind OncoAI was prioritizing safety and transparency over raw AI output.
In healthcare environments, AI systems must be:
  • interpretable
  • auditable
  • safety-bounded
  • compliant with regulations
Instead of treating AI as a black box, the system was designed as a structured reasoning pipeline where each step is visible and verifiable.
This architecture allows clinicians to understand not just what the system recommends, but how it arrived at those insights.











What I learned

Building OncoAI taught me that applying AI to real-world problems—especially in healthcare—is fundamentally different from building typical software applications.
When I first started exploring the idea, I assumed the main challenge would be building an AI model capable of analyzing clinical and genomic data. But as the system evolved, I realized that the real challenge was designing an architecture that could use AI safely and responsibly in a medical context.
Modern large language models are incredibly powerful, but they are also probabilistic systems. In medicine, where decisions affect human lives, relying on a single AI model making opaque decisions is not acceptable.
This realization led me to rethink the system design.
Instead of building a single AI model that produces answers, I designed OncoAI as a structured multi-agent reasoning system, where specialized agents analyze different aspects of a clinical case and their outputs are evaluated through safety and compliance layers.
This architecture allowed the system to behave more like a team of experts collaborating, rather than a single AI model attempting to solve everything at once.
Another important lesson was the importance of safety-first system design.
In many AI applications, speed and performance are the primary goals. In healthcare, however, safety, transparency, and traceability are far more important than raw intelligence.
This is why the platform includes:
  • explicit confidence scoring
  • safety blocks for toxicity risks
  • regulatory compliance validation
  • immutable audit logs for every decision
These mechanisms ensure that the system’s reasoning can be inspected and understood rather than treated as a black box.
But the most important lesson behind this project was deeply personal.
I began thinking about this problem after witnessing a close family member—my aunt—go through cancer treatment.
Watching that journey made me realize how overwhelming cancer care can be. Treatment decisions involve complex medical data, evolving research, and difficult trade-offs that doctors must evaluate under immense pressure.
That experience made me think about the role technology could play in supporting clinicians.
AI cannot replace doctors, and it should not attempt to. But it can help physicians navigate the enormous complexity of modern medicine by synthesizing information and presenting structured insights.
If systems like OncoAI can help even slightly improve the speed or quality of treatment decisions, the impact could be meaningful for patients and their families.
Building this project ultimately changed how I think about AI.
Instead of seeing AI as a tool for generating answers, I began to see it as a system for augmenting human expertise—helping experts make better decisions in domains where information is too vast for any individual to process alone.
That idea continues to guide how I think about the future of AI in healthcare.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article