Engram

MCP文档知识

提供方 ayvazyan10 · 包名 @engram-ai-memory/mcp

文档知识 stdio · 本地进程 API Key 社区 / 第三方 Claude DesktopClaudeCursorCline
查看接入方式

Persistent AI memory backend with semantic search and knowledge graph.

一句话选型结论

按资料字段整理

Engram 属于文档知识类 MCP 服务器,stdio · 本地进程,API Key,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式stdio · 本地进程 鉴权API Key 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

memoryknowledge graphsemantic search

安装与配置

stdio · 本地进程 API Key
客户端在本机拉起子进程,数据不出本机
npx -y @engram-ai-memory/mcp@latest\r

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Cross-platform,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Engram当前 未标注 stdio · 本地进程 本地部署 有 未标注
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方ayvazyan10上游标注的维护方 ayvazyan10
分类文档知识本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时@engram-ai-memory/mcp · Cross-platform本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

24.5 KB
来自项目仓库与上游目录的原文,未做删改

Engram

Universal AI Brain — persistent memory and cognition layer for any AI model


What is Engram?

Engram gives any AI model human-like memory that persists across sessions, systems, and restarts. Connect it once and every AI you use — Claude Code, Ollama, or any custom integration — shares a single, growing brain.

Most AI tools forget everything the moment a session ends. Engram solves this by acting as a universal memory backend: it stores what your AIs learn, retrieves the right memories at the right time, and presents them as context — automatically.```
┌─ You tell Claude Code about your stack ──→ stored as semantic memory
└─ Next day, different tool, new session ──→ Engram recalls it automatically


---

## Features

| Feature | Description |
|---|---|
| **3 Memory Types** | Episodic (events), Semantic (facts + knowledge graph), Procedural (trigger→action patterns) |
| **7-Step Recall Pipeline** | Embed → Vector search → Graph expand → Score → Rank → Truncate → Log |
| **Memory Decay & GC** | Ebbinghaus forgetting curve, auto-archive stale memories, episodic→semantic consolidation |
| **Memory Reflection** | AI-driven insight engine — the AI connected over MCP reasons over your memories to surface patterns, knowledge gaps, trends, and contradictions. Engram runs no LLM of its own — no API keys, no external calls. |
| **Atlas dashboard** | Map, Recall, Review, Timeline, Insights and Settings; light/dark and ⌘K command palette |
| **Optional Namespaces** | Disabled by default; enable filtering or strict isolation per project/agent |
| **Contradiction Detection** | Auto-detect conflicting memories, 5 resolution strategies (keep_newest/oldest/important/both/manual) |
| **Embedding Upgradability** | Swap embedding models, store model ID alongside vectors, batch re-embedding pipeline |
| **Streaming Recall** | SSE endpoint — high-confidence memories first, graph-expanded backfill later |
| **Index Persistence** | Save/load vector index to disk for fast startup (27-37x speedup) |
| **CLI Tool** | `engram store/search/recall/stats/forget/export/import/reflections/cloud` from the terminal |
| **Import/Export** | Full backup & restore as JSON or NDJSON via CLI or API |
| **Webhooks** | Subscribe external systems to memory events (stored, forgotten, decayed, consolidated, contradiction, reflected) |
| **Tagging & Collections** | Tag cloud, filter by tag, prefix-based collections (e.g. `project:alpha`) |
| **Plugin System** | 7 lifecycle hooks (onStore, onRecall, onForget, onDecay, onReflect, onStartup, onShutdown) |
| **Importance Decay** | Source-aware default importance, daily decay for unused memories, protection rules for AI clients |
| **Inline Edit & Bulk Ops** | PATCH individual memories, bulk tag/archive via API and dashboard |
| **Observability** | Debug endpoints, scoring breakdowns, Swagger UI at `/docs` |

---

## How it works

Every time an AI connected to Engram receives a query:

1. **Embeds** the query into a 384-dimensional semantic vector *(locally — no API, no cost)*
2. **Searches** its vector index for similar past memories
3. **Expands** via the knowledge graph to retrieve related concepts
4. **Scores** candidates by semantic similarity + recency + importance + access frequency
5. **Checks** for contradictions with existing memories
6. **Injects** the assembled context into the AI's prompt

The AI responds with awareness of everything it has ever learned. After the exchange, the response is stored as a new memory — the brain grows continuously.

---

## Memory model

| Type | What it stores | Example |
|---|---|---|
| **Episodic** | Events, conversations, timestamped interactions | *"User asked about deployment on 2026-03-15"* |
| **Semantic** | Facts, knowledge, concepts + knowledge graph | `concept: TypeScript` → *"typed superset of JavaScript"* |
| **Procedural** | Patterns, skills, trigger→action rules | *"When user asks about DB migrations → use drizzle-kit generate"* |
| **Working** | Dynamically assembled context for a query | *(assembled at query time, not stored)* |

---

## Integrations```
Claude Code    ──MCP──────────→ ┐
Claude Desktop ──extension────→ │  Engram  →  SQLite
Ollama         ──proxy────────→ │  REST :4901
Any app        ──REST─────────→ │
CLI            ──direct───────→ ┘
Integration Method How
Claude Code MCP (24 native tools) store_memory, recall_context, request_reflection, …
Claude Desktop 1-click Desktop Extension Smithery or .mcpb from releases
Ollama Transparent HTTP proxy Point client at :11435 instead of :11434
Any app Direct REST API POST /api/recall + POST /api/memory
Terminal CLI engram recall "what was the last decision?"

