"What is the competitive landscape for KRAS G12C inhibitors in NSCLC as of 2024?"
One question. Three specialist AI agents. One structured intelligence report. Under 90 seconds.
Pharmaceutical competitive intelligence (CI) reports take 3β5 days of manual analyst work:
- Hours searching PubMed for relevant literature
- Manually cross-referencing drug pipeline databases for phase/target data
- Parsing FDA approval databases for regulatory history
- Writing up a coherent multi-section report
ClinicalEdge automates this end-to-end using a coordinated multi-agent AI system powered by the Google Agent Development Kit (ADK), MCP servers, and Gemini.
ANALYST QUERY (natural language)
β
βΌ
βββββββββββββββββββββββββββββββββββββ
β ROOT ORCHESTRATOR (ADK LlmAgent)β
β β’ Guardrails: PHI + scope β
β β’ Entity extraction β
β β’ asyncio.gather fan-out β
β β’ Gemini synthesis β
ββββββββββββ¬βββββββββββββ¬ββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββ ββββββββββββββββ
β LITERATURE β β PIPELINE β β REGULATORY β
β SCOUT β β SCOUT β β WATCH β
β (PubMed MCP) β β (OT MCP) β β (FDA MCP) β
ββββββββ¬ββββββββ ββββββ¬ββββββ ββββββββ¬ββββββββ
β β β
βΌ βΌ βΌ
NCBI EUtils Open Targets openFDA API
(literature) Platform (EBI) (approvals/
(drug pipeline) FAERS/labels)
β β β
ββββββββββββββββ΄βββββββββββββββ
β
βΌ
5-SECTION INTELLIGENCE REPORT
(Research Β· Pipeline Β· Regulatory
Β· Competitive Summary Β· Outlook)
The root LlmAgent (orchestrator) holds three specialist sub-agents registered via agents=[]. In production ADK mode:
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StdioServerParameters
literature_scout = LlmAgent(
name="literature_scout",
model="gemini-2.0-flash",
instruction=SCOUT_SYSTEM_PROMPT,
tools=[MCPToolset(connection_params=StdioServerParameters(
command="python", args=["mcp_servers/pubmed_mcp.py"]
))],
)
orchestrator = LlmAgent(
name="orchestrator",
model="gemini-2.0-flash",
instruction=ORCHESTRATOR_PROMPT,
agents=[literature_scout, pipeline_scout, regulatory_watch],
)Parallel execution uses asyncio.gather, mirroring ADK's built-in agent fan-out. The Kaggle notebook runs all agents as async functions with the same logic β no subprocess overhead.
Three dedicated MCP servers, each wrapping a public pharma API:
| Server | API | Key Tools |
|---|---|---|
pubmed_mcp.py |
NCBI E-utilities | search_pubmed, fetch_abstract |
opentargets_mcp.py |
Open Targets Platform (EMBL-EBI) GraphQL | search_ot_drugs, get_drug_details, get_disease_drugs |
fda_mcp.py |
openFDA | search_drug_approvals, search_adverse_events, search_drug_labels |
Each server implements list_tools() + call_tool() per the MCP protocol spec with JSON Schema typed inputs/outputs. Agents bind to them via MCPToolset + StdioServerParameters.
Four defense layers applied before any query reaches an agent and after any LLM response:
| Layer | What it blocks |
|---|---|
| PHI/PII Detection | SSNs, DOBs, MRNs, emails, phone numbers |
| Domain Scope Validation | Non-pharma queries (recipes, finance, etc.) |
| Rate Limiting | Sliding-window, 3 req/sec per API source |
| Output Sanitization | Redacts PHI from LLM-generated text |
ClinicalEdge/
βββ clinicaledge.ipynb # Kaggle notebook (submit this)
βββ main.py # CLI entry point
βββ requirements.txt
βββ agents/
β βββ orchestrator.py # Root LlmAgent β entity extraction, fan-out, synthesis
β βββ literature_scout.py # PubMed specialist
β βββ trial_monitor.py # Open Targets pipeline specialist
β βββ regulatory_watch.py # openFDA specialist
βββ mcp_servers/
β βββ pubmed_mcp.py # NCBI E-utilities MCP server
β βββ opentargets_mcp.py # Open Targets Platform MCP server
β βββ fda_mcp.py # openFDA MCP server
βββ skills/
β βββ search_skill.py # Query building & relevance scoring
β βββ synthesis_skill.py # Gemini prompting & report parsing
βββ security/
β βββ guardrails.py # PHI, scope, rate-limit, sanitize
βββ report/
βββ formatter.py # Rich / Markdown / JSON output
- Python 3.10+
- A Google AI Studio API key (free)
- Optionally: NCBI API key for higher rate limits
git clone https://github.com/josephardev/ClinicalEdge.git
cd ClinicalEdge
pip install -r requirements.txt
export GOOGLE_API_KEY="your-key-here"
export NCBI_API_KEY="your-ncbi-key" # optionalpython main.py --query "What is the competitive landscape for KRAS G12C inhibitors in NSCLC?"- Open the live notebook: kaggle.com/code/josephardev/clinicaledge
- Enable Internet in Settings β Environment
- Add
GOOGLE_API_KEYvia Add-ons β Secrets (Label:GOOGLE_API_KEY) - Run All β completes in under 90 seconds
Query: "What is the competitive landscape for KRAS G12C inhibitors in non-small cell lung cancer as of 2024?"
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ClinicalEdge β Pharma Competitive Intelligence Agent
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Query: What is the competitive landscape for KRAS G12C inhibitors
in non-small cell lung cancer as of 2024?
Generated: July 04, 2026
Data: 10 articles | 15 trials | 4 FDA records
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECTION 1 β RESEARCH LANDSCAPE
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PubMed yielded 10 high-relevance articles (2020β2024). Landmark
papers include the CodeBreaK 100 trial (sotorasib, ORR 37.1%,
PMID:34096690) and KRYSTAL-1 (adagrasib, ORR 42.9%, PMID:35658005).
Recent publications focus on resistance mechanisms (Y96D, G13D
mutations) and combination strategies targeting KRAS+SHP2,
KRAS+EGFR, and KRAS+PD-1 axes...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECTION 2 β CLINICAL PIPELINE
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
15 trials identified. Phase distribution: {PHASE3: 6, PHASE2: 5,
PHASE1: 4}. Top sponsors: Amgen, Mirati Therapeutics, BMS, Roche,
Revolution Medicines. Active combinations: sotorasib+panitumumab
(NCT04117087), adagrasib+pembrolizumab (NCT04613596)...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECTION 3 β REGULATORY STATUS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Sotorasib (NDA213756, Lumakras): FDA full approval May 2021 β
first-in-class KRAS G12C inhibitor for 2L+ NSCLC. Adagrasib
(NDA216340, Krazati): Accelerated approval December 2022. Both
carry hepatotoxicity monitoring requirements (boxed warnings)...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECTION 4 β COMPETITIVE SUMMARY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Amgen (Lumakras) and Mirati/BMS (Krazati) lead. Both are covalent,
GDP-state selective inhibitors. Second-generation: divarasib
(Roche) shows improved CNS penetration; glecirasib advancing in
Phase 3. Key differentiation: combination regimens, CNS activity,
AE profile, co-mutation tolerance (STK11, KEAP1)...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SECTION 5 β STRATEGIC OUTLOOK
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Priority gaps: first-line approval (both agents currently 2L+),
post-progression options after resistance. Resistance via Y96D and
G13D mutations remains the central durability challenge.
Opportunity: biomarker-driven patient selection and combination
agents to overcome resistance and extend benefit...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Total pipeline time: 47.3s | Under 90s target: YES
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Limitation | Impact | Mitigation |
|---|---|---|
| 3 req/sec API rate limit | ~15s overhead | NCBI API key β 10/sec |
| PubMed abstracts only | Misses full-text data | Add PMC full-text API |
| Regex entity extraction | May miss novel targets | Replace with NER model |
| No financial data | Missing market share | Add SEC EDGAR MCP |
- ChEMBL MCP β IC50, selectivity, structural similarity
- SEC EDGAR MCP β 10-K pipeline disclosures and R&D spend
- Web Search MCP β News, press releases, conference abstracts
- Persistent memory β Track evolving landscapes across query sessions
- NER-based entity extraction β Replace regex with a fine-tuned biomedical NER model
- No API keys in code β all secrets via
os.getenv()or Kaggle Secrets - PHI/PII blocked at the guardrail layer before any API call
- Rate limiting prevents accidental API abuse
MIT License β see LICENSE
Built by @josephardev for the AI Agents: Intensive Vibe Coding Capstone β 5-Day Google AI Agents Course, July 2026.