█

AI/TLDR

Buy me a coffee
Buy me a coffee

MemU

Turn raw multimodal data into agent-ready structured memory

Agent MemoryOpen source
Language
Python
License
Apache-2.0
$pip install memu-py
IN SHORT

What is MemU?

MemU is a data-to-memory engine for AI agents. It sits in the Agent Memory category of the Agents & Automation tools and is open-source, written in Python and licensed Apache-2.0. To get started: install MemU.

Overview

MemU is a data-to-memory engine for AI agents. It takes raw sources such as conversations, documents, URLs, images, audio, video, and tool logs, and turns them into a structured memory graph: resources, typed memory items, categories, relations, summaries, and embeddings that an agent can query directly.

It is aimed at developers building agents that need to remember things across sessions. Instead of re-reading every source on each turn, you ingest a source once with memorize(), then call retrieve() to pull back ranked context scoped to a specific user, session, or task. This keeps the amount of context you feed the model smaller and more relevant.

As a memory framework, MemU sits between your agent and a storage backend. It supports in-memory, SQLite, and PostgreSQL (with pgvector) backends behind the same repository contracts, and offers a hosted API at memu.so for teams that prefer managed ingestion and retrieval.

What it does

  • Multimodal ingestion of conversations, documents, images, video, audio, URLs, logs, and local files
  • Structured memory graph of resources, memory items, categories, relations, summaries, and embeddings
  • Typed memory extraction into profile, event, knowledge, behavior, skill, and tool memories
  • Scoped, ranked retrieval that returns context for a given user, session, or task
  • Pluggable storage backends: in-memory, SQLite, or PostgreSQL with pgvector
  • Profile-based LLM routing so you can use OpenAI or custom providers

Getting started

MemU runs on Python 3.13+. Install the package, set your OpenAI API key, then ingest a source and retrieve scoped context.

Install MemU

Install the published package with pip. To work from a clone instead, run uv sync in the repository.

bashbash
pip install memu-py

Set your API key

Export your OpenAI key so MemU can run extraction and embeddings. For a PostgreSQL backend, also set POSTGRES_DSN.

bashbash
export OPENAI_API_KEY=your_key

Ingest and retrieve

Create the service, ingest a source with memorize(), then pull back scoped context with retrieve(). Both calls are async.

pythonpython
from memu import MemUService

service = MemUService()

# Ingest raw data
result = await service.memorize(
    resource_url="path/to/file.json",
    modality="conversation",
    user={"user_id": "123"},
)

# Retrieve scoped context
context = await service.retrieve(
    queries=[{"role": "user", "content": {"text": "What should I remember?"}}],
    where={"user_id": "123"},
)

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 chat assistant long-term memory so it recalls user preferences and past decisions across sessions
  • Reduce prompt size by retrieving only the memory items relevant to the current task instead of replaying full history
  • Build a knowledge layer that ingests mixed sources (docs, meeting recordings, images) and exposes them as queryable memory
  • Capture and reuse tool-usage patterns so an agent learns effective workflows over time

How MemU compares

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

ToolStarsWhat it does
Claude-Mem★ 121kPersistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions.
Mem0★ 69.7kA 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.
Hindsight★ 64.3kAn agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations.
MemPalace★ 60.8kLocal-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server.
OpenViking★ 43.1kA context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading.
Cognee★ 33.7kA graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge.
Graphiti★ 33.2kA 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.
MemU★ 14.6kTurn raw multimodal data into agent-ready structured memory