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.

Llama Cloud Services: Knowledge Agents and Management in the Cloud
July 3, 2026
Llama Cloud Services offers tools for building knowledge agents and managing data in the cloud. It provides robust capabilities for parsing various document types, including PDF, DOCX, and PPTX, into structured formats. Users should note that this repository is deprecated, with migration recommended to the new `llama-cloud` packages for continued support and improved performance.
OpenWebAgent: An Open Toolkit for LLM- and LMM-based Web Agents
July 2, 2026
OpenWebAgent is an open toolkit designed to empower model-based web agents, streamlining human-computer interactions by automating tasks on webpages. It offers a convenient framework for developing LLM- and LMM-based web agents, providing both plugin and server source code for easy integration and customization. This project was featured as an ACL'24 Demo, showcasing its innovative approach to web automation.

ChatArena: Multi-Agent Language Game Environments for LLMs
July 1, 2026
ChatArena is a Python library designed to provide multi-agent language game environments for Large Language Models (LLMs), aiming to foster the development of communication and collaboration capabilities in AI. It offers a flexible framework for defining players, environments, and interactions based on Markov Decision Processes. Please note that as of August 11, 2025, this project has been deprecated due to a lack of widespread community use and is no longer receiving updates or support.
Agentarium: A Python Framework for AI Agent Simulations
July 1, 2026
Agentarium is an open-source Python framework designed for creating and managing simulations with AI-powered agents. It offers an intuitive platform for designing complex, interactive environments where agents can act, learn, and evolve. This powerful tool simplifies the orchestration of multiple AI agents and their interactions.
Source repository
Open the original repository on GitHub.