Skip to main content

Give your AI agents human-like memory. All-in-One Agentic Memory Framework

Project description

Remina Logo

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

pip install remina

# With specific providers
pip install remina[openai,qdrant,neo4j]

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

📚 Full 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 — Intelligence

  • Contradiction detection
  • Memory consolidation
  • Temporal reasoning (valid_at/invalid_at)
  • Community detection

📋 v0.4 — Expansion

  • FalkorDB graph store
  • Weaviate, Milvus vector stores
  • TypeScript SDK
  • REST API

Contributing

git clone https://github.com/AgentrDev/remina
cd remina
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for details.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remina-0.1.6.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

remina-0.1.6-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

Details for the file remina-0.1.6.tar.gz.

File metadata

  • Download URL: remina-0.1.6.tar.gz
  • Upload date:
  • Size: 46.3 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

Hashes for remina-0.1.6.tar.gz
Algorithm Hash digest
SHA256 03cb6b51855b8a49fadda780ce67bc237e0955b61b418e9f6e3c8e8751ad8352
MD5 6868689e99c975e118ae36144fdf6360
BLAKE2b-256 85f78a2e7e44cd7576b715a00a4014729f6b9be587164d807a76fdc4dc70ba68

See more details on using hashes here.

File details

Details for the file remina-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: remina-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 61.1 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

Hashes for remina-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7bd9cc208aec7cdeefe18af591531250d109a548996fe6a34e3b99c5c34e60ec
MD5 5972ffb1249f87eda046c5f7011f443a
BLAKE2b-256 04c0d99f389303060fa4dca580e0263b62aa039dab13fa6b30e99b1770d2ec18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page