[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72355":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},72355,"Biomni","snap-stanford\u002FBiomni","snap-stanford","Biomni: a general-purpose biomedical AI agent","https:\u002F\u002Fbiomni.stanford.edu",null,"Python",3191,595,36,46,0,25,49,122,75,110.33,"Apache License 2.0",false,"main",true,[27,28,29],"agent","ai","biomedicine","2026-06-12 04:01:04","\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Ffigs\u002Fbiomni_logo.png\" alt=\"Biomni Logo\" width=\"600px\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fbiomnigroup\u002Fshared_invite\u002Fzt-3avks4913-dotMBt8D_apQnJ3mG~ak6Q\">\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FJoin-Slack-4A154B?style=for-the-badge&logo=slack\" alt=\"Join Slack\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fbiomni.stanford.edu\">\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTry-Web%20UI-blue?style=for-the-badge\" alt=\"Web UI\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fx.com\u002FProjectBiomni\">\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFollow-on%20X-black?style=for-the-badge&logo=x\" alt=\"Follow on X\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fproject-biomni\">\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFollow-LinkedIn-0077B5?style=for-the-badge&logo=linkedin\" alt=\"Follow on LinkedIn\" \u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.biorxiv.org\u002Fcontent\u002F10.1101\u002F2025.05.30.656746v1\">\n\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRead-Paper-green?style=for-the-badge\" alt=\"Paper\" \u002F>\n\u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\n# Biomni: A General-Purpose Biomedical AI Agent\n\n## Overview\n\n\nBiomni is a general-purpose biomedical AI agent designed to autonomously execute a wide range of research tasks across diverse biomedical subfields. By integrating cutting-edge large language model (LLM) reasoning with retrieval-augmented planning and code-based execution, Biomni helps scientists dramatically enhance research productivity and generate testable hypotheses.\n\n\n## Quick Start\n\n### Installation\n\nOur software environment is massive and we provide a single setup.sh script to setup.\nFollow this [file](biomni_env\u002FREADME.md) to setup the env first.\n\nThen activate the environment E1:\n\n```bash\nconda activate biomni_e1\n```\n\nthen install the biomni official pip package:\n\n```bash\npip install biomni --upgrade\n```\n\nFor the latest update, install from the github source version, or do:\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fsnap-stanford\u002FBiomni.git@main\n```\n\nLastly, configure your API keys using one of the following methods:\n\n\u003Cdetails>\n\u003Csummary>Click to expand\u003C\u002Fsummary>\n\n#### Option 1: Using .env file (Recommended)\n\nCreate a `.env` file in your project directory:\n\n```bash\n# Copy the example file\ncp .env.example .env\n\n# Edit the .env file with your actual API keys\n```\n\nYour `.env` file should look like:\n\n```env\n# Required: Anthropic API Key for Claude models\nANTHROPIC_API_KEY=your_anthropic_api_key_here\n\n# Optional: OpenAI API Key (if using OpenAI models)\nOPENAI_API_KEY=your_openai_api_key_here\n\n# Optional: Azure OpenAI API Key (if using Azure OpenAI models)\nOPENAI_API_KEY=your_azure_openai_api_key\nOPENAI_ENDPOINT=https:\u002F\u002Fyour-resource-name.openai.azure.com\u002F\n\n# Optional: AI Studio Gemini API Key (if using Gemini models)\nGEMINI_API_KEY=your_gemini_api_key_here\n\n# Optional: groq API Key (if using groq as model provider)\nGROQ_API_KEY=your_groq_api_key_here\n\n# Optional: Set the source of your LLM for example:\n#\"OpenAI\", \"AzureOpenAI\", \"Anthropic\", \"Ollama\", \"Gemini\", \"Bedrock\", \"Groq\", \"Custom\"\nLLM_SOURCE=your_LLM_source_here\n\n# Optional: AWS Bedrock Configuration (if using AWS Bedrock models)\nAWS_BEARER_TOKEN_BEDROCK=your_bedrock_api_key_here\nAWS_REGION=us-east-1\n\n# Optional: Custom model serving configuration\n# CUSTOM_MODEL_BASE_URL=http:\u002F\u002Flocalhost:8000\u002Fv1\n# CUSTOM_MODEL_API_KEY=your_custom_api_key_here\n\n# Optional: Biomni data path (defaults to .\u002Fdata)\n# BIOMNI_DATA_PATH=\u002Fpath\u002Fto\u002Fyour\u002Fdata\n\n# Optional: Timeout settings (defaults to 600 seconds)\n# BIOMNI_TIMEOUT_SECONDS=600\n```\n\n#### Option 2: Using shell environment variables\n\nAlternatively, configure your API keys in bash profile `~\u002F.bashrc`:\n\n```bash\nexport ANTHROPIC_API_KEY=\"YOUR_API_KEY\"\nexport OPENAI_API_KEY=\"YOUR_API_KEY\" # optional if you just use Claude\nexport OPENAI_ENDPOINT=\"https:\u002F\u002Fyour-resource-name.openai.azure.com\u002F\" # optional unless you are using Azure\nexport AWS_BEARER_TOKEN_BEDROCK=\"YOUR_BEDROCK_API_KEY\" # optional for AWS Bedrock models\nexport AWS_REGION=\"us-east-1\" # optional, defaults to us-east-1 for Bedrock\nexport GEMINI_API_KEY=\"YOUR_GEMINI_API_KEY\" #optional if you want to use a gemini model\nexport GROQ_API_KEY=\"YOUR_GROQ_API_KEY\" # Optional: set this to use models served by Groq\nexport LLM_SOURCE=\"Groq\" # Optional: set this to use models served by Groq\n\n\n```\n\u003C\u002Fdetails>\n\n\n#### ⚠️ Known Package Conflicts\n\nSome Python packages are not installed by default in the Biomni environment due to dependency conflicts. If you need these features, you must install the packages manually and may need to uncomment relevant code in the codebase. See the up-to-date list and details in [docs\u002Fknown_conflicts.md](.\u002Fdocs\u002Fknown_conflicts.md).\n\n### Basic Usage\n\nOnce inside the environment, you can start using Biomni:\n\n```python\nfrom biomni.agent import A1\n\n# Initialize the agent with data path, Data lake will be automatically downloaded on first run (~11GB)\nagent = A1(path='.\u002Fdata', llm='claude-sonnet-4-20250514')\n\n# Execute biomedical tasks using natural language\nagent.go(\"Plan a CRISPR screen to identify genes that regulate T cell exhaustion, generate 32 genes that maximize the perturbation effect.\")\nagent.go(\"Perform scRNA-seq annotation at [PATH] and generate meaningful hypothesis\")\nagent.go(\"Predict ADMET properties for this compound: CC(C)CC1=CC=C(C=C1)C(C)C(=O)O\")\n```\n\n#### Controlling Datalake Loading\n\nBy default, Biomni automatically downloads the datalake files (~11GB) when you create an agent. You can control this behavior:\n\n```python\n# Skip automatic datalake download (faster initialization)\nagent = A1(path='.\u002Fdata', llm='claude-sonnet-4-20250514', expected_data_lake_files = [])\n```\n\nThis is useful for:\n- Faster testing and development\n- Environments with limited storage or bandwidth\n- Cases where you only need specific tools that don't require datalake files\nIf you plan on using Azure for your model, always prefix the model name with azure- (e.g. llm='azure-gpt-4o').\n\n### Gradio Interface\n\nLaunch an interactive web UI for Biomni:\n\n```python\nfrom biomni.agent import A1\n\nagent = A1(path='.\u002Fdata', llm='claude-sonnet-4-20250514')\nagent.launch_gradio_demo()\n```\n\n**Installation:**\n```bash\npip install \"gradio>=5.0,\u003C6.0\"\n```\n\n**Note:** Biomni's Gradio interface currently requires Gradio 5.x due to API changes in Gradio 6.0. If you have Gradio 6.x installed, you may need to downgrade.\n\n**Options:**\n- `share=True` - Create a public shareable link\n- `server_name=\"127.0.0.1\"` - Localhost only (default: \"0.0.0.0\")\n- `require_verification=True` - Require access code (default code: \"Biomni2025\")\n\nThe interface will be available at `http:\u002F\u002Flocalhost:7860`\n\n### Configuration Management\n\nBiomni includes a centralized configuration system that provides flexible ways to manage settings. You can configure Biomni through environment variables, runtime modifications, or direct parameters.\n\n```python\nfrom biomni.config import default_config\nfrom biomni.agent import A1\n\n# RECOMMENDED: Modify global defaults for consistency\ndefault_config.llm = \"gpt-4\"\ndefault_config.timeout_seconds = 1200\n\n# All agents AND database queries use these defaults\nagent = A1()  # Everything uses gpt-4, 1200s timeout\n```\n\n**Note**: Direct parameters to `A1()` only affect that agent's reasoning, not database queries. For consistent configuration across all operations, use `default_config` or environment variables.\n\nFor detailed configuration options, see the **[Configuration Guide](docs\u002Fconfiguration.md)**.\n\n### PDF Generation\n\nGenerate PDF reports of execution traces:\n\n```python\nfrom biomni.agent import A1\n\n# Initialize agent\nagent = A1(path='.\u002Fdata', llm='claude-sonnet-4-20250514')\n\n# Run your task\nagent.go(\"Your biomedical task here\")\n\n# Save conversation history as PDF\nagent.save_conversation_history(\"my_analysis_results.pdf\")\n```\n\n**PDF Generation Dependencies:**\n\u003Cdetails>\n\u003Csummary>Click to expand\u003C\u002Fsummary>\nFor optimal PDF generation, install one of these packages:\n\n```bash\n# Option 1: WeasyPrint (recommended for best layout control)\n# Conda environment (recommended)\nconda install weasyprint\n\n# System installation\nbrew install weasyprint  # macOS\napt install weasyprint   # Linux\n\n# See [WeasyPrint Installation Guide](https:\u002F\u002Fdoc.courtbouillon.org\u002Fweasyprint\u002Fstable\u002Ffirst_steps.html) for detailed instructions.\n\n# Option 2: markdown2pdf (Rust-based, fast and reliable)\n# macOS:\nbrew install theiskaa\u002Ftap\u002Fmarkdown2pdf\n\n# Windows\u002FLinux (using Cargo):\ncargo install markdown2pdf\n\n# Or download prebuilt binaries from:\n# https:\u002F\u002Fgithub.com\u002Ftheiskaa\u002Fmarkdown2pdf\u002Freleases\u002Flatest\n\n# Option 3: Pandoc (pip installation)\npip install pandoc\n```\n\u003C\u002Fdetails>\n\n## MCP (Model Context Protocol) Support\n\nBiomni supports MCP servers for external tool integration:\n\n```python\nfrom biomni.agent import A1\n\nagent = A1()\nagent.add_mcp(config_path=\".\u002Fmcp_config.yaml\")\nagent.go(\"Find FDA active ingredient information for ibuprofen\")\n```\n\n**Built-in MCP Servers:**\nFor usage and implementation details, see the [MCP Integration Documentation](docs\u002Fmcp_integration.md) and examples in [`tutorials\u002Fexamples\u002Fadd_mcp_server\u002F`](tutorials\u002Fexamples\u002Fadd_mcp_server\u002F) and [`tutorials\u002Fexamples\u002Fexpose_biomni_server\u002F`](tutorials\u002Fexamples\u002Fexpose_biomni_server\u002F).\n\n\n## Biomni-R0\n\n**Biomni-R0** is our first reasoning model for biology, built on Qwen-32B with reinforcement learning from agent interaction data. It's designed to excel at tool use, multi-step reasoning, and complex biological problem-solving through iterative self-correction.\n\n- 🤗 Model: [biomni\u002FBiomni-R0-32B-Preview](https:\u002F\u002Fhuggingface.co\u002Fbiomni\u002FBiomni-R0-32B-Preview)\n- 📝 Technical Report: [biomni.stanford.edu\u002Fblog\u002Fbiomni-r0-technical-report](https:\u002F\u002Fbiomni.stanford.edu\u002Fblog\u002Fbiomni-r0-technical-report)\n\nTo use Biomni-R0 for agent reasoning while keeping database queries on your usual provider (recommended), run a local SGLang server and pass the model to `A1()` directly.\n\n1) Launch SGLang with Biomni-R0:\n\n```bash\npython -m sglang.launch_server --model-path RyanLi0802\u002FBiomni-R0-Preview --port 30000 --host 0.0.0.0 --mem-fraction-static 0.8 --tp 2 --trust-remote-code --json-model-override-args '{\"rope_scaling\":{\"rope_type\":\"yarn\",\"factor\":1.0,\"original_max_position_embeddings\":32768}, \"max_position_embeddings\": 131072}'\n```\n\n2) Point the agent to your SGLang endpoint for reasoning:\n\n```python\nfrom biomni.config import default_config\nfrom biomni.agent import A1\n\n# Database queries (indexes, retrieval, etc.) use default_config\ndefault_config.llm = \"claude-3-5-sonnet-20241022\"\ndefault_config.source = \"Anthropic\"\n\n# Agent reasoning uses Biomni-R0 served via SGLang (OpenAI-compatible API)\nagent = A1(\n    llm=\"biomni\u002FBiomni-R0-32B-Preview\",\n    source=\"Custom\",\n    base_url=\"http:\u002F\u002Flocalhost:30000\u002Fv1\",\n    api_key=\"EMPTY\",\n)\n\nagent.go(\"Plan a CRISPR screen to identify genes regulating T cell exhaustion\")\n```\n\n## Biomni-Eval1\n\n**Biomni-Eval1** is a comprehensive evaluation benchmark for assessing biological reasoning capabilities across diverse tasks. It contains **433 instances** spanning **10 biological reasoning tasks**, from gene identification to disease diagnosis.\n\n**Tasks Included:**\n- GWAS causal gene identification (3 variants)\n- Lab bench Q&A (2 variants)\n- Patient gene detection\n- Screen gene retrieval\n- GWAS variant prioritization\n- Rare disease diagnosis\n- CRISPR delivery method selection\n\n**Resources:**\n- 🤗 Dataset: [biomni\u002FEval1](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fbiomni\u002FEval1)\n- 💻 Quick Start:\n```python\nfrom biomni.eval import BiomniEval1\n\nevaluator = BiomniEval1()\nscore = evaluator.evaluate('gwas_causal_gene_opentargets', 0, 'BRCA1')\n```\n\n\n## 📚 Know-How Library\n\nBiomni includes a **Know-How Library** — a curated collection of best practices, protocols, and troubleshooting guides for biomedical techniques. These documents are automatically retrieved by the A1 agent when relevant to provide domain expertise and practical knowledge.\n\n**Features:**\n- Automatic retrieval based on query relevance\n- Metadata tracking (authors, affiliations, licensing, commercial use)\n- Compatible with commercial mode (filters non-commercial content)\n\n### 📝 Contributing Know-How Documents\n\nWe're actively seeking community contributions to expand our Know-How Library! Share your expertise by contributing:\n\n- **Lab protocols** (cell culture, flow cytometry, western blotting, etc.)\n- **Analysis best practices** (NGS workflows, microscopy techniques, etc.)\n- **Troubleshooting guides** (common issues and solutions)\n- **Experimental design guidelines** (sample size, controls, validation)\n- **Domain-specific knowledge** (drug formulation, animal models, clinical trials, etc.)\n\nKnow-how documents should be practical, succinct, and include proper attribution. Use [this know-how](know_how\u002Fsingle_cell_annotation.md) as an example.\n\n**To contribute:** Create a markdown file following our template and submit a pull request.\n\n## 🤝 Contributing to Biomni\n\nBiomni is an open-science initiative that thrives on community contributions. We welcome:\n\n- **🔧 New Tools**: Specialized analysis functions and algorithms\n- **📊 Datasets**: Curated biomedical data and knowledge bases\n- **💻 Software**: Integration of existing biomedical software packages\n- **📋 Benchmarks**: Evaluation datasets and performance metrics\n- **📚 Know-How**: Best practices, protocols, and domain expertise\n- **📚 Misc**: Tutorials, examples, and use cases\n- **🔧 Update existing tools**: many current tools are not optimized - fix and replacements are welcome!\n\nCheck out this **[Contributing Guide](CONTRIBUTION.md)** on how to contribute to the Biomni ecosystem.\n\nIf you have particular tool\u002Fdatabase\u002Fsoftware in mind that you want to add, you can also submit to [this form](https:\u002F\u002Fforms.gle\u002Fnu2n1unzAYodTLVj6) and the biomni team will implement them.\n\n## 🔬 Call for Contributors: Help Build Biomni-E2\n\nBiomni-E1 only scratches the surface of what’s possible in the biomedical action space.\n\nNow, we’re building **Biomni-E2** — a next-generation environment developed **with and for the community**.\n\nWe believe that by collaboratively defining and curating a shared library of standard biomedical actions, we can accelerate science for everyone.\n\n**Join us in shaping the future of biomedical AI agent.**\n\n- **Contributors with significant impact** (e.g., 10+ significant & integrated tool contributions or equivalent) will be **invited as co-authors** on our upcoming paper in a top-tier journal or conference.\n- **All contributors** will be acknowledged in our publications.\n- More contributor perks...\n\nLet’s build it together.\n\n\n## Tutorials and Examples\n\n**[Biomni 101](.\u002Ftutorials\u002Fbiomni_101.ipynb)** - Basic concepts and first steps\n\nMore to come!\n\n## 🌐 Web Interface\n\nExperience Biomni through our no-code web interface at **[biomni.stanford.edu](https:\u002F\u002Fbiomni.stanford.edu)**.\n\n[![Watch the video](https:\u002F\u002Fimg.youtube.com\u002Fvi\u002FE0BRvl23hLs\u002Fmaxresdefault.jpg)](https:\u002F\u002Fyoutu.be\u002FE0BRvl23hLs)\n\n\n## Important Note\n- Security warning: Currently, Biomni executes LLM-generated code with full system privileges. If you want to use it in production, please use in isolated\u002Fsandboxed environments. The agent can access files, network, and system commands. Be careful with sensitive data or credentials.\n- This release was frozen as of April 15 2025, so it differs from the current web platform.\n- Biomni itself is Apache 2.0-licensed, but certain integrated tools, databases, or software may carry more restrictive commercial licenses. Review each component carefully before any commercial use.\n\n## Cite Us\n\n```\n@article{huang2025biomni,\n  title={Biomni: A General-Purpose Biomedical AI Agent},\n  author={Huang, Kexin and Zhang, Serena and Wang, Hanchen and Qu, Yuanhao and Lu, Yingzhou and Roohani, Yusuf and Li, Ryan and Qiu, Lin and Zhang, Junze and Di, Yin and others},\n  journal={bioRxiv},\n  pages={2025--05},\n  year={2025},\n  publisher={Cold Spring Harbor Laboratory}\n}\n```\n","Biomni是一个通用的生物医学AI代理，旨在自动执行广泛的研究任务，涵盖多种生物医学子领域。它通过整合先进的大型语言模型推理、增强检索规划和基于代码的执行来帮助科学家显著提高研究效率并生成可验证的假设。该项目使用Python编写，支持多种API接口以接入不同的AI模型服务。Biomni特别适合于需要处理复杂数据集和加速实验设计的生物医学研究场景中应用。",2,"2026-06-11 03:41:29","high_star"]