Local-First · Source-Available · Any Agent

Give your agent
a hippocampus

A memory protocol for AI agents. REST API, TypeScript SDK, knowledge graph, and a consolidation engine that turns raw episodes into structured knowledge. Self-host or use the managed API — source-available so you can verify exactly what happens with your data.

$ git clone https://github.com/tstockham96/engram.git
$ cd engram && npm install && npm run build
$ node dist/server.js # → picks a free port automatically

Full setup guide →

Your agents have amnesia

Every conversation starts from zero. Every insight is lost. Your agents are brilliant for 5 minutes — then forget everything.

Groundhog Day

Users repeat themselves every session. Preferences, context, history — gone. The agent asks the same questions forever.

Storage ≠ Memory

Vector databases store text. Real memory extracts entities, builds connections, decays irrelevance, and consolidates knowledge.

No Big Picture

Without consolidation, agents can't see patterns across conversations. They retrieve fragments but never synthesize understanding.

Memory that actually thinks

Engram doesn't just store — it understands. Automatic entity extraction, LLM-powered consolidation, and a knowledge graph that grows smarter over time.

Three Memory Types

Episodic (what happened), semantic (what's true), and procedural (how to do things). Just like human memory.

Sleep Cycles

LLM-powered consolidation distills episodes into lasting knowledge. Like how your brain processes memories during sleep.

Knowledge Graph

Memories connect via edges — supports, contradicts, elaborates, supersedes. Build a web of understanding, not a pile of text.

Entity Tracking

Automatically extracts and tracks people, places, concepts across memories. Your agent remembers who, not just what.

100% Local-First

Your data never leaves your machine. SQLite database on your disk, no phone-home, no telemetry, no cloud dependency. Source-available — inspect every line of code. The hosted API is optional, not required.

Memory Decay

Irrelevant memories fade naturally. Important ones strengthen. Your agent's memory stays sharp, not cluttered.

Spreading Activation

Recall cascades through the memory graph — querying "Thomas" activates marathon → training schedule → prefers morning runs. Finds context you didn't know to ask for.

Proactive Surfacing

Memories PUSHED when relevant, not just PULLED on demand. Send current context, get back things your agent should know right now — without asking.

The memory lifecycle

Five simple functions. One powerful system.

1

remember()

Store experiences with automatic entity extraction and embedding generation.

2

recall()

Semantic search across all memory types. Get relevant context instantly.

3

connect()

Link memories with typed edges. Build a graph of supporting and contradicting knowledge.

4

consolidate()

LLM sleep cycles distill episodes into semantic knowledge and surface insights.

5

forget()

Explicit removal or natural decay. Keep memory lean and relevant.

Simple API, powerful results

Use the REST API from any language. Or use the TypeScript SDK for a native experience.

terminal
# Store a memory
curl -X POST http://localhost:3000/v1/memories \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers TypeScript over Python for backend work",
    "type": "episodic",
    "context": { "conversation": "project-setup" }
  }'

# Recall relevant memories via semantic search
curl -X POST http://localhost:3000/v1/memories/recall \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What languages does the user like?",
    "limit": 5,
    "types": ["episodic", "semantic"]
  }'
agent.ts
import { Engram } from 'engram';

// Initialize with local SQLite storage
const memory = new Engram({ path: './agent-memory.db' });

// Store an experience — entities are extracted automatically
await memory.remember('User prefers TypeScript over Python for backend work', {
  type: 'episodic',
  context: { conversation: 'project-setup' }
});

// Recall relevant memories via semantic search
const memories = await memory.recall('What languages does the user like?', {
  limit: 5,
  types: ['episodic', 'semantic']
});

// Connect related memories
await memory.connect(memoryA.id, memoryB.id, 'supports');

// Run a sleep cycle — distill episodes into knowledge
const insights = await memory.consolidate();
// → "User consistently prefers strongly-typed languages"

Python SDK coming soon. The REST API works with any language — no SDK required.

Memory is a Graph, Not a List

Engram doesn't just store memories — it connects them. Entities, memories, and the relationships between them.

Prefers TypeScript Dark mode Switched to React Q4 review Uses Engram Perf talk Sunday long runs

