Registry / ai-ml / r2r
library3.6.6pypypi✓ verified 86d ago

R2R is a production-ready Retrieval-Augmented Generation (RAG) engine by SciPhi. It provides a scalable pipeline for document ingestion, chunking, embedding, and generation with support for various LLMs and vector stores. Current version 3.6.6 (PyPI), with active development and frequent releases.

pip install r2r
INSTALL
IMPORT
SIG · R2R
R
r2r
ai-mlpythonv3.6.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

R2RClient
from r2r import R2RClient
Primary client class for interacting with the R2R server.
R2RConfig
from r2r import R2RConfig
Configuration class for R2R pipeline.
R2RException
from r2r import R2RException
Exception class for R2R errors.

Initialize R2R client and ingest a file. Requires a running R2R server.

import os from r2r import R2RClient client = R2RClient(base_url=os.environ.get('R2R_BASE_URL', 'http://localhost:7272')) # Example: ingest a document response = client.ingest_files(['./README.md']) print(response)
Debug
Known issues
breakingVersion 3.x introduced significant API changes. The client API, configuration, and pipeline structure were redesigned. Code written for r2r<3.0.0 will not work with 3.6.6.
fix
Migrate to the new client and configuration patterns. See https://r2r-docs.sciphi.ai/migration-guide
affects: >=3.0.0
gotchaThe default base_url is http://localhost:7272. If not set, the client will try to connect to localhost, which may fail if the server is running elsewhere.
fix
Always set R2R_BASE_URL environment variable or pass base_url explicitly.
affects: >=3.0.0
gotchaR2R requires Python >=3.10 and <3.13. Python 3.13 is not supported.
fix
Ensure your Python version is 3.10-3.12.
affects: 3.6.6
deprecatedSome older ingestion methods (e.g., add_entry) are deprecated in favor of ingest_files and update_files.
fix
Use ingest_files for new documents and update_files for updates.
affects: >=3.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'R2RClient' from 'r2r'
Version mismatch or incorrect import path. In older versions (<3.0), R2RClient was located differently.
fix
Ensure you have installed r2r>=3.0.0 and use 'from r2r import R2RClient'.
r2r.exceptions.R2RException: Server error: 404 Not Found
The R2R server is not running or the base_url is incorrect.
fix
Start the R2R server (e.g., r2r serve) or check the R2R_BASE_URL environment variable.
RuntimeError: Python 3.13+ is not supported
R2R requires Python <3.13.
fix
Downgrade to Python 3.10, 3.11, or 3.12.
Upgrade
Version history
3.6.6latest on PyPI · released Aug 17, 2025
Audit
Dependencies
r2r[all]optionalExtra install for all optional dependencies (e.g., vector stores, LLM providers)
Agent activity
39 hits · last 30 days
node
34
Resources

No resource links recorded.

r2r — pip install r2r · libregistry