Memori: SQL Native Memory Layer for LLMs and AI Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Memori is an SQL Native Memory Layer designed for LLMs, AI Agents, and Multi-Agent Systems. It provides a robust and flexible solution for managing long-short term memory, integrating seamlessly with existing software and infrastructure. This project aims to enhance AI systems with persistent, structured memory capabilities, making them more intelligent and context-aware.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Memori, developed by MemoriLabs, is an SQL Native Memory Layer for LLMs, AI Agents, and Multi-Agent Systems. It serves as the memory fabric for enterprise AI, designed to plug into the software and infrastructure you already use. Memori is LLM, datastore, and framework agnostic, ensuring seamless integration into your existing architecture. It enhances AI interactions by providing structured, persistent memory, including vectorized memories, in-memory semantic search, and a third normal form schema for a knowledge graph.
Installation
Getting started with Memori is straightforward. You can install it using pip:
pip install memori
For an optimized environment, it's suggested to run the setup command once:
python -m memori setup
This prepares your environment for faster execution, though Memori will perform this step automatically on its first run if not done manually.
Examples
Here's a quickstart example demonstrating how to use Memori with OpenAI to manage conversational memory:
import os
import sqlite3
from memori import Memori
from openai import OpenAI
def get_sqlite_connection():
return sqlite3.connect("memori.db")
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
memori = Memori(conn=get_sqlite_connection).llm.register(client)
memori.attribution(entity_id="123456", process_id="test-ai-agent")
memori.config.storage.build()
response = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{"role": "user", "content": "My favorite color is blue."}
]
)
print(response.choices[0].message.content + "\n")
# Advanced Augmentation runs asynchronously to efficiently
# create memories. For this example, a short lived command
# line program, we need to wait for it to finish.
memori.augmentation.wait()
# Memori stored that your favorite color is blue in SQLite.
# Now reset everything so there's no prior context.
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
memori = Memori(conn=get_sqlite_connection).llm.register(client)
memori.attribution(entity_id="123456", process_id="test-ai-agent")
response = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{"role": "user", "content": "What's my favorite color?"}
]
)
print(response.choices[0].message.content + "\n")
You can also explore the stored memories directly using SQLite:
/bin/echo "select * from memori_conversation_message" | /usr/bin/sqlite3 memori.db
/bin/echo "select * from memori_entity_fact" | /usr/bin/sqlite3 memori.db
/bin/echo "select * from memori_process_attribute" | /usr/bin/sqlite3 memori.db
/bin/echo "select * from memori_knowledge_graph" | /usr/bin/sqlite3 memori.db
Why Use Memori?
Memori offers a powerful and flexible solution for integrating memory into your AI applications. Key advantages include:
- LLM and Datastore Agnostic: Supports all major foundational models (Anthropic, Bedrock, Gemini, Grok, OpenAI) and a wide range of databases (DB API 2.0, Django, SQLAlchemy, CockroachDB, MariaDB, MongoDB, MySQL, Neon, Oracle, PostgreSQL, SQLite, Supabase).
- Advanced Augmentation: Significant performance improvements with threaded, zero-latency memory extraction and enhancement, enriching memories with attributes, events, facts, people, preferences, relationships, rules, and skills.
- Structured Memory: Utilizes vectorized memories and in-memory semantic search for more accurate context, alongside a third normal form schema for a robust knowledge graph.
- Reduced Development Overhead: Simplifies integration with a single line of code for core memory functionalities.
- Attribution and Session Management: Provides mechanisms to attribute LLM interactions to specific entities and processes, and manage sessions for coherent conversational flows.
- Developer-Friendly: Advanced Augmentation is always free for developers, with a CLI for easy management and quota checking.
Links
- GitHub Repository: https://github.com/MemoriLabs/Memori
- Documentation: https://memorilabs.ai/docs
- Discord: https://discord.gg/abD4eGym6v
- Memori Cookbook: https://github.com/MemoriLabs/memori-cookbook
- Contributing Guidelines: https://github.com/MemoriLabs/Memori/blob/main/CONTRIBUTING.md
Related repositories
Similar repositories that may be relevant next.

A-MEM: Self-Evolving Memory for Coding Agents
August 17, 2026
A-MEM is an innovative self-evolving memory system designed for coding agents, organizing knowledge into a dynamic Zettelkasten-style graph. It allows memories to evolve and connect over time, enhancing an agent's ability to recall and utilize information effectively. This system offers both semantic and structural search capabilities for a richer knowledge base.

Agent Sandbox: Secure Local Development for AI Coding Agents
August 17, 2026
Agent Sandbox provides a robust and secure local development environment specifically designed for collaborating with AI coding agents. It ensures minimal filesystem access, configurable network egress policies, and secure secret injection, protecting your local machine from potentially risky agent operations. This project supports various AI agents and integrates seamlessly with both CLI and popular IDE devcontainer setups.
Agent-Memory: Persistent Memory for AI Coding Agents
August 16, 2026
Agent-Memory provides persistent memory for AI coding agents, ensuring they remember past interactions and learned patterns across sessions. Built on the iii engine, it eliminates the need for re-explaining context, significantly improving agent efficiency and reducing token usage. This solution integrates seamlessly with various agents, offering a robust memory management system.

code-session-memory: Automatic Vector Memory for AI Coding Sessions
August 15, 2026
code-session-memory provides automatic vector memory for various AI coding tools like OpenCode, Claude Code, Cursor, VS Code, Codex, and Gemini CLI. It indexes new messages into a vector database after each AI agent turn, enabling semantic search across all your past coding sessions. This tool ensures memory is shared across different platforms, enhancing developer productivity.
Source repository
Open the original repository on GitHub.
18 counted GitHub visits