| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is the official implementation for SpatialAgent: An autonomous AI agent for spatial biology.
Contact wang.hanchen@gene.com or hanchenw@stanford.edu if you have any questions.
SpatialAgent is an autonomous AI agent for spatial transcriptomics, single-cell RNA-seq, and molecular biology. It integrates large language models with dynamic tool execution and adaptive reasoning, spanning the entire research workflow from experimental design to multimodal data analysis and hypothesis generation.
Key features:
# Setup environment
./setup_env.sh # Creates 'spatial_agent' environment, python 3.11
conda activate spatial_agent
# Set API keys
export ANTHROPIC_API_KEY=your_key # For Claude models
export OPENAI_API_KEY=your_key # For GPT models
export GOOGLE_API_KEY=your_key # For Gemini models (optional)See main.ipynb for a quick overview.
from spatialagent.agent import SpatialAgent, make_llm
llm = make_llm("claude-sonnet-4-5-20250929")
agent = SpatialAgent(llm=llm, save_path="./experiments/demo/")
result = agent.run(
"Find mouse brain cortex datasets from CZI and analyze neuronal cell types",
config={"thread_id": "analysis_1"}
)SpatialAgent/ ├── spatialagent/ │ ├── agent/ # Agent implementation │ ├── skill/ # Skill templates (17 guided workflows) │ ├── tool/ # Tool implementations (72 tools) │ └── hooks.py # Event hooks ├── data/ # Reference databases (CellMarker, PanglaoDB, CZI catalog) ├── resource/ # Dependencies and external packages ├── notebooks/ # Example notebooks ├── docs/ # Documentation ├── main.ipynb # Quick start notebook └── setup_env.sh # Environment setup
@article{spatialagent,
author = {Hanchen Wang and Yichun He and Coelho Paula and Matthew Bucci and Abbas Nazir and other},
title = {SpatialAgent: An autonomous AI agent for spatial biology},
doi = {10.1101/2025.04.01.646459},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2025/04/01/2024.04.01.646459},
journal = {bioRxiv},
year = {2025},
}MIT License. See LICENSE.txt.
| Back | FazBrowse Home | New Git URL |