Du-RAG
Durable RAG - a persistent memory layer for AI agents built on retrieval-augmented generation.
pip install durag
from durag import Memory
m = Memory()
m.add("Alice loves Python and open source", user_id="alice")
m.add("Alice built Du-RAG", user_id="alice")
history = m.get_all(filters={"user_id": "alice"})
print(history)
Why Du-RAG?
Du-RAG is the fastest memory library for AI agents. Unlike other libraries that block for 1-2 seconds calling an LLM on every write, Du-RAG stores memories instantly and lets you consolidate in the background.
# Fast path - returns in ~50ms, no LLM call
m.add("Alice switched to Enterprise plan", user_id="alice")
# Search works immediately on raw text
results = m.search("What plan is Alice on?", user_id="alice")
# Consolidate later - batch-extract facts with one LLM call
m.consolidate(user_id="alice")
API Keys
Du-RAG requires a provider API key. Set the env var for your preferred provider before first use:
| Provider | Env Var | Used For |
|---|---|---|
| OpenAI (default) | OPENAI_API_KEY |
Embeddings + LLM |
| Anthropic | ANTHROPIC_API_KEY |
LLM |
| Google Gemini | GOOGLE_API_KEY |
Embeddings + LLM |
| DeepSeek | DEEPSEEK_API_KEY |
LLM |
| Together AI | TOGETHER_API_KEY |
Embeddings + LLM |
| Groq | GROQ_API_KEY |
LLM |
| MiniMax | MINIMAX_API_KEY |
LLM |
| Sarvam AI | SARVAM_API_KEY |
LLM |
| vLLM | VLLM_API_KEY |
LLM |
export OPENAI_API_KEY="sk-..."
Features
- Fast writes - add() returns in ~50ms (no blocking LLM call)
- Async consolidation - batch-extract facts with consolidate() when idle
- Persistent memory across conversations - agents remember what they learn
- Semantic search via vector embeddings - find the right context fast
- Multiple backends - OpenAI, Anthropic, Gemini, DeepSeek, Ollama, vLLM, and more
- Vector stores - Qdrant (default), FAISS, Chroma, Pinecone, Weaviate, and others
License
Apache 2.0
Metadata
Release files for durag 2.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| durag-2.1.12.tar.gz | 197.2 kB | Without provenance | Details for durag-2.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| durag-2.1.12-py3-none-any.whl | Python 3 | none | any | Details for durag-2.1.12-py3-none-any.whl |
Total release size: 480.1 kB
Release files / durag-2.1.12.tar.gz
| Download URL | durag-2.1.12.tar.gz |
|---|---|
| Size | 197.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80ef1c17501c2d75b9f2571fcd5b740796c618a1d197bbf3d29e2b7fdce00e9d
|
|
BLAKE2b-256 checksum How to use checksums |
12a57040ccc279531e9b2aced2578e395a31233f8b32cb6b109c68d08e961cc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / durag-2.1.12-py3-none-any.whl
| Download URL | durag-2.1.12-py3-none-any.whl |
|---|---|
| Size | 282.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
777c393c3bc96821126b0a742f5e9531e97015c9df184cd867d7aac7d6820d04
|
|
BLAKE2b-256 checksum How to use checksums |
b6f8bb53692dd0eb66104cd85a5479712db0e4213a196b1cdc601a8bc3d2185f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for durag 2.1.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.