biomni by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill biomniBiomni 是斯坦福大学 SNAP 实验室开发的开源生物医学人工智能代理框架,能够跨生物医学领域自主执行复杂的研究任务。当您处理多步骤生物推理任务、分析生物医学数据或开展涉及基因组学、药物发现、分子生物学和临床分析的研究时,请使用此技能。
Biomni 擅长:
在以下场景中使用 biomni:
安装 Biomni 并为 LLM 提供商配置 API 密钥:
uv pip install biomni --upgrade
配置 API 密钥(存储在 .env 文件或环境变量中):
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
export ANTHROPIC_API_KEY="your-key-here"
# 可选:OpenAI、Azure、Google、Groq、AWS Bedrock 密钥
使用 scripts/setup_environment.py 获取交互式设置帮助。
from biomni.agent import A1
# 使用数据路径和 LLM 选择初始化代理
agent = A1(path='./data', llm='claude-sonnet-4-20250514')
# 自主执行生物医学任务
agent.go("您的生物医学研究问题或任务")
# 保存对话历史记录和结果
agent.save_conversation_history("report.pdf")
A1 类是 biomni 的主要接口:
from biomni.agent import A1
from biomni.config import default_config
# 基本初始化
agent = A1(
path='./data', # 数据湖路径(首次使用时下载约 11GB)
llm='claude-sonnet-4-20250514' # LLM 模型选择
)
# 高级配置
default_config.llm = "gpt-4"
default_config.timeout_seconds = 1200
default_config.max_iterations = 50
支持的 LLM 提供商:
claude-sonnet-4-20250514、claude-opus-4-20250514gpt-4、gpt-4-turbogemini-2.0-flash-expllama-3.3-70b-versatile详细 LLM 配置说明请参阅 references/llm_providers.md。
Biomni 遵循自主代理工作流:
# 步骤 1:初始化代理
agent = A1(path='./data', llm='claude-sonnet-4-20250514')
# 步骤 2:使用自然语言查询执行任务
result = agent.go("""
设计一个 CRISPR 筛选方案,以识别 HEK293 细胞中调控自噬的基因。
根据必需性和通路相关性对基因进行优先级排序。
""")
# 步骤 3:审查生成的代码和分析
# 代理自主执行:
# - 将任务分解为子步骤
# - 检索相关生物学知识
# - 生成并执行分析代码
# - 解释结果并提供见解
# 步骤 4:保存结果
agent.save_conversation_history("autophagy_screen_report.pdf")
agent.go("""
为识别 [细胞类型] 中影响 [表型] 的基因,设计一个全基因组 CRISPR 敲除筛选。包括:
1. sgRNA 文库设计
2. 基因优先级排序标准
3. 基于通路分析的预期命中基因
""")
agent.go("""
分析这个单细胞 RNA 测序数据集:
- 执行质量控制和过滤
- 通过聚类识别细胞群体
- 使用标记基因注释细胞类型
- 在不同条件之间进行差异表达分析
文件路径:[path/to/data.h5ad]
""")
agent.go("""
预测这些候选药物的 ADMET 属性:
[SMILES 字符串或化合物 ID]
重点关注:
- 吸收(Caco-2 渗透性,HIA)
- 分布(血浆蛋白结合,血脑屏障穿透)
- 代谢(CYP450 相互作用)
- 排泄(清除率)
- 毒性(hERG 风险,肝毒性)
""")
agent.go("""
解释 [性状/疾病] 的 GWAS 结果:
- 识别全基因组显著变异
- 将变异映射到因果基因
- 执行通路富集分析
- 预测功能后果
汇总统计文件:[path/to/gwas_summary.txt]
""")
所有生物医学领域的综合任务示例请参阅 references/use_cases.md。
Biomni 集成了约 11GB 的生物医学知识源:
数据在首次使用时自动下载到指定的 path。
通过模型上下文协议使用外部工具扩展 biomni:
# MCP 服务器可以提供:
# - FDA 药物数据库
# - 文献网络搜索
# - 自定义生物医学 API
# - 实验室设备接口
# 在 .biomni/mcp_config.json 中配置 MCP 服务器
在生物医学任务上对代理性能进行基准测试:
from biomni.eval import BiomniEval1
evaluator = BiomniEval1()
# 评估特定任务类型
score = evaluator.evaluate(
task_type='crispr_design',
instance_id='test_001',
answer=agent_output
)
# 访问评估数据集
dataset = evaluator.load_dataset()
⚠️ 重要提示:Biomni 以完整的系统权限执行 LLM 生成的代码。在生产环境中使用时:
default_config.timeout_secondsmax_iterations 以防止无限循环# 始终保存对话历史以确保可重复性
agent.save_conversation_history("results/project_name_YYYYMMDD.pdf")
# 报告中应包含:
# - 原始任务描述
# - 生成的分析代码
# - 结果和解释
# - 使用的数据源
references/ 目录中提供详细文档:
api_reference.md - A1 类、配置和评估的完整 API 文档llm_providers.md - LLM 提供商设置(Anthropic、OpenAI、Azure、Google、Groq、AWS)use_cases.md - 所有生物医学领域的综合任务示例scripts/ 目录中的辅助脚本:
setup_environment.py - 交互式环境和 API 密钥配置generate_report.py - 具有自定义格式的增强型 PDF 报告生成数据下载失败
# 手动触发数据湖下载
agent = A1(path='./data', llm='your-llm')
# 首次 .go() 调用将下载数据
API 密钥错误
# 验证环境变量
echo $ANTHROPIC_API_KEY
# 或检查工作目录中的 .env 文件
复杂任务超时
from biomni.config import default_config
default_config.timeout_seconds = 3600 # 1 小时
大型数据集内存问题
如有问题或疑问:
references/ 文件获取详细指导每周安装次数
135
仓库
GitHub 星标数
22.6K
首次出现
Jan 21, 2026
安全审计
安装于
claude-code110
opencode108
gemini-cli101
cursor100
antigravity92
codex92
Biomni is an open-source biomedical AI agent framework from Stanford's SNAP lab that autonomously executes complex research tasks across biomedical domains. Use this skill when working on multi-step biological reasoning tasks, analyzing biomedical data, or conducting research spanning genomics, drug discovery, molecular biology, and clinical analysis.
Biomni excels at:
Use biomni for:
Install Biomni and configure API keys for LLM providers:
uv pip install biomni --upgrade
Configure API keys (store in .env file or environment variables):
export ANTHROPIC_API_KEY="your-key-here"
# Optional: OpenAI, Azure, Google, Groq, AWS Bedrock keys
Use scripts/setup_environment.py for interactive setup assistance.
from biomni.agent import A1
# Initialize agent with data path and LLM choice
agent = A1(path='./data', llm='claude-sonnet-4-20250514')
# Execute biomedical task autonomously
agent.go("Your biomedical research question or task")
# Save conversation history and results
agent.save_conversation_history("report.pdf")
The A1 class is the primary interface for biomni:
from biomni.agent import A1
from biomni.config import default_config
# Basic initialization
agent = A1(
path='./data', # Path to data lake (~11GB downloaded on first use)
llm='claude-sonnet-4-20250514' # LLM model selection
)
# Advanced configuration
default_config.llm = "gpt-4"
default_config.timeout_seconds = 1200
default_config.max_iterations = 50
Supported LLM Providers:
claude-sonnet-4-20250514, claude-opus-4-20250514gpt-4, gpt-4-turbogemini-2.0-flash-expllama-3.3-70b-versatileSee references/llm_providers.md for detailed LLM configuration instructions.
Biomni follows an autonomous agent workflow:
# Step 1: Initialize agent
agent = A1(path='./data', llm='claude-sonnet-4-20250514')
# Step 2: Execute task with natural language query
result = agent.go("""
Design a CRISPR screen to identify genes regulating autophagy in
HEK293 cells. Prioritize genes based on essentiality and pathway
relevance.
""")
# Step 3: Review generated code and analysis
# Agent autonomously:
# - Decomposes task into sub-steps
# - Retrieves relevant biological knowledge
# - Generates and executes analysis code
# - Interprets results and provides insights
# Step 4: Save results
agent.save_conversation_history("autophagy_screen_report.pdf")
agent.go("""
Design a genome-wide CRISPR knockout screen for identifying genes
affecting [phenotype] in [cell type]. Include:
1. sgRNA library design
2. Gene prioritization criteria
3. Expected hit genes based on pathway analysis
""")
agent.go("""
Analyze this single-cell RNA-seq dataset:
- Perform quality control and filtering
- Identify cell populations via clustering
- Annotate cell types using marker genes
- Conduct differential expression between conditions
File path: [path/to/data.h5ad]
""")
agent.go("""
Predict ADMET properties for these drug candidates:
[SMILES strings or compound IDs]
Focus on:
- Absorption (Caco-2 permeability, HIA)
- Distribution (plasma protein binding, BBB penetration)
- Metabolism (CYP450 interaction)
- Excretion (clearance)
- Toxicity (hERG liability, hepatotoxicity)
""")
agent.go("""
Interpret GWAS results for [trait/disease]:
- Identify genome-wide significant variants
- Map variants to causal genes
- Perform pathway enrichment analysis
- Predict functional consequences
Summary statistics file: [path/to/gwas_summary.txt]
""")
See references/use_cases.md for comprehensive task examples across all biomedical domains.
Biomni integrates ~11GB of biomedical knowledge sources:
Data is automatically downloaded to the specified path on first use.
Extend biomni with external tools via Model Context Protocol:
# MCP servers can provide:
# - FDA drug databases
# - Web search for literature
# - Custom biomedical APIs
# - Laboratory equipment interfaces
# Configure MCP servers in .biomni/mcp_config.json
Benchmark agent performance on biomedical tasks:
from biomni.eval import BiomniEval1
evaluator = BiomniEval1()
# Evaluate on specific task types
score = evaluator.evaluate(
task_type='crispr_design',
instance_id='test_001',
answer=agent_output
)
# Access evaluation dataset
dataset = evaluator.load_dataset()
⚠️ Important : Biomni executes LLM-generated code with full system privileges. For production use:
default_config.timeout_seconds for complex tasksmax_iterations to prevent runaway loops# Always save conversation history for reproducibility
agent.save_conversation_history("results/project_name_YYYYMMDD.pdf")
# Include in reports:
# - Original task description
# - Generated analysis code
# - Results and interpretations
# - Data sources used
Detailed documentation available in the references/ directory:
api_reference.md - Complete API documentation for A1 class, configuration, and evaluationllm_providers.md - LLM provider setup (Anthropic, OpenAI, Azure, Google, Groq, AWS)use_cases.md - Comprehensive task examples for all biomedical domainsHelper scripts in the scripts/ directory:
setup_environment.py - Interactive environment and API key configurationgenerate_report.py - Enhanced PDF report generation with custom formattingData download fails
# Manually trigger data lake download
agent = A1(path='./data', llm='your-llm')
# First .go() call will download data
API key errors
# Verify environment variables
echo $ANTHROPIC_API_KEY
# Or check .env file in working directory
Timeout on complex tasks
from biomni.config import default_config
default_config.timeout_seconds = 3600 # 1 hour
Memory issues with large datasets
For issues or questions:
references/ files for detailed guidanceWeekly Installs
135
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
claude-code110
opencode108
gemini-cli101
cursor100
antigravity92
codex92
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
49,000 周安装
GDPR 数据处理指南 - 合规实施、同意管理与隐私控制实战教程
7,000 周安装
面向对象组件文档自动生成工具 - 遵循C4/Arc42/IEEE标准
7,000 周安装
GitHub Copilot Dataverse MCP 配置指南:自动发现与手动设置环境URL
7,000 周安装
AI自动更新面向对象组件文档 | 遵循C4/Arc42/IEEE标准 | GitHub Copilot工具
7,000 周安装
Web表单创建全攻略 - HTML/CSS/JS表单设计、PHP/Python服务器处理与验证
7,000 周安装
Kubernetes安全策略实战指南:NetworkPolicy、PodSecurityPolicy、RBAC配置与Pod安全标准
7,200 周安装