What is Memori?
Memori is an open-source AI agent memory system that gives your applications structured, persistent memory. It automatically captures conversations, extracts meaningful facts, and makes them searchable — all stored in your own database on your own infrastructure.
Want a zero-setup option? The hosted platform at app.memorilabs.ai offers 100 memories free without an API key, and 5,000/month with a free API key.
Memori uses Advanced Augmentation to automatically enhance your memories with facts, preferences, skills, and relationships. It runs in the background with zero added latency to your AI processes.
Why Open Source?
Database Freedom
Use PostgreSQL, MySQL, SQLite, Oracle, or MongoDB — whatever fits your stack. Memori adapts to your database, not the other way around.
Full Data Ownership
Your data stays in your database, on your infrastructure. Full compliance and regulatory control with no third-party storage.
LLM Provider Support
OpenAI, Anthropic, Gemini, Bedrock, Grok (xAI) — all modes including streamed, unstreamed, sync, and async. Plus LangChain and Pydantic AI.
Semantic Recall
Background AI processing extracts facts, preferences, and relationships from your conversations. Recall any memory later with semantic search.
Quick Example
Get started with a database connection and your favorite LLM:
- Register any supported LLM client with a single call
- Track conversations by entity and process
- Conversations automatically persisted and recalled
- Full data ownership — everything stored in your database
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from memori import Memori
from openai import OpenAI
engine = create_engine("sqlite:///memori.db")
SessionLocal = sessionmaker(bind=engine)
client = OpenAI()
mem = Memori(conn=SessionLocal).llm.register(client)
# Track conversations by user and process
mem.attribution(entity_id="user_123", process_id="support_agent")
# All conversations automatically persisted and recalled
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "What color is Mars?"}]
)
# Recall facts later using semantic search
facts = mem.recall("Mars color")
Core Concepts
| Concept | Description | Example |
|---|---|---|
| Entity | Person, place, or thing (like a user) | entity_id="user_123" |
| Process | Your agent, LLM interaction, or program | process_id="support_agent" |
| Session | Groups LLM interactions together | Auto-generated UUID, manually manageable |
| Augmentation | Background AI enhancement of memories | Extracts facts, preferences, skills, etc. |
| Recall | Semantic search across stored facts | mem.recall("Mars color", limit=5) |
Architecture Overview
Guides
Resources
Quick Start
Get started with Memori in minutes. Learn the basics and start building your AI-powered applications.