Skip to content

Open Science Assistant (OSA)

An extensible AI assistant platform for researchers working with open science tools. Built with LangGraph/LangChain and FastAPI.

Overview

OSA provides domain-specific AI assistants for open science tools such as HED, BIDS, EEGLAB, and FieldTrip (see Specialist Assistants below for the full list) with:

  • Modular tool system for document retrieval, validation, and code execution
  • Multi-source knowledge bases from GitHub, OpenALEX, Discourse forums, mailing lists
  • Extensible architecture for adding new assistants and tools
  • Production-ready observability via LangFuse

Design Philosophy

  • Precision over features: Researchers need accurate, citation-backed answers
  • Simple infrastructure: Lab server deployment, no complex scaling
  • Extensible tools: General tool system that communities can adapt
  • Domain expertise: Deep knowledge of specific tools, not broad generalist

Target Users

  • Researchers learning HED annotations, BIDS formatting, EEGLAB analysis, FieldTrip pipelines, or any of the other supported tools
  • Lab members needing quick, accurate answers from documentation
  • Developers integrating these tools who need API/usage guidance

Quick Start

As a User (CLI)

# Install the CLI (lightweight, ~7 dependencies)
pip install open-science-assistant

# Set up your API key
osa init

# Ask a question
osa ask -a hed "How do I annotate a button press?"

# Interactive chat
osa chat -a hed

You will need your own API key: Anthropic at platform.claude.com/settings/keys (recommended), or OpenRouter at openrouter.ai/keys. osa init reads the provider off the key's prefix.

As a Developer

# Clone the repository
git clone https://github.com/OpenScience-Collective/osa
cd osa

# Install all dependencies (including server)
uv sync

# Run development server
uv run uvicorn src.api.main:app --reload --port 38528

# Run tests
uv run pytest tests/ -v

Specialist Assistants

Assistant Domain Knowledge Sources
HED Assistant Hierarchical Event Descriptors hed-standard repos, hedtags.org
BIDS Assistant Brain Imaging Data Structure bids-standard repos, Neurostars
EEGLAB Assistant EEG analysis toolbox SCCN wiki, mailing lists
FieldTrip Assistant MEG/EEG/iEEG analysis toolbox FieldTrip website, GitHub
MNE-Python Assistant M/EEG analysis toolbox mne.tools, GitHub, Discourse forum
NEMAR Assistant NeuroElectroMagnetic Archive (EEG/MEG/iEEG datasets) NEMAR's Model Context Protocol (MCP) server
MetaBCI Assistant Brain-Computer Interface (BCI) research platform MetaBCI docs, GitHub
OpenNeuroPET Assistant Open, reproducible Positron Emission Tomography (PET) tools OpenNeuroPET wiki, GitHub

Documentation

External API Integrations

OSA integrates with existing validator and tool APIs rather than hosting validation engines locally:

Service API Endpoint Integration
HED Validation https://hedtools.org/hed String, sidecar, spreadsheet validation
BIDS Validator https://bids-validator.github.io Dataset structure validation
OpenALEX https://api.openalex.org Academic paper search
GitHub API https://api.github.com Issues, PRs, discussions

License

MIT