Quick start

One-command install

For Claude Code, choose the recommended plugin OR engram setup for MCP and hooks, never both.```bash

Memory for your AI client — npx-based MCP config, no clone/build

npx -y @engram-ai-memory/cli setup --npx

Optional: REST API + Atlas dashboard on :4901 (the wizard clones and builds the server)

npm i -g @engram-ai-memory/cli
engram setup
engram start


The first command is all an MCP client needs. With the server running, open http://localhost:4901 for the dashboard, `/docs` for Swagger UI.

### CLI commands```bash
engram setup                 # Clone, build, install the CLI globally, wire up MCP
engram setup --npx           # Fast setup — npx-based MCP config, no clone/build
engram setup --source cursor # Also picks WHICH client config file to write (see below)
engram init                  # Generate AI memory instructions (CLAUDE.md, .cursorrules, etc.)
engram init --client cursor  # Generate instructions for a specific client
engram update                # Pull, rebuild, re-link the CLI, restart the server
engram update --force        # Update even with local repo changes (stashed, or kept on a backup branch)
engram update --no-restart   # Update without restarting the server
engram start                 # Start the server (detached)
engram start --foreground    # Run it in this terminal instead
engram stop                  # Stop the server — waits for it to actually exit
engram doctor                # Health checks; exits 1 when it finds something
engram status                # Server status + memory count
engram configure show        # Print the current config
engram configure set <k> <v> # Change one setting
engram configure path        # Print the config file path
engram cloud connect <url>   # Configure multi-device sync against Postgres
engram cloud status          # Sync state, last sync, pending pushes
engram cloud sync            # Run one push + pull now
engram cloud encrypt         # Turn on end-to-end encryption (prompts for the passphrase)
engram cloud devices         # This device's sync identity
engram cloud disconnect      # Stop syncing; the local database is untouched

engram setup --source picks both the identifier stamped on stored
memories and the config file that gets written: claude-code →
~/.claude.json, cursor → ~/.cursor/mcp.json, windsurf →
~/.codeium/windsurf/mcp_config.json. Any other value — including the default
— registers nothing and prints the JSON block for you to paste yourself. It
never writes ~/.mcp.json; no MCP client reads that path.

engram stop, engram doctor and engram update report failure through the
exit code, so they can be used in scripts: stop waits up to 10 s for the
process to exit and returns 1 if it may still be running (and refuses to signal
a PID that does not own the port); doctor returns 1 when any check fails;
update returns 1 when the repository moved but the build, the global CLI
refresh or the restart did not complete. update keys on a build stamp as well
as git state, so the first run after upgrading always rebuilds rather than
reporting "already up to date" over a stale dist/.

Manual install (alternative)```bash

git clone https://github.com/ayvazyan10/engram
cd engram
pnpm install
pnpm turbo run build
node apps/server/dist/index.js


Or keep it running in the background with PM2:```bash
pnpm turbo run build
pm2 start ecosystem.config.cjs
pm2 logs engram

Store your first memory```bash

curl -X POST http://localhost:4901/api/memory \
-H "Content-Type: application/json" \
-d '{"content": "User prefers TypeScript over JavaScript", "type": "semantic", "concept": "preferences"}'


### Ask the brain```bash
curl -X POST http://localhost:4901/api/recall \
  -H "Content-Type: application/json" \
  -d '{"query": "What language does the user prefer?"}'

