MCPcopy Index your code
hub / github.com/DrugClaw/DrugClaw

github.com/DrugClaw/DrugClaw @v0.1.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.10 ↗ · + Follow
3,935 symbols 12,588 edges 190 files 88 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DrugClaw

DrugClaw logo

English | 中文

Website License: Apache%202.0

DrugClaw headline

DrugClaw is an AI Research Assistant for Accelerated Drug Discovery, implemented as a Rust multi-channel agent runtime. One agent core serves chat channels, the local Web UI, hooks, scheduled tasks, and domain skills without splitting the product into separate bots.

TL;DR

  • DrugClaw is a multi-channel AI runtime focused on drug-discovery research workflows.
  • It combines tool use, memory, skills, scheduler, hooks, and Web UI in one agent core.
  • You can run it locally with drugclaw setup, drugclaw doctor, and drugclaw start.
  • Treat docking/QSAR/ADMET outputs as prioritization signals, not experimental proof.

Table of Contents

Built with Rust. 🦀

This project is built on top of microclaw.

What DrugClaw Is

DrugClaw combines drug-discovery research workflows with a general-purpose agent runtime:

  • a channel-agnostic agent loop with tool use and session resume
  • a provider-agnostic LLM layer with Anthropic and OpenAI-compatible backends
  • persistent SQLite storage for chats, memory, auth, and observability
  • a local Web UI and HTTP hook surface for operations and automation
  • a skills system for reproducible workflows, including bioinformatics, chemistry, and docking

Current channel adapters include:

  • Telegram
  • Discord
  • Slack
  • Feishu / Lark
  • Matrix
  • WhatsApp Cloud API
  • IRC
  • iMessage
  • Email
  • Nostr
  • Signal
  • DingTalk
  • QQ
  • Web

Current Scope

DrugClaw is already useful as:

  • a tool-using chat agent for code and file operations
  • a multi-chat automation runtime with hooks and scheduled tasks
  • a memory-backed assistant with file memory plus structured SQLite memory
  • a local operator console through the Web UI
  • a research assistant for literature review, public database triage, molecular property analysis, DrugBank retrieval, QSAR, and docking workflows

The runtime is generic enough to automate other workflows, but the product direction is explicitly drug-discovery research acceleration.

Capability Boundary

DrugClaw is strong at:

  • literature and public-database lookup
  • structured note-taking over biological and chemical artifacts
  • reproducible scripting for bioinformatics and computational chemistry
  • heuristic prioritization through docking, ADMET triage, QSAR, and structure-aware scoring
  • moving from chat intent to saved artifacts, reports, and follow-up analyses

DrugClaw is not:

  • a wet-lab automation system
  • a substitute for medicinal chemistry or structural biology judgment
  • a clinically validated ADMET or affinity oracle
  • a regulatory, diagnostic, or treatment decision system
  • proof that a compound works in vitro, in vivo, or in humans

When DrugClaw reports docking scores, QSAR predictions, ADMET heuristics, or affinity estimates, those outputs should be treated as prioritization signals only.

Prerequisites

  • macOS or Linux
  • Docker Desktop
  • Anthropic API key

Demo Examples

Below are live demonstrations of DrugClaw handling real tasks via Telegram.

Show Demo Examples

  1. Protein Structure Rendering

Fetch a PDB structure, render it in rainbow coloring with PyMOL, and send the image.

Protein structure rendering demo

  1. PubMed Literature Search

Search PubMed for recent high-impact papers and provide structured summaries.

PubMed literature search demo

  1. Hydrogen Bond Analysis

Visualize hydrogen bonds between a ligand and protein in PDB 3BIK.

Hydrogen bond analysis demo screenshot 1 Hydrogen bond analysis demo screenshot 2 Hydrogen bond analysis demo screenshot 3

  1. Target Intelligence Dossier

Build a concise target dossier by combining UniProt, OpenTargets, Reactome, STRING, ClinVar, and known-drug evidence into one brief.

Target intelligence dossier demo

  1. Compound Database Triage

Query PubChem, ChEMBL, and BindingDB for a compound or target, normalize the returned activity records, and send back a ranked summary table.

Compound database triage demo

  1. Docking Workflow Summary

Generate the search box, run docking, and return the top poses with a compact report.

Docking workflow summary demo

Install

One-line installer

curl -fsSL https://drugclaw.com/install.sh | bash

