Skip to content
AGENT MEMORY

Persistent memory for AI agents.

Long-term memory across users, sessions, and skills. A drop-in TypeScript SDK on your own Postgres. Works with any LLM.

Apache-2.0 · TypeScript · your Postgres + pgvector, your LLM key — workspace isolation + owner/admin/member RBAC.

  • 4 verbsremember · recall · forget · reflect
  • 4 scopesuser · session · agent · skills
  • 3 surfacesREST · MCP · CLI
  • Hybridsemantic + BM25 + entity
  • Bi-temporalrecall as-of a date
  • Apache-2.0License
$ npm install @usetheo/memorycoming to npm

Most agents forget everything between sessions. Theo Memory gives them persistent, scoped, searchable memory — so your agent can recall that Alice is vegetarian, that the last ticket was about billing, or that the deploy script needs --force on Tuesdays. No lock-in: it runs on your Postgres, uses your LLM key, and is Apache-2.0.

What you get

Concretely, what ships.

Three scopes + skills

user (cross-session), session, agent, plus a code-as-skill library.

Four-verb API

remember, recall, forget, reflect — consistent across every scope.

Hybrid retrieval

Semantic (cosine) + BM25 lexical + entity boost with threshold gating.

Multi-tenant + RBAC

Workspace isolation (404 cross-tenant) + owner / admin / member roles.

Bi-temporal recall

recall({ asOf }) for point-in-time memory snapshots.

Three surfaces

REST (OpenAPI 3.1), an MCP server, and a CLI.

Feel it
typescript
import { createLocalMemory } from '@usetheo/memory';

const memory = await createLocalMemory({ vectorStore, embedder, llm });

// Your agent remembers
await memory.user('alice').remember('Prefers dark mode. Speaks Portuguese.');

// Your agent recalls
const facts = await memory.user('alice').recall('UI preferences');
// -> [{ text: 'Prefers dark mode', score: 0.94 }]

Your agent remembers and recalls — Apache-2.0, on your Postgres.

What you'd ship

Things you would actually build.

  • 01A support bot that remembers a user’s past tickets across sessions.
  • 02A per-repo skill library that code agents recall by semantic query.
  • 03Session-scoped memory that stays isolated to a single conversation.
  • 04Point-in-time recall — ask what the agent knew as of a past date (asOf).
  • 05A drop-in MCP memory server for Cursor, Claude Desktop, Windsurf, or Cline.
  • 06Multi-tenant agent memory where each workspace’s data stays on your Postgres.
Why Theo Memory

How it compares.

The agent-memory space is consolidating around Python-first, mostly cloud-gated options. Comparison of open-source surfaces, public docs mid-2026.

CapabilityTheo MemoryMem0LettaZep / Graphiti
Primary languageTypeScriptPythonPythonPython
Default vector storePostgres + pgvectorQdrantPostgres + pgvectorNeo4j (graph)
Bi-temporal asOfYesNoYes
Skill / procedural memoryCode-as-skillPartialNoNo
Multi-tenant + RBAC (OSS)Workspace + rolesCloud-onlyCloud-onlyCloud-only

Theo Memory keeps your data and your authorization layer on infrastructure you own, in TypeScript — where the others gate equivalent tenancy and RBAC to their hosted tiers.

Why now

TypeScript teams want parity with managed memory APIs — hybrid retrieval, bi-temporal recall, skill memory, MCP/REST/CLI — while keeping data and authorization on their own Postgres.

Status

Honest claims only.

  • Four-verb API (remember / recall / forget / reflect) across user, session, agent and skill scopes.
  • Hybrid retrieval, bi-temporal recall, and workspace isolation + RBAC on your own Postgres.
  • REST, MCP and CLI surfaces · Apache-2.0 · SDK publishing to npm next.

Persistent memory for AI agents.

$ npm install @usetheo/memorycoming to npm

Read the docs → docs.usetheo.dev

View the source → github.com/usetheodev/theo-memory