Three scopes + skills
user (cross-session), session, agent, plus a code-as-skill library.
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.
$ npm install @usetheo/memorycoming to npmMost 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.
user (cross-session), session, agent, plus a code-as-skill library.
remember, recall, forget, reflect — consistent across every scope.
Semantic (cosine) + BM25 lexical + entity boost with threshold gating.
Workspace isolation (404 cross-tenant) + owner / admin / member roles.
recall({ asOf }) for point-in-time memory snapshots.
REST (OpenAPI 3.1), an MCP server, and a CLI.
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.
The agent-memory space is consolidating around Python-first, mostly cloud-gated options. Comparison of open-source surfaces, public docs mid-2026.
| Capability | Theo Memory | Mem0 | Letta | Zep / Graphiti |
|---|---|---|---|---|
| Primary language | TypeScript | Python | Python | Python |
| Default vector store | Postgres + pgvector | Qdrant | Postgres + pgvector | Neo4j (graph) |
| Bi-temporal asOf | Yes | No | — | Yes |
| Skill / procedural memory | Code-as-skill | Partial | No | No |
| Multi-tenant + RBAC (OSS) | Workspace + roles | Cloud-only | Cloud-only | Cloud-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.
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.
$ npm install @usetheo/memorycoming to npmRead the docs → docs.usetheo.dev
View the source → github.com/usetheodev/theo-memory