When Docker is installed and the daemon is reachable, the installer also tries to build the default science sandbox image drugclaw-drug-sandbox:latest.

Windows PowerShell installer

iwr https://drugclaw.com/install.ps1 -UseBasicParsing | iex

From source

git clone https://github.com/DrugClaw/DrugClaw.git
cd drugclaw
cargo build
npm --prefix web install
npm --prefix web run build

Uninstall

./uninstall.sh

Quick Start

1. Create config

cp drugclaw.config.example.yaml drugclaw.config.yaml

2. Run setup and diagnostics

drugclaw setup
drugclaw doctor

If the default sandbox image is already present locally, drugclaw setup defaults the bash sandbox to enabled.

3. Start runtime

drugclaw start

4. Open the local Web UI

By default the UI listens on http://127.0.0.1:10961.

Minimal Config

A smallest practical config is usually Web-first, then add channels as needed.

llm_provider: "anthropic"
api_key: "replace-me"
model: ""

data_dir: "./drugclaw.data"
working_dir: "./tmp"
working_dir_isolation: "chat"

channels:
  web:
    enabled: true
  telegram:
    enabled: false

web_host: "127.0.0.1"
web_port: 10961

Recommended next steps:

  • enable one chat channel under channels:
  • set soul_path or add SOUL.md
  • enable sandboxing for code execution when you need stronger isolation
  • use drugclaw web password-generate for Web operator access

Core Concepts

Agent loop

The runtime does one thing consistently across channels:

  1. load chat state and memory
  2. build the system prompt plus skills catalog
  3. call the selected model with tool schemas
  4. execute tools when requested
  5. persist the updated session and artifacts

The shared loop lives in src/agent_engine.rs. Channels are ingress and egress adapters, not separate agent implementations.

Memory

DrugClaw has two memory layers:

  • file memory: AGENTS.md plus chat-scoped files under runtime/groups/
  • structured memory: SQLite-backed facts, confidence, supersession, and observability

This lets the runtime keep durable context without forcing every instruction into a single prompt.

Skills

Show Skills Overview

Bundled skills currently include:

  • bio-tools
  • bio-db-tools
  • bayesian-optimization-tools
  • omics-tools
  • grn-tools
  • target-intelligence-tools
  • variant-analysis-tools
  • pharma-db-tools
  • chem-tools
  • pharma-ml-tools
  • literature-review-tools
  • medical-data-tools
  • clinical-research-tools
  • medical-qms-tools
  • stat-modeling-tools
  • survival-analysis-tools
  • scientific-visualization-tools
  • scientific-workflow-tools
  • docking-tools
  • document, spreadsheet, PDF, GitHub, weather, and macOS utility skills

Bundled domain skills now cover:

  • sequence analysis and general bioinformatics workflows
  • public biology database lookup across UniProt, PDB, AlphaFold, ClinVar, dbSNP, gnomAD, Ensembl, GEO, InterPro, KEGG, OpenTargets, Reactome, and STRING
  • AnnData, single-cell, BAM or CRAM, and mzML dataset triage
  • Arboreto-based gene regulatory network inference with GRNBoost2 or GENIE3
  • local VCF, SNV, indel, and SV summarization plus target-intelligence dossiers
  • public drug-discovery database lookup across PubChem, ChEMBL, BindingDB, openFDA, ClinicalTrials.gov, and OpenAlex
  • datamol, molfeat, PyTDC, and medchem-backed pharma ML preparation
  • DeepChem, RDKit, PySCF, assay normalization, QSAR, virtual screening, and DrugBank lookup
  • hypothesis tests, statsmodels regression, Kaplan-Meier, Cox modeling, and reusable scientific figures
  • citation cleanup, evidence matrices, hypothesis framing, and reproducibility checklists
  • Bayesian optimization for bounded experiment suggestion and parameter tuning
  • DICOM metadata inspection, biosignal analysis, and cohort-table profiling for medical research datasets
  • clinical-research design, reporting-guideline selection, and study-planning support
  • Vina-based docking plus downstream chemistry post-processing

See docs/operations/science-runtime.md for runtime requirements.

Hooks

Hooks let you gate or modify LLM and tool traffic at runtime.

Supported events:

  • BeforeLLMCall
  • BeforeToolCall
  • AfterToolCall

Supported outcomes:

  • allow
  • block
  • modify

See docs/hooks/HOOK.md.

ClawHub

ClawHub is the registry layer for discovering and installing skills.

Use:

