AI/TLDR

Memori

Persistent, structured memory for any LLM agent with a drop-in SDK

Overview

Memori is a memory layer for LLM agents that captures and recalls structured memory automatically. You register an existing LLM client (such as OpenAI), set an attribution scope, and Memori persists each conversation in the background and recalls relevant context on later requests. The README frames it as memory built from what agents do, not just what they say.

It is aimed at developers building chatbots, support agents, and other assistants that need to remember details across sessions without manually managing prompts or retrieval. Memori is described as LLM, datastore, and framework agnostic, and it fits into an architecture you already have.

It ships as both a Python and a TypeScript SDK and offers a hosted Memori Cloud option with an API key, plus a bring-your-own-database (BYODB) mode. It also integrates with tools like OpenClaw, Hermes Agent, and MCP.

What it does

  • Automatic capture and recall: conversations are persisted and relevant memory is recalled in the background, with no manual prompt stuffing
  • Drop-in registration over an existing LLM client (for example an OpenAI client) rather than a rewrite of your call sites
  • Attribution scoping by entity and process so memory is partitioned per user and per agent
  • Python (pip install memori) and TypeScript (@memorilabs/memori) SDKs
  • Hosted Memori Cloud with an API key, plus a bring-your-own-database mode for using your own datastore
  • Integrations for OpenClaw, Hermes Agent, and MCP so agents gain memory without code changes

Getting started

Install an SDK, set your Memori and LLM API keys, then register your LLM client so conversations are saved and recalled automatically.

Install the SDK

Use the Python SDK or the TypeScript SDK.

bashbash
pip install memori

Set your API keys

Sign up at app.memorilabs.ai to get a Memori API key, then set MEMORI_API_KEY and your LLM key (for example OPENAI_API_KEY) in your environment.

Register your client and set attribution (Python)

Register your OpenAI client with Memori and set an attribution scope. After that, conversations are persisted and recalled automatically.

pythonpython
from memori import Memori
from openai import OpenAI

# Requires MEMORI_API_KEY and OPENAI_API_KEY in your environment
client = OpenAI()
mem = Memori().llm.register(client)

mem.attribution(entity_id="user_123", process_id="support_agent")

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "My favorite color is blue."}]
)
# Conversations are persisted and recalled automatically.

Or register in TypeScript

The TypeScript SDK uses the same pattern: register the client and chain attribution.

tsts
import { OpenAI } from 'openai';
import { Memori } from '@memorilabs/memori';

// Requires MEMORI_API_KEY and OPENAI_API_KEY in your environment
const client = new OpenAI();
const mem = new Memori().llm
  .register(client)
  .attribution('user_123', 'support_agent');

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Give a support agent or chatbot memory of a user's past messages and preferences across sessions
  • Add per-user, per-agent memory to an existing OpenAI-based app without rewriting your call sites
  • Provide persistent memory to OpenClaw, Hermes, or MCP-connected agents that otherwise forget between sessions
  • Keep prompts small by recalling structured memory instead of pasting full conversation history into every request

How Memori compares

Memori alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Mem0★ 59.6kA memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends.
Graphiti★ 28.1kA library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time.
Supermemory★ 27.8kA memory and context engine that ingests information across tools and sessions and can run fully locally, acting as a second brain for AI applications.
Cognee★ 24.1kA graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge.
Letta★ 23.6kA framework (formerly MemGPT) for building stateful agents with long-term memory that persists across sessions and conversations.
Memvid★ 15.7kMemvid packs an AI agent's data, embeddings, and search index into one portable file, so it can retrieve memory fast without running a vector database.
Memori★ 15.5kPersistent, structured memory for any LLM agent with a drop-in SDK
MemU★ 13.9kA memory layer for AI agents that organizes structured storage and intent capture to reduce the tokens needed to keep context across conversations.