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 (HED, BIDS, EEGLAB, FieldTrip) 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, or FieldTrip pipelines
- 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
Get an OpenRouter API key at openrouter.ai/keys.
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 |
Documentation¶
- Getting Started - Installation and setup
- Architecture - System design and diagrams
- Community Registry - YAML-driven assistant configuration
- Adding a Community - Add a new assistant in 5 minutes
- Schema Reference - Full YAML config reference
- Extensions - Python plugins and MCP servers
- CLI Reference - Command-line interface
- API Reference - REST API documentation
- Knowledge Sync - Syncing GitHub, papers, and forums
- Widget Deployment - Embed the chat widget
- Tools - Available tools
- Development - Contributing to OSA
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