An AI-powered assistant for spike sorting and neural data analysis
SpikeAgent is a web-based AI assistant that streamlines the spike sorting pipeline — from raw neural recordings to curated spike trains. It integrates with SpikeInterface and leverages large language models (OpenAI, Anthropic, Google Gemini) to automate spike sorting, quality control, and data curation.
git clone https://github.com/arnaumarin/SpikeAgent.git
cd SpikeAgent
conda create -n spikeagent python=3.11 -y
conda activate spikeagent
pip install -e .# Pull the image
docker pull ghcr.io/arnaumarin/spikeagent-cpu:latest
# Run (mount your data directories as needed)
docker run --rm -p 8501:8501 --env-file .env \
-v /path/to/your/data:/path/to/your/data \
ghcr.io/arnaumarin/spikeagent-cpu:latestFor GPU support (required for Kilosort4):
docker build -f dockerfiles/Dockerfile.gpu -t spikeagent:gpu .
docker run --rm --gpus all -p 8501:8501 --env-file .env spikeagent:gpuCreate a .env file in the project root with at least one key:
OPENAI_API_KEY=sk-...
# and/or
ANTHROPIC_API_KEY=sk-ant-...
# and/or
GOOGLE_API_KEY=...conda activate spikeagent
spikeagentThe app will open in your browser at http://localhost:8501.
The tutorials/ directory contains Jupyter notebooks demonstrating key workflows:
vlm_noise_rejection_tutorial.ipynb— AI-assisted spike curation using vision-language models (classifying units, quality control via waveforms and autocorrelograms)vlm_merge_simple_tutorial.ipynb— Automated merge analysis using crosscorrelograms, amplitude distributions, and PCA clustering
SpikeAgent can be tested with publicly available datasets:
If you use SpikeAgent in your work, please cite:
Lin, Z., Marin-Llobet, A., Baek, J., He, Y., Lee, J., Wang, W., ... & Liu, J. (2025). Spike sorting AI agent. Preprint at bioRxiv. https://doi.org/10.1101/2025.02.11.637754
Buccino, A. P., Hurwitz, C. L., Garcia, S., Magland, J., Siegle, J. H., Hurwitz, R., & Hennig, M. H. (2020). SpikeInterface, a unified framework for spike sorting. eLife, 9, e61834.
MIT
