Sponsored by Deepsite.site

Engram

Created By
tstockham9622 days ago
Universal memory layer for AI agents. Semantic recall, automatic consolidation, and bi-temporal knowledge — in SQLite. 80% on LOCOMO benchmark using 96% fewer tokens.
Content

🧠 Engram

The intelligence layer for AI agents

npm version License: BSL 1.1 GitHub stars

Every AI agent is born smart but amnesiac. Engram fixes that. It doesn't just store memories -- it learns, consolidates patterns, detects contradictions, and surfaces context you didn't ask for.

Engram MCP server

Install

npm install -g engram-sdk
engram init

That's it. Works with Claude Code, Cursor, or any MCP client. Also available as a REST API and TypeScript SDK.


Why Engram

Existing memory solutions are storage layers -- they save facts and retrieve them. Engram is an intelligence layer with three tiers:

TierWhat it doesWho has it
Explicit MemoryStores facts, preferences, conversation turnsEveryone
Implicit MemoryDetects behavioral patterns from how users workEngram only
Synthesized MemoryConsolidation produces insights nobody asked forEngram only

Key insight: Engram invests intelligence at read time (when the query is known), not write time (when you don't know what'll matter). This is the fundamental architectural difference from Mem0, Zep, and LangMem.


Benchmarks

Evaluated on LOCOMO -- the standard benchmark for agent memory systems. Same benchmark Mem0 used to claim state of the art.

SystemAccuracyTokens/Query
Engram80.0%1,504
Full Context88.4%23,423
Mem0 (published)66.9%--
MEMORY.md28.8%--

10 conversations, 1,540 questions, 4 categories. 19.6% relative improvement over Mem0 with 93.6% fewer tokens than full context.

Full context (dumping entire conversation history) scores highest but uses 30x more tokens and can't scale past context window limits. Engram closes most of the gap while using 96.6% fewer tokens.

Full benchmark methodology and per-category breakdown


Features

  • MCP Server -- 10 memory tools for Claude Code, Cursor, and any MCP client
  • REST API -- Full HTTP API for any language or framework
  • TypeScript SDK -- Embedded use for Node.js agents
  • CLI -- Interactive REPL, bulk operations, eval tools
  • Model-agnostic -- Works with Gemini, OpenAI, Ollama, Groq, Cerebras (any OpenAI-compatible provider)
  • Zero infrastructure -- SQLite, no Docker, no Neo4j, no Redis
  • Consolidation -- LLM-powered memory merging, contradiction detection, pattern discovery
  • Entity-aware recall -- Knows "Sarah" in the query should boost memories about Sarah
  • Bi-temporal model -- Tracks when facts were true, not just when they were stored
  • Spreading activation -- Graph-based context surfacing

Quick Start

MCP Setup (Claude Code / Cursor)

npm install -g engram-sdk
engram init

REST API

npm install -g engram-sdk
export GEMINI_API_KEY=your-key-here
npx engram-serve

Server starts on http://127.0.0.1:3800.

Remember and Recall

# Store a memory
curl -X POST http://localhost:3800/v1/memories \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers TypeScript over JavaScript", "type": "semantic"}'

# Recall relevant memories
curl "http://localhost:3800/v1/memories/recall?context=language+preferences&limit=5"

TypeScript SDK

import { Vault } from 'engram-sdk';

const vault = new Vault({ owner: 'my-agent' });

await vault.remember('User prefers TypeScript');
const memories = await vault.recall('language preferences');
await vault.consolidate();

API Reference

Full REST API and MCP tool documentation: engram.fyi/docs


Configuration

VariableDescriptionDefault
GEMINI_API_KEYGemini API key for embeddings and consolidation--
ENGRAM_LLM_BASE_URLCustom API base URL (Groq, Cerebras, Ollama, etc.)provider default
ENGRAM_LLM_MODELLLM model nameprovider default
ENGRAM_DB_PATHSQLite database path~/.engram/default.db
PORTServer port3800
ENGRAM_AUTH_TOKENBearer token for API auth--

Benchmarks & Eval Scripts

This repo contains the evaluation scripts used to benchmark Engram:

  • eval-locomo.ts -- LOCOMO benchmark (the main result)
  • eval-letta.ts -- Letta Context-Bench evaluation
  • eval-codebase-v2.ts -- Enterprise codebase navigation benchmark
  • eval-enron.ts -- Email corpus evaluation

See EVAL.md for methodology and paper/engram-paper.md for the full research paper.


Pricing

TierPriceMemoriesAgents
Free$01,0001
Developer$29/mo10,0001
Team$99/mo50,0005
Business$499/moUnlimitedUnlimited
EnterpriseCustomCustomCustom

Hosted API coming soon. Self-hosting is free.


License

Proprietary License

Engram is proprietary software. You may install and use it freely for internal purposes. See LICENSE for full terms.

For commercial licensing, contact tstockham96@gmail.com.


Server Config

{
  "mcpServers": {
    "engram": {
      "command": "npx",
      "args": [
        "-y",
        "engram-sdk",
        "mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Serper MCP ServerA Serper MCP Server