Open Source · MIT License

Agentic RAG for Drug Intelligence

A drug-centered multi-agent RAG system for knowledge retrieval, reasoning, and evidence synthesis across 70 curated biomedical resources.

70
Curated Resources
57
Implemented Skills
15
Drug Subcategories
3
Reasoning Modes

Built for drug-native intelligence

Most biomedical QA systems stop at "retrieve a few passages and summarize them." Drug questions demand precision, provenance, and multi-hop reasoning.

🧬

Vibe-Coding Retrieval

Each skill ships with its own SKILL.md and example.py. The Code Agent reads both, learns native usage patterns, and generates query code dynamically.

🌳

15-Subcategory Skill Tree

70 curated drug resources organized into a navigable skill tree spanning DTI, ADR, DDI, PGx, repurposing, and more.

🔗

Graph-Based Reasoning

Turn free-form retrieval results into triples, subgraphs, ranked paths, and evidence-aware answers instead of simply stitching excerpts.

🌐

Web Search Fallback

Built-in DuckDuckGo + PubMed search as a supplement for recent literature and external evidence beyond local resources.

💊

Drug-First Scope

Opinionated around drug-native tasks from resource organization to retrieval strategy, reasoning flow, and final answer structure.

🔌

Provider Agnostic

Works with any OpenAI-compatible API: GPT-4o, Azure OpenAI, LLaMA via vLLM, Ollama, Together AI, and more.

Three working modes

Choose the right reasoning depth for your query — from fast retrieval to deep multi-hop graph reasoning.

GRAPH

Multi-Hop Reasoning

Retrieve → Graph Build → Rerank → Respond → Reflect. Full evidence synthesis with optional iterative refinement and web search.

SIMPLE

Direct Retrieval

Retrieve and answer directly. Fast, efficient, and ideal for straightforward drug information queries.

WEB_ONLY

Online Search

Use only online search and literature retrieval. Perfect when you need the latest published evidence.

Architecture

A multi-agent pipeline from query understanding to evidence-grounded answers.

  User Query
       │
       ▼
  Retriever Agent
       ├── navigates the 15-subcategory skill tree
       ├── extracts key entities
       └── selects relevant resources
       │
       ▼
  Code Agent
       ├── reads SKILL.md + example.py
       ├── writes custom query code
       └── executes resource-specific retrieval
       │
       ├──▶ SIMPLE ──▶ Responder ──▶ Final Answer
       │
       └──▶ GRAPH  ──▶ Graph Builder ──▶ Reranker
                        ──▶ Responder ──▶ Reflector
                        ──▶ optional Web Search
                        ──▶ Final Answer

57 Implemented Skills

Organized across 15 drug-specific subcategories for comprehensive coverage.

Category#Skills
DTI10ChEMBL, BindingDB, DGIdb, Open Targets, TTD, STITCH, TarKG, GDKD, Molecular Targets ×2
ADR4FAERS, SIDER, nSIDES, ADReCS
Knowledgebase8UniD3, DrugBank, IUPHAR/BPS, DrugCentral, CPIC, PharmKG, WHO EML, FDA Orange Book
Mechanism1DRUGMECHDB
Labeling3openFDA Human Drug, DailyMed, MedlinePlus Drug Info
Ontology4RxNorm, ChEBI, ATC/DDD, NDF-RT
Repurposing6RepoDB, DRKG, OREGANO, Drug Repurposing Hub, DrugRepoBank, RepurposeDrugs
PGx1PharmGKB
DDI3MecDDI, DDInter, KEGG Drug
Toxicity4UniTox, LiverTox, DILIrank, DILI
Combination2DrugCombDB, DrugComb
Molecular Prop1GDSC
Drug-Disease1SemaTyP
Reviews2WebMD Drug Reviews, Drugs.com Reviews
Drug NLP7DDI Corpus 2013, DrugProt, ADE Corpus, CADEC, PsyTAR, TAC 2017 ADR, PHEE

Quick Start

Up and running in minutes with just a working LLM config.

01

Install Dependencies

pip install langgraph openai
02

Configure API Keys

cp api_keys.example.json api_keys.json
# Edit api_keys.json with your credentials
03

Run the Demo

python -m drugclaw demo
python -m drugclaw run --query "What are the known drug targets of imatinib?"
04

Install CLI (Optional)

pip install -e . --no-build-isolation
drugclaw doctor
drugclaw list

Python API

# Call DrugClaw from Python from drugclaw.config import Config from drugclaw.main_system import DrugClawSystem config = Config(key_file="api_keys.json") system = DrugClawSystem(config) result = system.query( "What prescribing and safety information is available for metformin?", thinking_mode=ThinkingMode.SIMPLE, resource_filter=["DailyMed", "openFDA Human Drug"], ) print(result["answer"])

Accelerate your drug discovery research

Raise resource density, retrieval fidelity, and evidence-grounded reasoning — all at the same time.