CLI

Install the CLI globally for terminal access:```bash
npm i -g @engram-ai-memory/cli
``````bash

Store a memory

engram store "User prefers TypeScript" --type semantic --importance 0.8

Search

engram search "TypeScript" --top 5

Recall context (pipeable)

engram recall "what languages does the user prefer?" --raw

Stats

engram stats

Export/import

engram export > backup.json
engram import < backup.json

Forget

engram forget a1b2c3d4-...

Reflection (AI-driven — runs on the AI connected via MCP)

engram reflect-status # show whether a reflection cycle is due
engram reflections --type pattern # list stored pattern insights


### Reflection needs no LLM configuration

Engram never calls a model itself. When a reflection cycle is due, the AI connected over MCP does the reasoning via `request_reflection` → `store_reflection`. There are no providers, models, or API keys to configure.

Set `ENGRAM_DB_PATH` to point at your database file.

---

## MCP Setup (Claude Code, Cursor, Windsurf, Cline)

Add Engram as a native tool in any MCP-compatible AI client — no API calls, no wrappers.

Add the config below to the file your client reads:

| Client | Config file |
|---|---|
| Claude Code (user scope) | `~/.claude.json` |
| Claude Code (project scope) | `.mcp.json` in the project root |
| Cursor | `~/.cursor/mcp.json` |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |

`engram setup --source ` writes the right one for you. Any other client
reads its own file — check its documentation and paste the same block there.```json
{
  &quot;mcpServers&quot;: {
    &quot;engram&quot;: {
      &quot;command&quot;: &quot;npx&quot;,
      &quot;args&quot;: [&quot;-y&quot;, &quot;-p&quot;, &quot;@engram-ai-memory/mcp@latest&quot;, &quot;engram-mcp&quot;],
      &quot;env&quot;: {
        &quot;ENGRAM_DB_PATH&quot;: &quot;~/.engram/engram.db&quot;,
        &quot;ENGRAM_SOURCE&quot;: &quot;claude-code&quot;
      }
    }
  }
}

> Note: Do not put mcpServers in ~/.claude/settings.json — that file is for Claude Code settings only. MCP servers belong in ~/.claude.json (user scope) or .mcp.json (project scope).

If you installed via engram setup, you can point to the local build instead:```json
{
"mcpServers": {
"engram": {
"command": "node",
"args": ["/home/you/.engram/repo/packages/mcp/dist/server.js"],
"env": {
"ENGRAM_DB_PATH": "~/.engram/engram.db",
"ENGRAM_SOURCE": "claude-code"
}
}
}
}


Restart your AI client. **24 tools** are now available:

| Category | Tools |
|---|---|
| **Memory** | `store_memory`, `search_memory`, `recall_context`, `add_knowledge`, `forget` |
| **Stats &amp; Health** | `memory_stats`, `index_status`, `embedding_status` |
| **Lifecycle** | `decay_sweep`, `decay_policy`, `re_embed` |
| **Contradictions** | `check_contradictions`, `resolve_contradiction` |
| **Reflection** | `request_reflection`, `store_reflection`, `get_reflections` |
| **Distillation** | `get_distill_tasks`, `complete_distill` |
| **Tags** | `list_tags`, `tag_memory` |
| **Webhooks** | `webhook_subscribe`, `webhook_list` |
| **Plugins** | `plugin_list` |

### Auto-store conversations (optional)

Add a Claude Code hook to automatically save conversation summaries to engram when a session ends:```bash
# Copy the hook script
cp scripts/claude-code-hook.sh ~/.claude/hooks/engram-session-end.sh
chmod +x ~/.claude/hooks/engram-session-end.sh