Your memory, your choice

Memory is the most sensitive data your agent handles. Here’s exactly how Engram treats it.

You Choose Where Your Data Lives

Self-host and your memories stay in a SQLite file on your disk — nothing sent anywhere. Use the hosted API and we store it on encrypted, isolated infrastructure. Either way, you own your data and can export it anytime.

Source-Available

Every line of code is on GitHub. Read the MCP server, the API, the embedding pipeline. Verify there’s no telemetry, no tracking, no data exfiltration. We built it this way on purpose.

Cloud Is Optional, Not Required

The hosted API is for teams who want managed infrastructure without running servers. Self-host is a first-class option forever — not a demo tier that nudges you to upgrade.

“Isn’t a CLAUDE.md file good enough?”

It is — until it isn’t. Start with shadow mode and see for yourself.

The simple interface

You interact with 2 endpoints: remember() and recall(). That’s it. The knowledge graph, consolidation, and decay happen automatically behind the scenes. You get the benefits without managing the complexity.

Shadow mode

Not ready to switch? Run Engram alongside your existing memory file. It learns in parallel and shows you what it catches that your file missed. Keep your CLAUDE.md — Engram just proves its value over time. Zero risk.

When flat files break

A CLAUDE.md works at 50 lines. At 500 lines, it’s a maintenance burden. At 5,000 lines, it’s impossible. Engram scales because it’s structured — targeted recall instead of dumping everything into context.

Not just another vector store

Even the best agent runtimes rely on flat files for memory. Engram brings real intelligence.

Feature Engram OpenClaw Mem0 Zep Letta
Spreading Activation
LLM Consolidation Partial
Knowledge Graph
Entity Extraction
Memory Decay
Local-First Cloud-default Cloud-default
Language-Agnostic Python-first Python-first Python-first
Portable (JSON Export)

OpenClaw: Integration partner, not competitor

OpenClaw is the most popular source-available AI agent runtime — and even it relies on flat Markdown files + vector search for memory. No structure, no consolidation, no graph. Engram is designed to be the structured memory layer that platforms like OpenClaw adopt to replace their file-based approach. OpenClaw integration is on the roadmap.

What vector search can't do

Vector databases find text that matches your query. Engram understands context, discovers connections, and gets smarter over time.

Consolidation

LLM-powered sleep cycles distill raw conversations into structured knowledge. Your agent's memory gets denser and more useful over time — automatically.

Spreading Activation

Query "Thomas" and the recall cascades: marathon → training schedule → prefers morning runs. Finds relevant context you didn't know to ask for.

Proactive Surfacing

Memories pushed to your agent when relevant — not just pulled on demand. "You have a pending commitment about X" without being asked.

Contradiction Detection

"Thomas hates coffee" conflicts with "Thomas drinks espresso daily." Engram surfaces these so your agent doesn't give contradictory answers.

Memory Lifecycle

Memories have status: active, pending, fulfilled, superseded, archived. Your agent knows what's current, what's outdated, and what commitments are still open.

Grows With Scale

Flat files break at scale. Nobody maintains a 50-page MEMORY.md. Engram's consolidation and graph get more valuable the more data it has.

Three ways to use Engram

Hosted API for production, self-host for development. Same open protocol either way.

1

Hosted API

Managed memory infrastructure at api.engram.ai. Zero setup, generous free tier, usage-based pricing. The easiest way to get started.

Coming soon — join waitlist
2

Clone & Run

Clone the repo, build, and start the server. Your agent talks to it via the REST API.

git clone https://github.com/tstockham96/engram.git
3

npm Package

Use the TypeScript SDK directly in your Node.js agent for native, zero-network-overhead memory.

npm install (coming soon)

Engram Cloud

The self-hosted version works today — the waitlist is for the hosted API. Same endpoints, zero infrastructure. We run the server, manage backups, and handle scaling so you don’t have to.

One API key, no servers to run
Managed consolidation & backups
Team-shared memory graphs
You’re on the list! We’ll notify you when Engram Cloud is ready.

No spam. We’ll notify you when it’s ready.

99.6% Recall Accuracy
<10 min Setup Time
Any Agent Claude · Cursor · Custom