Configuration

Environment variables and API key setup for RA-OS

Configuration

RA-H OS uses environment variables for configuration. For the current setup flow, follow the repo README first and use this page as a quick reference.

OpenAI

OPENAI_API_KEY=sk-...

Used for embeddings, semantic retrieval, and AI-assisted graph operations.

Optional Key

Anthropic

ANTHROPIC_API_KEY=sk-ant-...

Useful if your local setup or future workflows expect Anthropic-compatible runtime paths.

Optional Settings

Database Path

Override the default database location:

DATABASE_PATH=/path/to/your/rah.sqlite

Default: ~/Library/Application Support/RA-H/rah.sqlite

Embedding Model

Choose which model to use for embeddings:

EMBEDDING_MODEL=text-embedding-3-small

Options:

  • text-embedding-3-small (default, faster, cheaper)
  • text-embedding-3-large (more accurate, slower)

Example .env.local

# AI Providers
OPENAI_API_KEY=sk-your-openai-key
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key

# Optional: Custom settings
DATABASE_PATH=~/Documents/my-knowledge-graph/rah.sqlite
EMBEDDING_MODEL=text-embedding-3-small

Verifying Configuration

After setting up your environment variables:

  1. Restart the development server
  2. Open the app in your browser
  3. Go to Settings (gear icon)
  4. Check that your API keys are detected

If keys are missing, you'll see warnings in the Settings panel.

Security Notes

  • Never commit .env.local — It's already in .gitignore
  • Use environment variables in production — Don't hardcode keys
  • Rotate keys periodically — Especially if you suspect they've been exposed

Next Steps