Give your AI agents human-like memory. The pluggable memory layer for AI applications.
Project description
Remina
All-in-One Agentic Memory Framework
Remina is the complete memory layer for AI agents and applications. Choose between vector memory for simple recall or graph memory for complex relationship reasoning — with pluggable infrastructure that fits your stack.
from remina import Memory, GraphMemory
# Vector Memory — flat facts with semantic search
memory = Memory()
memory.add("I'm John, I work at Google.", user_id="john")
results = memory.search("Where does John work?", user_id="john")
# Graph Memory — entities and relationships
graph = GraphMemory({"graph_store": {"uri": "bolt://localhost:7687"}})
graph.add("I'm John, I work at Google as a Python developer.", user_id="john")
# Extracts: John (person) → works_at → Google (company)
# John (person) → uses → Python (technology)
Why Remina
AI agents without persistent memory accumulate technical debt: lost context, repeated user friction, degraded personalization. Remina addresses this at the infrastructure layer with two memory paradigms:
| Vector Memory | Graph Memory | |
|---|---|---|
| Data Model | Flat facts + embeddings | Entities + Relationships |
| Storage | Qdrant, Pinecone, Chroma | Neo4j |
| Search | Semantic similarity | Graph traversal + semantic |
| Best For | Simple Q&A, preferences | Complex relationships, reasoning |
Core capabilities:
- Automatic fact extraction — LLM-powered extraction from conversations
- Entity & relationship extraction — Build knowledge graphs automatically
- Hybrid retrieval — Vector similarity + temporal decay + importance weighting
- Graph traversal — Find connected entities through relationships
- Deduplication — Similarity-based duplicate prevention
- Pluggable architecture — Swap storage, vectors, embeddings, and LLM providers
Installation
Python
pip install remina
# With specific providers
pip install remina[openai,qdrant,neo4j]
TypeScript / JavaScript
npm install remina-ts
import { Memory, GraphMemory } from "remina";
const memory = new Memory({
embedder: { provider: "openai" },
llm: { provider: "openai" },
});
await memory.add("I'm John, I work at Google.", "user_123");
const results = await memory.search("Where does John work?", "user_123");
Quick Start
Vector Memory
Best for simple fact storage and retrieval.
from remina import Memory
memory = Memory()
# Extract facts from conversation
memory.add(
messages=[
{"role": "user", "content": "I just moved to Seattle"},
{"role": "assistant", "content": "How do you like it?"},
{"role": "user", "content": "Great city, but the rain takes adjustment"}
],
user_id="user_123"
)
# Extracts: ["Lives in Seattle", "Likes Seattle", "Rain requires adjustment"]
# Semantic search
results = memory.search("Where does the user live?", user_id="user_123")
memory.close()
Graph Memory
Best for complex relationships and multi-hop reasoning.
# Start Neo4j first
docker compose up neo4j -d
from remina import GraphMemory
graph = GraphMemory({
"graph_store": {
"uri": "bolt://localhost:7687",
"password": "remina123",
},
"embedder": {"provider": "openai"},
"llm": {"provider": "openai"},
})
# Extract entities and relationships
result = graph.add(
messages="I'm Alex, I work at Google as a Python developer. Sarah is my colleague.",
user_id="user_123",
)
# Entities: Alex (person), Google (company), Python (technology), Sarah (person)
# Relationships: Alex works_at Google, Alex uses Python, Sarah works_at Google
# Search facts
results = graph.search("Where does Alex work?", user_id="user_123")
# → [{"fact": "Alex works at Google", "score": 0.95}]
# Get entity with all relationships
entity = graph.get_entity(entity_id="...")
# → {"entity": {...}, "relationships": [...]}
# Traverse the graph
related = graph.get_related(entity_id="alex_id", hops=2)
# → Connected entities within 2 hops
graph.close()
Async API
Both memory types support async operations:
from remina import AsyncMemory, AsyncGraphMemory
import asyncio
async def main():
# Vector memory
memory = AsyncMemory()
await memory.add("I prefer dark mode", user_id="user_123")
await memory.close()
# Graph memory
graph = AsyncGraphMemory({...})
await graph.add("I'm John from Google", user_id="user_123")
await graph.close()
asyncio.run(main())
Configuration
Vector Memory
config = {
"llm": {"provider": "openai", "config": {"model": "gpt-4o-mini"}},
"embedder": {"provider": "openai", "config": {"model": "text-embedding-3-small"}},
"vector_store": {"provider": "qdrant", "config": {"url": "http://localhost:6333"}},
"storage": {"provider": "postgres", "config": {"host": "localhost", "database": "remina"}},
"cache": {"redis_url": "redis://localhost:6379", "enabled": True},
}
memory = Memory(config)
Graph Memory
config = {
"graph_store": {
"provider": "neo4j",
"uri": "bolt://localhost:7687",
"user": "neo4j",
"password": "password",
},
"embedder": {"provider": "openai"},
"llm": {"provider": "openai"},
"max_entities_per_message": 10,
"max_relationships_per_message": 15,
}
graph = GraphMemory(config)
Supported Providers
| Category | Providers |
|---|---|
| LLMs | OpenAI, Anthropic, Gemini, Ollama |
| Embeddings | OpenAI, Gemini, Cohere, Ollama, HuggingFace |
| Vector Stores | Pinecone, Qdrant, Chroma, pgvector |
| Graph Stores | Neo4j |
| Storage | PostgreSQL, MongoDB, SQLite |
| Cache | Redis |
Docker Setup
# docker-compose.yml
services:
neo4j:
image: neo4j:5-community
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: neo4j/remina123
qdrant:
image: qdrant/qdrant
ports:
- "6333:6333"
redis:
image: redis:7-alpine
ports:
- "6379:6379"
postgres:
image: postgres:16-alpine
environment:
POSTGRES_PASSWORD: remina
docker compose up -d
Documentation
Roadmap
✅ v0.1 — Core Memory
- Vector memory with fact extraction
- Hybrid retrieval (semantic + importance)
- Pluggable providers
- Redis caching
✅ v0.2 — Graph Memory
- Knowledge graph with entities & relationships
- Neo4j integration
- Graph traversal
- Entity/relationship extraction
✅ v0.3 — TypeScript SDK
- Full TypeScript/JavaScript SDK
- All providers ported (OpenAI, Gemini, Neo4j, Qdrant, Pinecone, etc.)
- Redis caching
- Complete type definitions
📋 v0.4 — Intelligence & Expansion
- Contradiction detection
- Memory consolidation
- FalkorDB graph store
- Weaviate, Milvus vector stores
- REST API
Contributing
git clone https://github.com/bikidsx/remina
cd remina
pip install -e ".[dev]"
pytest
See CONTRIBUTING.md for details.
License
Apache 2.0
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 remina-0.1.7.tar.gz.
File metadata
- Download URL: remina-0.1.7.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Deepin","version":"25","id":"crimson","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82383a4425a7911556f1fc544e8cf1677a617ac62c1d28682b3af917bc054886
|
|
| MD5 |
083311e66f143c1c09f43afd3eaf3a3f
|
|
| BLAKE2b-256 |
54e8045bef8494a064cb4ba6c9eaf3908726b3354fe448475143f61effaaf5dd
|
File details
Details for the file remina-0.1.7-py3-none-any.whl.
File metadata
- Download URL: remina-0.1.7-py3-none-any.whl
- Upload date:
- Size: 69.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Deepin","version":"25","id":"crimson","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3823e5449040c5e2395eb0ef25d42ce20c8ebf68e54e9deb16a67740165dc9a
|
|
| MD5 |
3c4eb6497430aa5aee31e5c10523591d
|
|
| BLAKE2b-256 |
308487e1d712c29caa8ab8d9490080cebfa0a6e10c78242023313b581b6c34e2
|