Complete installation instructions for RMAgent, an AI-powered genealogy agent for RootsMagic databases.
- System Requirements
- Prerequisites
- Installation Steps
- Configuration
- Verification
- Troubleshooting
- Platform-Specific Instructions
- Operating System: macOS 10.15+, Linux (Ubuntu 20.04+), Windows 10+ (WSL2)
- Python: 3.11 or higher
- Memory: 2 GB RAM minimum (4 GB recommended)
- Disk Space: 500 MB for installation + space for database files
- Network: Internet connection for LLM API calls
- Python 3.11+
- pip or uv (package manager)
- Git (for installation from source)
- SQLite 3.x (usually pre-installed)
- RootsMagic 11 database (.rmtree file)
You need an API key for at least one provider:
- Anthropic Claude: https://console.anthropic.com/
- OpenAI GPT: https://platform.openai.com/
- Ollama (Local): https://ollama.com/ (no API key needed)
# Using Homebrew
brew install python@3.11
# Verify installation
python3 --version # Should show 3.11.x or higher# Add deadsnakes PPA (if needed)
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
# Install Python 3.11
sudo apt install python3.11 python3.11-venv python3.11-dev
# Verify installation
python3.11 --version# Install WSL2 first (if not already installed)
wsl --install
# Then follow Linux instructions abovecurl -LsSf https://astral.sh/uv/install.sh | sh
# Restart terminal or source shell config
source ~/.bashrc # or ~/.zshrc
# Verify installation
uv --version# Upgrade pip
python3 -m pip install --upgrade pip# macOS
brew install git
# Linux
sudo apt install git
# Verify
git --versionThis is the recommended method for development and active use.
# 1. Clone the repository
git clone https://github.com/miams/rmagent.git
cd rmagent
# 2. Install dependencies
uv sync
# This creates a virtual environment in .venv/ and installs all dependencies
# 3. Verify installation
uv run rmagent --version# 1. Clone the repository
git clone https://github.com/miams/rmagent.git
cd rmagent
# 2. Create virtual environment
python3 -m venv .venv
# 3. Activate virtual environment
source .venv/bin/activate # macOS/Linux
# OR
.venv\Scripts\activate # Windows
# 4. Install dependencies
pip install -e .
# 5. Verify installation
rmagent --versionFor contributors and developers:
# With uv
uv sync --extra dev
# With pip
pip install -e ".[dev]"This installs additional tools:
- pytest, pytest-cov, pytest-mock (testing)
- black, ruff, mypy (code quality)
- Additional development utilities
# Copy example configuration
cp config/.env.example config/.envOpen config/.env in your text editor and configure:
# Database path (required)
RM_DATABASE_PATH=data/your-database.rmtree
# SQLite extension path (usually default is fine)
SQLITE_ICU_EXTENSION=./sqlite-extension/icu.dylibChoose one provider and configure:
DEFAULT_LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-xxxxx # Get from https://console.anthropic.com/
ANTHROPIC_MODEL=claude-sonnet-4-5-20250929 # or claude-3-5-sonnet-20241022
LLM_TEMPERATURE=0.2
LLM_MAX_TOKENS=3000DEFAULT_LLM_PROVIDER=openai
OPENAI_API_KEY=sk-proj-xxxxx # Get from https://platform.openai.com/
OPENAI_MODEL=gpt-4o-mini # or gpt-5-chat-latest
LLM_TEMPERATURE=0.2
LLM_MAX_TOKENS=3000DEFAULT_LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.1 # or other model
LLM_TEMPERATURE=0.2
LLM_MAX_TOKENS=3000# Output directories
OUTPUT_DIR=output
EXPORT_DIR=exports
# Privacy settings
RESPECT_PRIVATE_FLAG=true
APPLY_110_YEAR_RULE=true
# Citation style
DEFAULT_CITATION_STYLE=footnote # or parenthetical, narrative# Logging levels: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO
# Log file location
LOG_FILE=rmtool.log
# LLM debugging (JSON traces)
LLM_DEBUG_LOG_FILE=logs/llm_debug.jsonl- Visit https://console.anthropic.com/
- Sign up or log in
- Navigate to "API Keys"
- Click "Create Key"
- Copy the key (starts with
sk-ant-) - Paste into
config/.envasANTHROPIC_API_KEY
Pricing: ~$3/million input tokens, ~$15/million output tokens
- Visit https://platform.openai.com/
- Sign up or log in
- Navigate to "API Keys"
- Click "Create new secret key"
- Copy the key (starts with
sk-proj-orsk-) - Paste into
config/.envasOPENAI_API_KEY
Pricing: Varies by model (~$0.15-$2.50/million tokens for GPT-4o)
- Install Ollama: https://ollama.com/download
- Pull a model:
ollama pull llama3.1
- Start Ollama server:
ollama serve
- Verify it's running:
curl http://localhost:11434/api/tags
Pricing: Free (runs locally)
# Create data directory
mkdir -p data
# Copy your RootsMagic database
cp /path/to/your/database.rmtree data/
# Update config/.env with correct path
# RM_DATABASE_PATH=data/your-database.rmtree# Query a person (replace 1 with a valid PersonID)
uv run rmagent person 1
# Should display person information without errors# Run quality checks (no LLM required)
uv run rmagent quality --severity critical
# Should show database statistics and any critical issues# Test biography generation
uv run rmagent bio 1 --length short
# Should generate AI-powered biography# Run all tests
uv run pytest
# Run with coverage report
uv run pytest --cov=rmagent --cov-report=html
# Open htmlcov/index.html to view coverage======================== 279 passed in 25.43s =========================
Coverage report:
rmagent/agent/llm_provider.py 90%
rmagent/rmlib/quality.py 91%
rmagent/rmlib/database.py 76%
... (more modules)
Error:
Error: Could not load ICU extension
Solution:
- macOS: Extension included at
sqlite-extension/icu.dylib(should work by default) - Linux: You may need to compile the extension:
sudo apt install libsqlite3-dev libicu-dev # See sqlite-extension/README.md for compilation instructions - Windows/WSL2: Follow Linux instructions
Error:
python_requires = ">=3.11"
Solution:
# Install Python 3.11+
# macOS
brew install python@3.11
# Linux
sudo apt install python3.11Error:
AuthenticationError: Invalid API key
Solution:
- Verify the API key is correct (no extra spaces)
- Check the key hasn't expired
- Verify your account has billing enabled (Anthropic/OpenAI)
- Test the key directly:
# Anthropic curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01"
Error:
FileNotFoundError: data/Iiams.rmtree not found
Solution:
- Check the database file exists:
ls -lh data/*.rmtree - Verify the path in
config/.envmatches the actual file location - Use absolute paths if relative paths don't work:
RM_DATABASE_PATH=/full/path/to/database.rmtree
Error:
ConnectionError: Could not connect to Ollama at http://localhost:11434
Solution:
- Verify Ollama is running:
ollama serve
- Check the model is pulled:
ollama list
- Test connection:
curl http://localhost:11434/api/tags
Error:
FAILED tests/unit/test_quality.py::test_rule_5_1_date_validation
Solution:
# Clear pytest cache
rm -rf .pytest_cache
# Run tests with verbose output
uv run pytest -v
# Run specific test file
uv run pytest tests/unit/test_quality.py -vError:
ModuleNotFoundError: No module named 'rmagent'
Solution:
# Reinstall in development mode
uv sync
# Or with pip
pip install -e .
# Verify installation
python -c "import rmagent; print(rmagent.__version__)"-
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install Python 3.11:
brew install python@3.11
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Follow standard installation steps above
SQLite Extension: Included at sqlite-extension/icu.dylib (works by default)
-
Update packages:
sudo apt update && sudo apt upgrade -y -
Install Python 3.11:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.11 python3.11-venv python3.11-dev
-
Install build tools (for SQLite extension):
sudo apt install build-essential libsqlite3-dev libicu-dev
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Follow standard installation steps
SQLite Extension: May need to compile (see sqlite-extension/README.md)
-
Install WSL2:
wsl --install -
Restart computer
-
Open WSL2 terminal (Ubuntu):
wsl
-
Follow Linux installation instructions above
Note: WSL2 is strongly recommended over native Windows installation due to better SQLite extension support.
Once installation is complete:
- Read the User Guide:
docs/USER_GUIDE.mdordocs/RMAgent_User_Guide.pdf - Try the Tutorial:
docs/TUTORIAL.md(getting started walkthrough) - Explore Examples:
EXAMPLES.md(real-world usage scenarios) - Check Configuration:
CONFIGURATION.md(advanced settings)
- Documentation: https://github.com/miams/rmagent/tree/main/docs
- Issues: https://github.com/miams/rmagent/issues
- FAQ:
FAQ.md(common questions) - User Guide:
docs/USER_GUIDE.md
To remove RMAgent:
# With uv
cd rmagent
rm -rf .venv
# With pip
pip uninstall rmagent
# Remove configuration (optional)
rm config/.env
# Remove the entire directory
cd ..
rm -rf rmagentInstallation complete! You're now ready to use RMAgent for genealogy research and biography generation.
See docs/USER_GUIDE.md for comprehensive usage instructions.