Persistent memory infrastructure for AI agents
Project description
Remembr Python SDK
remembr is the official Python SDK for Remembr. It gives Python applications a typed async client for sessions, memory storage, search, checkpoints, export, and forget workflows.
Install
pip install remembr
EMBEDDING_PROVIDER=sentence_transformers is the default for bare installs, so you do not need a JINA_API_KEY just to get started locally.
Quick Start
import asyncio
from remembr import RemembrClient
async def main() -> None:
async with RemembrClient(
api_key="your-api-key",
base_url="http://localhost:8000/api/v1",
) as client:
session = await client.create_session(
metadata={"user": "demo", "context": "support"}
)
await client.store(
content="User prefers Friday billing summaries.",
role="user",
session_id=session.session_id,
tags=["kind:preference", "topic:billing"],
)
results = await client.search(
query="When should billing summaries be sent?",
session_id=session.session_id,
limit=5,
search_mode="hybrid",
weights={"semantic": 0.6, "keyword": 0.3, "recency": 0.1},
)
for memory in results.results:
print(memory.content, memory.score)
asyncio.run(main())
Local Server Setup
git clone https://github.com/ai-emart/remembr.git
cd remembr
cp .env.example .env
python -c "import secrets; print(secrets.token_hex(32))"
# paste the generated value into SECRET_KEY in .env
bash scripts/docker-init.sh
curl http://localhost:8000/health
The Docker bootstrap flow works without Jina. For a plain Python install outside Docker, the default embedding backend is sentence_transformers.
Configuration
from remembr import RemembrClient
client = RemembrClient(
api_key="your-api-key",
base_url="http://localhost:8000/api/v1",
timeout=30.0,
)
Environment Variables
| Variable | Purpose | Required | Default |
|---|---|---|---|
REMEMBR_API_KEY |
Default API key for the client | No | None |
REMEMBR_BASE_URL |
Default API base URL | No | http://localhost:8000/api/v1 |
EMBEDDING_PROVIDER |
Active embedding backend for self-hosted deployments | No | sentence_transformers |
SENTENCE_TRANSFORMERS_MODEL |
Local sentence-transformers model | No | all-MiniLM-L6-v2 |
JINA_API_KEY |
Jina API key when using the Jina backend | No | None |
OLLAMA_BASE_URL |
Ollama base URL when using the Ollama backend | No | http://localhost:11434 |
OPENAI_API_KEY |
OpenAI API key when using the OpenAI backend | No | None |
Docs
- Full docs: https://github.com/ai-emart/remembr/tree/main/docs
- Quick start: https://github.com/ai-emart/remembr#quick-start
- API reference: https://github.com/ai-emart/remembr/blob/main/docs/api-reference.md
- Framework adapters: https://github.com/ai-emart/remembr/tree/main/adapters
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remembr-0.2.0.tar.gz.
File metadata
- Download URL: remembr-0.2.0.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5397487c3023a4e894d9d3403b2785bf97838c91d3285461e0f04ff62a1a38e8
|
|
| MD5 |
aabd133065ed9d995f00022ae42a54b5
|
|
| BLAKE2b-256 |
a0d417dd1b48d595b6b2e8fddaf5fb3f23d8ec9c6195c050a40ce08e405262de
|
File details
Details for the file remembr-0.2.0-py3-none-any.whl.
File metadata
- Download URL: remembr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa3c8417aa13057d71500142825a2e3d724e4ad011e2cd5ea7835ad7f17c74ee
|
|
| MD5 |
b225db74a05234eb1bbeea1fff505a7c
|
|
| BLAKE2b-256 |
cbb62d73ed4eff00c0bcea7949a2c22db3b06e89a4d327bd6f0776cf6ef60192
|