drugclaw skill search <query>
drugclaw skill install <slug>
drugclaw skill list

Reference: docs/clawhub/overview.md

Web UI And Hooks

The local Web surface is not an afterthought. It exposes:

  • session and history browsing across channels
  • auth and API key management
  • metrics and memory observability
  • config self-check and runtime operations
  • HTTP hook endpoints for automation ingress

Important endpoints:

  • POST /hooks/agent
  • POST /api/hooks/agent
  • POST /hooks/wake
  • POST /api/hooks/wake

Reference: docs/operations/http-hook-trigger.md

Science Skills

DrugClaw now ships a non-trivial scientific workflow layer.

Show Science Skills Details

bio-tools

Use for:

  • FASTA / FASTQ / BAM / BED workflows
  • BLAST, alignment, QC, plotting, structure rendering
  • literature search and general bioinformatics scripting

bio-db-tools

Use for API-backed lookup of:

  • UniProt
  • RCSB PDB
  • AlphaFold DB
  • ClinVar
  • dbSNP
  • gnomAD
  • Ensembl
  • GEO
  • InterPro
  • KEGG
  • OpenTargets
  • Reactome
  • STRING

Bundled template:

  • skills/science/bio-db-tools/templates/bio_db_lookup.py

omics-tools

Use for:

  • h5ad and AnnData triage before Scanpy or scvi workflows
  • BAM or CRAM region inspection with pysam
  • mzML experiment inventory before pyOpenMS workflows

Bundled templates:

  • skills/science/omics-tools/templates/single_cell_profile.py
  • skills/science/omics-tools/templates/pysam_region_profile.py
  • skills/science/omics-tools/templates/mzml_summary.py

grn-tools

Use for:

  • GRNBoost2 or GENIE3 regulatory-edge inference
  • transcription factor to target ranking from bulk or single-cell expression matrices
  • TF-whitelist constrained GRN runs with Arboreto

Bundled template:

  • skills/genomics/grn-tools/templates/arboreto_grn.py

variant-analysis-tools

Use for:

  • local VCF or BCF summarization
  • VAF, depth, PASS, and consequence filtering
  • SNV, indel, and SV mutation-class counts before downstream annotation

Bundled template:

  • skills/genomics/variant-analysis-tools/templates/variant_report.py

target-intelligence-tools

Use for:

  • one-file target briefs spanning identifiers, disease evidence, known drugs, pathways, and interaction partners
  • compact target-validation snapshots before screening or docking
  • integrating UniProt, OpenTargets, STRING, Reactome, ClinVar, and gnomAD signals into one dossier

Bundled template:

  • skills/research/target-intelligence-tools/templates/target_dossier.py

pharma-db-tools

Use for API-backed lookup of:

  • PubChem
  • ChEMBL
  • BindingDB measured affinities
  • openFDA drug labels, events, NDC, recalls, approvals, and shortages
  • ClinicalTrials.gov
  • OpenAlex

Bundled template:

  • skills/pharma/pharma-db-tools/templates/pharma_db_lookup.py

chem-tools

Use for:

  • DeepChem featurization
  • RDKit descriptors
  • heuristic ADMET screening
  • DrugBank local or online lookup
  • assay-table normalization
  • QSAR and bioactivity prediction
  • ligand-only and structure-aware affinity prediction
  • virtual screening reranking

pharma-ml-tools

Use for:

  • datamol-backed library profiling and scaffold summaries
  • molfeat feature generation for QSAR or ranking workflows
  • PyTDC benchmark dataset fetch and split export
  • medchem rule and alert screening before prioritization

Bundled templates:

  • skills/pharma/pharma-ml-tools/templates/datamol_library_profile.py
  • `skills/pharma/pharma-ml-tools/te

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 2,628
Method 812
Class 443
Enum 41
Interface 11

Languages

Rust84%
Python12%
TypeScript4%

Modules by API surface

src/setup.rs276 symbols
crates/drugclaw-storage/src/db.rs209 symbols
src/web.rs163 symbols
src/config.rs158 symbols
src/llm.rs138 symbols
src/channels/telegram.rs117 symbols
skills/pharma/docking-tools/templates/docking_workflow.py108 symbols
web/src/main.tsx99 symbols
src/channels/feishu.rs90 symbols
src/channels/matrix.rs84 symbols
src/agent_engine.rs81 symbols
src/plugins.rs74 symbols

For agents

$ claude mcp add DrugClaw \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page