Skip to content

Getting Started

BMLibrarian is a sophisticated platform for analyzing biomedical literature using artificial intelligence. The system combines multiple specialized agents, a desktop interface, and command-line tools to streamline research workflows.

Core Components

The platform offers several key features:

  • Multi-Agent System - Specialized AI agents for different research tasks
  • Qt Desktop GUI - Modern graphical interface for research
  • Command-Line Interface - Powerful CLI for automation and scripting
  • Fact-Checking System - Verify biomedical statements against literature
  • Local Processing - All AI processing occurs locally through Ollama

Essential Requirements

Before setup, you'll need:

  • Python 3.12+
  • PostgreSQL 12+ with extensions:
    • pgvector
    • pg_trgm
    • uuid-ossp
  • Ollama for running local language models

Required AI Models

Download these models for optimal performance:

ollama pull gpt-oss:20b        # Complex analysis tasks
ollama pull medgemma4B_it_q8   # Faster processing

Installation Process

1. Clone the Repository

git clone https://github.com/hherb/bmlibrarian
cd bmlibrarian

2. Install Dependencies

uv sync

3. Configure Environment

Create a .env file with your database and Ollama connection details:

# Database Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=knowledgebase
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_password

# Optional: PDF file storage
PDF_BASE_DIR=~/knowledgebase/pdf

# Optional: Ollama server (if not localhost:11434)
OLLAMA_BASE_URL=http://localhost:11434

4. Initialize Database

uv run python initial_setup_and_download.py test.env

The setup automatically creates a configuration directory at ~/.bmlibrarian/.

Getting Started with Research

Launch the Qt desktop application:

uv run python bmlibrarian_qt.py

The Research tab guides you through:

  1. Entering your research question
  2. Query generation from natural language
  3. Document searching
  4. Relevance scoring
  5. Citation extraction
  6. Report synthesis

Quick Reference

Tool Command Purpose
Qt GUI uv run python bmlibrarian_qt.py Main desktop application
Research GUI uv run python bmlibrarian_research_gui.py Research workflow
CLI uv run python bmlibrarian_cli.py Command-line research
Fact-Checker uv run python fact_checker_cli.py Statement verification
Config GUI uv run python bmlibrarian_config_gui.py Settings management

Next Steps