Skip to content
Memorg

Features

Everything you need for LLM memory, nothing you don't.

Memorg is a small, deliberate surface: a hierarchy that scopes memory, retrieval that blends similarity with recency and importance, and a single file you own. Here is the whole feature set.

Structure

Memory that knows who and what it belongs to.

Four-level hierarchy

Sessions hold conversations, conversations hold topics, topics hold exchanges. Retrieval can scope to a topic, a conversation, or a whole user history instead of dumping everything.

Typed memory items

Store documents, notes, or arbitrary tagged blobs alongside chat. The hierarchy is the default surface, not a cage — search across types or scope to one.

Per-user sessions

A session is keyed to a user, so memory is naturally scoped and portable. Reopen a session and its context is there.

Retrieval

Semantic recall that understands recency and importance.

Semantic search

Every exchange and item is embedded with an OpenAI model and indexed in USearch, so search returns the most relevant context, not the most recent by default.

Blended deterministic ranking

Results are re-scored with a fixed blend of semantic similarity, recency, and importance. No LLM reranker in the default path — the same query returns the same ordering.

Token-budget trimming

A token counter fits returned context to the model window you set when creating the session, so the LLM gets the most useful payload that still fits.

Storage & deploy

One file. No managed service.

Single-file SQLite

Hierarchy, metadata, tags, and source content live in one SQLite file you can copy, version, and back up with cp.

USearch vector index

A fast, native nearest-neighbour index embedded in the same store. The interface is small and pluggable if you outgrow it.

Local-first

Memorg runs in your process. No separate vector database, no control plane, no service to operate to develop or ship.

Integration

Drop it next to whatever you already run.

Library-first

Memorg is a small Python surface you call from any handler or orchestrator. It does not own your prompts, tools, or agent loop.

MCP server included

A FastMCP server exposes Memorg to Claude Desktop, Cursor, and any MCP-aware host so they can read and write memory without bespoke glue.

OpenAI embeddings

Embeddings and chat go through an OpenAI client. Swapping the embedder is a contained change because the vector-store interface is small.

See how it fits together

These features are all one library and one file. The architecture page walks the request path end to end.

Put them to work

Browse concrete use cases — chat continuity, RAG upgrades, agent memory, and more.

Compare honestly

See where Memorg sits next to Mem0, Letta, and Zep — including where they win.

Small surface. Real recall.

Install Memorg, point it at a SQLite file, and call search_context() when you need memory.