Biomni Toolkit
Battle-tested skill for autonomous, biomedical, agent, framework. Includes structured workflows, validation checks, and reusable patterns for scientific.
Biomni Toolkit
A scientific computing skill for working with Biomni — Stanford SNAP Lab's open-source biomedical AI agent framework that autonomously executes complex research tasks across biomedical domains including literature search, data analysis, and experimental design.
When to Use This Skill
Choose Biomni Toolkit when:
- Setting up Biomni agents for automated biomedical research tasks
- Configuring tool collections for literature search, data analysis, or experiment planning
- Building multi-step research workflows with AI-driven hypothesis generation
- Integrating biomedical databases (PubMed, UniProt, ClinicalTrials) through Biomni
Consider alternatives when:
- You need simple PubMed searches (use Biopython Entrez directly)
- You're doing manual data analysis without AI automation
- You need protein structure prediction (use AlphaFold)
- You want a general-purpose AI agent framework (use LangChain or AutoGen)
Quick Start
claude "Set up a Biomni agent to research drug targets for Alzheimer's disease"
# Install Biomni # pip install biomni from biomni.agent import BioAgent from biomni.tools import PubMedTool, UniProtTool, DrugBankTool # Initialize agent with biomedical tools agent = BioAgent( model="gpt-4", tools=[ PubMedTool(), UniProtTool(), DrugBankTool() ], verbose=True ) # Execute a research task result = agent.run( "Find the top 5 novel drug targets for Alzheimer's disease " "published in the last 2 years. For each target, provide: " "gene name, protein function, supporting evidence, and " "any existing drugs in clinical trials." ) print(result.summary) for target in result.targets: print(f"\n{target.gene}: {target.function}") print(f" Evidence: {target.evidence_count} papers") print(f" Clinical trials: {target.trial_count}")
Core Concepts
Biomni Architecture
| Component | Purpose | Example |
|---|---|---|
| Agent | Orchestrates research workflow | BioAgent |
| Tools | Interface to databases and APIs | PubMedTool, UniProtTool |
| Planner | Decomposes complex queries | Multi-step task planning |
| Memory | Tracks findings across steps | Accumulated research context |
| Evaluator | Assesses result quality | Citation verification |
Available Tool Collections
# Literature tools from biomni.tools import ( PubMedTool, # PubMed/MEDLINE search BioRxivTool, # Preprint search SemanticScholarTool # Citation analysis ) # Sequence & structure tools from biomni.tools import ( UniProtTool, # Protein database NCBIGeneTool, # Gene information PDBTool, # Protein structures BLASTTool # Sequence alignment ) # Clinical tools from biomni.tools import ( ClinicalTrialsTool, # Clinical trial registry DrugBankTool, # Drug information DisGeNetTool # Disease-gene associations ) # Pathway tools from biomni.tools import ( KEGGTool, # Metabolic pathways ReactomeTool, # Biological pathways StringDBTool # Protein interactions )
Multi-Step Research Workflow
# Complex research task with multiple phases workflow = agent.create_workflow([ { "step": "literature_review", "query": "Recent CRISPR screens for cancer vulnerabilities", "tools": [PubMedTool(), BioRxivTool()], "output": "top_papers" }, { "step": "target_identification", "query": "Extract gene targets from {top_papers}", "tools": [UniProtTool(), NCBIGeneTool()], "output": "gene_list" }, { "step": "druggability_assessment", "query": "Assess druggability of {gene_list}", "tools": [DrugBankTool(), PDBTool()], "output": "druggable_targets" } ]) results = workflow.execute()
Configuration
| Parameter | Description | Default |
|---|---|---|
model | LLM backend for agent reasoning | gpt-4 |
max_steps | Maximum agent reasoning steps | 10 |
tools | List of enabled biomedical tools | Required |
memory_type | Short-term or long-term memory | short_term |
verbose | Print reasoning steps | False |
Best Practices
-
Scope research queries precisely. Vague queries like "tell me about cancer" produce broad, unhelpful results. Specify the disease subtype, molecular mechanism, time frame, and desired output format for focused, actionable research summaries.
-
Validate agent findings against primary sources. Biomni agents can hallucinate or misinterpret search results. Always verify critical findings by checking the cited papers directly, especially for claims about clinical trial results or drug efficacy.
-
Use appropriate tool combinations. Different research questions need different tool sets. Literature surveys need PubMed + BioRxiv. Target validation needs UniProt + PDB + DrugBank. Don't load all tools by default — irrelevant tools increase agent confusion.
-
Set reasonable step limits. Complex queries can cause the agent to loop. Start with
max_steps=10and increase only if the agent consistently runs out of steps. If it needs more than 20 steps, the query is probably too broad. -
Save intermediate results for reproducibility. Export agent reasoning traces and intermediate findings. Biomedical databases update frequently, so the same query may return different results next month. Timestamped exports ensure reproducibility.
Common Issues
Agent returns generic information instead of specific findings. The query is too broad. Add constraints: time period ("published after 2023"), organism ("in human cells"), technique ("using CRISPR"), and output format ("table with gene name, function, evidence level").
Tool calls fail with API rate limits. PubMed and other databases enforce rate limits. Configure retry logic with exponential backoff. For PubMed specifically, register for an NCBI API key to increase the rate limit from 3 to 10 requests per second.
Results include retracted or low-quality papers. Add post-processing filters to exclude retracted papers (check retraction databases), preprints without peer review (if peer-reviewed evidence is needed), and papers from predatory journals. Quality filtering is not automatic.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.