Getting Started
Quick Install

Quick Install with pip

Install R2R swiftly using pip to get started with minimal setup. This method will get you set up with the default configuration:

pip install r2r
# Set up the default environment
export OPENAI_API_KEY=sk-...
# ... see below for more configuration info

Environment Setup

Below are examples of environment variables that can be configured to facilitate additional downstream functionality.

Language Model Providers

OpenAI API Key

Used by default for embedding and LLM completions:

export OPENAI_API_KEY=sk-...

Other Providers (Anthropic, Vertex AI, etc.)

Configure your environment for additional providers:

export VERTEX_API_KEY=...
# Add other provider keys as needed

VectorDB Providers

R2R Local VectorDB

R2R default selection - a simple SQLite-powered vector DB, optimal for lightweight workloads:

export LOCAL_DB_PATH=local.sqlite


Better for larger scale workloads that benefit from relational data:

export POSTGRES_USER=your_user
export POSTGRES_PASSWORD=your_password
export POSTGRES_HOST=your_host
export POSTGRES_PORT=your_port
export POSTGRES_DBNAME=your_db


Ideal for scalable vector search use cases:

export QDRANT_HOST=your_qdrant_host
export QDRANT_PORT=your_qdrant_port
export QDRANT_API_KEY=your_qdrant_api_key

Customization and Configuration

R2R provides extensive options to customize and configure your pipeline to suit specific needs. You can configure various providers through the config.json file and set environment variables as shown above to specify your vector database, embedding, language model, evaluation, and logging providers.