Add to ~/.claude/settings.json:```json
{
"hooks": {
"SessionEnd": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/engram-session-end.sh",
"timeout": 15
}
]
}
]
}
}


Every session now auto-stores a summary to engram — the brain grows without manual effort.

Stored sessions are tagged `pending-distill`. The AI connected to Engram calls `get_distill_tasks`, extracts durable facts itself (Engram runs no LLM and needs no API key), and calls `complete_distill`, which stores the facts and then archives the raw session. SessionStart reminds the AI when sessions are waiting to be distilled.

---

## Claude Desktop Extension (1-click install)

The fastest way to get Engram into Claude Desktop — no manual JSON editing required.

### Via Smithery

Go to smithery.ai/skills/ayvazyan10/engram, click **Install**, optionally set your database path and namespace, and Smithery configures Claude Desktop automatically.

### Via .mcpb Desktop Extension

Download `engram-mcp.mcpb` from GitHub Releases and open it in Claude Desktop (File → Open Extension). The bundle auto-installs `@engram-ai-memory/mcp` to `~/.engram/mcp/` on first launch — no setup required.

&gt; **How the bootstrap works:** on first run the `.mcpb` bundle installs `@engram-ai-memory/mcp@` via npm into `~/.engram/mcp/`. A marker file prevents re-installation on subsequent launches. All 24 MCP tools are then available in Claude Desktop.

---

## Packages

| Package | Description | npm |
|---|---|---|
| `@engram-ai-memory/core` | The Brain — memory engine, embeddings, graph, retrieval, decay, reflection |  |
| `@engram-ai-memory/mcp` | MCP Server — 24 tools for Claude Code and MCP-compatible clients |  |
| `@engram-ai-memory/cli` | CLI — store, search, recall, reflections, stats, export, import from the terminal |  |
| `@engram-ai-memory/server` | Fastify REST API + Socket.io WebSocket (53 endpoints) | — |
| `@engram-ai-memory/web` | Atlas dashboard — Map, Recall, Review, Timeline, Insights, Settings | — |
| `@engram-ai-memory/vis` | Force-directed layout + animation helpers |  |
| `@engram-ai-memory/adapter-ollama` | Transparent Ollama memory proxy (:11435) | — |

---

## Environment variables

| Variable | Default | Description |
|---|---|---|
| `PORT` | `4901` | API server port |
| `HOST` | `127.0.0.1` | Bind address — **loopback only by default** |
| `ENGRAM_SOURCE` | `mcp-client` | Client identifier (e.g. `claude-code`, `cursor`, `windsurf`) |
| `ENGRAM_DB_PATH` | `~/.engram/engram.db` | SQLite database path. Blank means the default; `~` and `~/x` are expanded |
| `ENGRAM_NAMESPACE_MODE` | `project` | Namespace behavior: `project`, `none`, `filter`, or `isolated` |
| `ENGRAM_NAMESPACE` | *(none)* | Namespace value used when mode is `filter` or `isolated`; overrides `project` detection |
| `ENGRAM_INDEX_PATH` | `{dbPath}.index` | Persistent vector index path |
| `ENGRAM_EMBEDDING_MODEL` | `Xenova/all-MiniLM-L6-v2` | Override embedding model |
| `ENGRAM_DECAY_INTERVAL` | `3600000` | Auto-decay sweep interval (ms) |
| `ENGRAM_DECAY_THRESHOLD` | `0.05` | Retention score below which memories are archived |
| `ENGRAM_ALLOWED_ORIGINS` | localhost dashboard origins | Comma-separated browser origins allowed to call the API (CORS + WebSocket). Non-browser clients (CLI, MCP, curl) are unaffected. |
| `ENGRAM_API_KEY` | *(none)* | When set, all API routes except `/api/health` require this key via `X-API-Key` or `Authorization: Bearer`. Unset = open (local-first default). **Set-but-empty aborts startup** rather than silently disabling auth. |
| `ENGRAM_ALLOWED_HOSTS` | *(empty)* | Hostnames allowed in the `Host` header on `/api/*` (DNS-rebinding defense). IP literals and `localhost` always pass; anything reached by name — a reverse proxy, a Docker service name — must be listed. `*` disables the check. |
| `ENGRAM_RATE_LIMIT_MAX` | `1000` | Requests per window in the `global` tier. Also `ENGRAM_RATE_LIMIT_HEAVY_MAX` (300), `ENGRAM_RATE_LIMIT_WHOLE_STORE_MAX` (30), `ENGRAM_RATE_LIMIT_WINDOW_MS` (60000), `ENGRAM_RATE_LIMIT_DISABLED`. |
| `ENGRAM_CSP` | *(built-in policy)* | Override the Content-Security-Policy sent on every response, or `off` to send none. |
| `ENGRAM_WEBHOOK_ALLOW_PRIVATE` | `false` | Allow webhook delivery to loopback/private addresses. Denied by default to prevent SSRF; set `true` if your webhook consumers are on localhost or a private network. |
| `ENGRAM_SYNC_URL` | *(none)* | PostgreSQL connection string for multi-device sync. Unset = sync disabled. See Cloud Sync. |
| `ENGRAM_SYNC_MODE` | `auto` | Sync behavior: `auto` (background sync on interval + debounce), `manual` (explicit only), `off`. |
| `ENGRAM_SYNC_INTERVAL` | `30000` | Background sync interval in milliseconds (auto mode only). |
| `ENGRAM_SYNC_ALLOW_UNENCRYPTED` | `false` | Allow non-TLS PostgreSQL connections. For local development only — production should always use `sslmode=require`. |
| `ENGRAM_SYNC_ENCRYPTION_KEY` | *(none)* | Passphrase for E2E encryption of synced data. Unset = data reaches Postgres as plaintext. See Cloud Sync. |
| `OLLAMA_PROXY_PORT` | `11435` | Ollama proxy listen port |
| `ENGRAM_PROXY_HOST` | `127.0.0.1` | Ollama proxy bind address — **loopback only by default**. The proxy has no authentication, so a wider bind hands any peer on the network an endpoint that drives your GPU. |
| `ENGRAM_MAX_BODY_BYTES` | `10485760` | Ceiling on a proxied request body; over it the proxy answers `413`. |
| `ENGRAM_TOOL_RETRY` | `true` | Auto-retry failed tool calls once with an instruction (proxy) |

`project` is the default: inside a git repository the MCP server and hooks scope to the absolute git top-level path and read that project&#x27;s memories plus global ones; outside a repository they use the shared pool. `filter` scopes to `ENGRAM_NAMESPACE`, and `isolated` together with `ENGRAM_NAMESPACE` is a fixed boundary that rejects overrides and cross-namespace queries. The REST server and dashboard always run as `none` and see every project. Existing memories have a NULL namespace and stay global.

This is a summary. docs/CONFIGURATION.md has the full list, including everything under Security. Note that `engram start` derives the server&#x27;s environment from `~/.engram/config.json`, so shell variables it manages are overridden — see the CLI section.

---

## Ports

| Service | Port | Purpose |
|---|---|---|
| Engram API | **4901** | REST + WebSocket + Swagger UI |
| Dashboard | **4901** | Atlas dashboard (served from API server) |
| Dashboard (Docker) | **4902** | Standalone dashboard container, optional |
| Ollama Proxy | **11435** | Memory injection proxy → Ollama |

`docker compose` publishes all three — plus the sync-testing Postgres on 5432 — on **loopback only**. Exposing the API deliberately means setting `ENGRAM_API_KEY`, adding the public hostname to `ENGRAM_ALLOWED_HOSTS`, and only then changing the published address.

All ports are in the 49xx range to avoid conflicts with common dev services (3000, 5173, 8080, etc.).

---

## Live demo```bash
# Load demo memories with knowledge graph connections
cd packages/core &amp;&amp; npx tsx scripts/demo.ts

# Open the Atlas dashboard
# → http://localhost:4901

Atlas views: Map · Recall · Review · Timeline · Insights · Settings

Explore memories on a map with named regions, Meaning / Faults / Time lenses and search pins. Its switcher adds four lazily loaded views at #/?view=sky · landscape · river · pulse: Sky, a WebGL night sky arranged by meaning and age; Landscape, retention terrain with a Now / +7 / +30 / +90-day decay preview; River, braided history by region with brush-to-zoom and region following; and Pulse, a read-only recall explanation showing ranks, graph pulls, token budget and exclusions. Recall draws the numbered route of what your AI would be told alongside the exact context. Review contradictions, near-duplicates, fading-but-important memories and possible secrets, with Redact for detected secrets. Open any memory to inspect or edit it; archive and memory-sheet contradiction actions offer a six-second Undo. Timeline groups memories by day, Insights holds Numbers and Reflections, and Settings shows connection steps and health. Welcome guides the first connection.

Use light or dark mode (or follow the system), open commands with ⌘K / Ctrl+K, and keep the same project scope as you move between memory views. The layout adapts to phones, with keyboard navigation and an accessible list alongside the map.


Performance

Metric Value Approach
Recall latency (100 memories) ~18ms p50 In-memory cosine scan + importance scoring
Store throughput ~120 mem/s SQLite WAL + auto-linking
Embedding 8ms/text Local ONNX/WASM (all-MiniLM-L6-v2)
Cold startup (1k memories) ~1.2s Full DB scan + index build
Cached startup (1k memories) ~45ms Persisted index (27x faster)
Storage per memory ~1.3 KB FP16 compressed (2x reduction)
Dashboard JS budgets ≤ 200 KB initial / ≤ 125 KB lazy Insights / ≤ 220 KB lazy 3D views (gzip) Charts load with Insights; three.js loads with Sky / Landscape; check:bundle enforces limits

Embeddings run locally using ONNX Runtime WASM — no OpenAI API, no cost, no data leaving your machine.


Documentation

Document Description
docs/ARCHITECTURE.md System design, data flow, component overview
docs/API.md Full REST API reference (53 endpoints)
docs/INTEGRATIONS.md Claude Code, Ollama, REST, webhooks, plugins
docs/DEVELOPMENT.md Monorepo, build system, contributing
docs/CONFIGURATION.md Environment variables, database, tuning

Interactive Swagger UI: http://localhost:4901/docs

Marketing site & interactive docs: engram.am


Contributing

We welcome contributions of all kinds — bug fixes, new integrations, adapters for other AI tools, visualization improvements, and documentation.

See CONTRIBUTING.md for guidelines.

Key areas where help is especially welcome:

  • New adapters — LM Studio, llama.cpp, Anthropic API, OpenAI API
  • Mobile / browser — lightweight browser-side memory client
  • Multi-modal embeddings — images, audio alongside text
  • Multi-device cloud sync — SQLite stays the local engine; devices replicate through a shared PostgreSQL instance via ENGRAM_SYNC_URL (see Cloud Sync)
  • ANN vector index — replace the brute-force cosine scan with HNSW so recall stops scaling linearly with memory count

Usage examples

Example 1 — Session start: recall relevant context```

User: "Continue working on the auth refactor"
Claude: [calls recall_context("auth refactor current status")]
→ Returns past decisions, code patterns, and session notes about auth


Tool: `recall_context` · Input: `{ &quot;query&quot;: &quot;auth refactor current status&quot;, &quot;maxTokens&quot;: 1500 }` · Output: formatted context block with matched memories and scores.

### Example 2 — Store a decision```
User: &quot;Always use drizzle-kit migrate, never drizzle-kit push — it broke prod once&quot;
Claude: [calls store_memory with type &quot;procedural&quot;, importance 0.95]
→ Next session: search_memory(&quot;database migrations&quot;) surfaces this rule automatically

Tool: store_memory → search_memory · Demonstrates cross-session persistence.

Example 3 — Contradiction detection```

User (day 1): "Production runs on PostgreSQL 15"
User (day 30): "We migrated prod to SQLite WAL last month"
Claude: [store_memory returns contradictions detected]
→ calls resolve_contradiction(strategy: "keep_newest")
```

Tool: store_memory + resolve_contradiction · Engram flags the conflict with 0.87 confidence and archives the stale belief.


Privacy policy

Engram is local-first and privacy-preserving by design:

  • Local by default. All memories are stored in a local SQLite database (~/.engram/engram.db). No data leaves your machine unless you explicitly enable cloud sync.
  • Cloud sync is opt-in. Setting ENGRAM_SYNC_URL replicates memories to a PostgreSQL database you own and control — Engram never phones home and never touches any third-party service on its own. See Cloud Sync.
  • All embeddings run on-device. The all-MiniLM-L6-v2 model runs locally via @xenova/transformers — no external embedding API calls.
  • No telemetry. Engram does not collect usage statistics, crash reports, or any analytics.
  • Webhooks are opt-in. If you configure webhooks, memory events are sent to your chosen URL — fully under your control.

Full privacy policy: https://engram.am/privacy


License

MIT — see LICENSE


Built with ♥ for the open AI ecosystem by Razmik Ayvazyan

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Engram 怎么安装?

在客户端按下面的安装命令接入:npx -y @engram-ai-memory/mcp@latest\r。对应的包名是 @engram-ai-memory/mcp。装完在客户端配置里引用同一个包或端点。

Engram 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Engram 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Engram 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Engram 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、Cline、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Engram 能提供哪些能力?

资料显示能力标签包括 memory、knowledge graph、semantic search、embeddings、sqlite、local。具体工具清单以官方文档为准。

Engram 需要什么运行环境?

运行时为 Cross-platform;属于本地进程,需要在本机装好运行环境。

Engram 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。