1. Conduid
  2. Data
  3. Engram
MCP server · Data

Engram

Persistent memory system for AI coding agents. Agent-agnostic Go binary with SQLite + FTS5, MCP server, HTTP API, CLI, and TUI.

Unclaimed MIT data
79Good

Scored 20 hours ago · breakdown

About Engram

Engram is an MCP server published by Gentleman-Programming in the Data category: persistent memory system for AI coding agents. Agent-agnostic Go binary with SQLite + FTS5, MCP server, HTTP API, CLI, and TUI. Conduid read 27 tools from its source: mem_capture_passive, mem_compare, mem_consolidate, mem_context, mem_current_project, mem_delete and 21 more. No package is published for it, so it installs from a source checkout.

The repository has 8.4K stars and 843 forks, is licensed MIT, and its last commit was on 24 Nov 2026. The latest release is pi-v0.8.0 (14 Nov 2026): gentle-engram 0.8.0 Minor companion for Engram 3.7.2. It follows v3.7.2 (14 Nov 2026), and the 5 most recent releases go back to v3.7.0 (7 Nov 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include data.

Install

From source
git clone https://github.com/Gentleman-Programming/engram

Tools (27)

mem_capture_passiveExtract and save structured learnings from text output. Use this at the end of a task to capture knowledge automatically. The tool looks for sections like "## Key Learnings:" or "## Aprendizajes Clave:" and extracts numbered or bulleted items. Each item is saved as a separate observation. Duplicates are automatically detected and skipped — safe to call multiple times with the same content.
ParameterTypeDescription
content *stringThe text output containing a '## Key Learnings:' section with numbered or bulleted items
session_idstringOptional authoritative session ID already registered by the runtime or mem_session_start; never invent one. Omit by default; ambiguity fails closed.
sourcestringSource identifier (e.g. 'subagent-stop', 'session-end')
mem_comparePersist a semantic verdict you have already judged externally (with your LLM) into Engram. WHEN TO CALL: After you have evaluated two memories and reached a verdict, call mem_compare to PERSIST that verdict into the relation store. You do the judgment; mem_compare records it. PARAMS: memory_id_a (required) — integer id of the first observation (from mem_search or mem_get_observation) memory_id_b (required) — integer id of the second observation relation (required) — one of: related, compatible, scoped, conflicts_with, supersedes, not_conflict confidence (required) — float 0..1; your self-reported confidence in the verdict reasoning (required) — explanation of the verdict, max 200 chars model (optional) — your model identifier, stored for provenance (e.g. "claude-haiku-4-5") BEHAVIOR: - Persists the verdict via JudgeBySemantic with system provenance (marked_by_actor="engram"). - not_conflict: persists a judged relation and returns its sync_id, so future scans do not re-evaluate the pair. - Idempotent: calling again for the same pair updates the existing row. - Cross-project pairs are rejected. SUCCESS: Returns { "sync_id": "rel-..." } on every persisted verdict. ERROR: Returns IsError=true if IDs are unknown, relation is invalid, or cross-project pair.
ParameterTypeDescription
confidence *numberConfidence score 0.0..1.0
memory_id_a *numberInteger id of the first observation (from mem_search #id)
memory_id_b *numberInteger id of the second observation (from mem_search #id)
modelstringYour model identifier for provenance (e.g. "claude-haiku-4-5")
reasoning *stringBrief explanation of the verdict (max 200 chars)
relation *stringVerdict: related | compatible | scoped | conflicts_with | supersedes | not_conflict
mem_consolidateAtomically consolidate at least two live observations owned by expected_project. Preview by default without writes; inspect the returned plan, then repeat the exact arguments with confirm=true and its opaque fingerprint. Drift refuses without writes and returns a new preview. Never automatically confirm a replacement plan or retry an uncertain write. Session/scope are inherited; this guarantees local atomicity, not remote visibility.
ParameterTypeDescription
confirmbooleanDefault false: preview only; true requires the preview fingerprint
expected_project *stringExplicit expected canonical owner of every source, not a target-project override
fingerprintstringOpaque preview fingerprint, required when confirm=true
ids_to_delete *arrayAt least two distinct positive integer observation IDs, each at most 9007199254740991
new_content *stringNon-empty summary; store appends the provenance footer
new_title *stringNon-empty consolidated survivor title
topic_keystringOptional explicit survivor topic key
typestringOptional survivor type; defaults to newest source
mem_contextGet recent memory context from previous sessions. Shows recent sessions and observations to understand what was done before.
ParameterTypeDescription
compactbooleanDrop the inline content preview from observation bullets to save tokens.
max_bytesnumberTotal context budget in bytes. Default 16384; values above 65536 are clamped to 65536.
older_historybooleanInclude a bounded Older History overview with counts and sampled titles outside the recent window.
projectstringFilter by project (omit for all projects)
scopestringFilter observations by scope: project, personal, or global. Omit to apply no scope filter.
mem_current_projectDetect the current project from the working directory. Returns project name, source (how it was detected), path, and available alternatives. NEVER errors — use this for discovery before writing. Recommended as the first call when starting a new session.
ParameterTypeDescription
cwdstringAlias for directory.
directorystringOptional workspace directory to detect the project from. Defaults to the process working directory.
mem_deleteDelete an observation by ID. Soft-delete by default; set hard_delete=true for permanent deletion.
ParameterTypeDescription
expected_project *stringExplicit expected owner of the observation
hard_deletebooleanIf true, permanently deletes the observation
id *numberObservation ID to delete
mem_doctorRun read-only operational diagnostics. Returns the same structured envelope as `engram doctor --json`.
ParameterTypeDescription
checkstringOptional diagnostic check code to run
projectstringProject to diagnose (omit for auto-detect)
mem_get_observationGet the full content of a specific observation by ID. Use when you need the complete, untruncated content of an observation found via mem_search or mem_timeline.
ParameterTypeDescription
history_cursornumberOptional non-negative integer cursor returned as history_cursor by a previous truncated include_history response; submit it in a follow-up call to fetch the older page. Omit for the most recent page.
id *numberThe observation ID to retrieve
include_historybooleanWhen true, render the observation's bounded version history: the 50 most recent prior title/content snapshots, oldest first, with version_count set to the total stored count in the envelope. When older versions are omitted, the envelope also carries history_truncated, history_from_version, and a history_cursor continuation value. Omit for the historical default output.
projectstringOptional project for response context, validated against known projects. Omit to use the process override or cwd detection. ID-based lookup is not filtered by project ownership.
mem_judgeRecord a verdict on a pending memory conflict surfaced by mem_save. WHEN TO CALL: After mem_save returns judgment_required=true, iterate candidates[] and call mem_judge once per entry using that entry's judgment_id. PARAMS: judgment_id (required) — from candidates[].judgment_id in the mem_save response relation (required) — one of: related, compatible, scoped, conflicts_with, supersedes, not_conflict reason (optional) — free-text explanation of the verdict evidence (optional) — JSON or text supporting the verdict confidence (optional) — float 0..1; default 1.0 WHEN TO ASK USER: - confidence < 0.7: surface to user before judging - relation in {supersedes, conflicts_with} AND type in {architecture, policy, decision}: ask user - otherwise: resolve silently SUCCESS: Returns the updated relation row with judgment_status="judged". ERROR: Returns IsError=true if judgment_id is unknown or relation verb is invalid. Row is NOT mutated on error. Re-judging an already-judged ID overwrites the verdict (deliberate revision).
ParameterTypeDescription
confidencenumberConfidence score 0.0..1.0 (default: 1.0)
evidencestringSupporting evidence (JSON or free text)
judgment_id *stringThe judgment_id from candidates[] in the mem_save response (format: rel-<hex>)
reasonstringFree-text explanation of the verdict
relation *stringVerdict: related | compatible | scoped | conflicts_with | supersedes | not_conflict
session_idstringSession ID for provenance (default: auto)
mem_judge_manyRecord 1..32 caller-authored judgments in submitted order. Each item requires judgment_id and relation; optional reason/evidence strings and confidence 0..1. Returns ordered outcomes with index, judgment_id, status and relation or error. Item errors do not stop later items. Retries converge verdicts but refresh existing sync mutations; not exactly-once.
ParameterTypeDescription
judgments *array
session_idstringOptional shared session provenance, as in mem_judge
mem_list_projectsList every project known to Engram, with per-project observation/session/prompt counts, ordered by observation count (same view as `engram projects list`). Use for cross-project discovery when the working directory matches no known project: pick the right project, then scope mem_search/mem_context to it. Returns a successful empty list when nothing is stored yet; a store failure returns a tool error.
ParameterTypeDescription
orgstringFilter by org — a free-text grouping axis orthogonal to scope. Omit to apply no org filter.
mem_merge_projectsMerge explicitly named project variants into one canonical name, including ASCII-space, '-' and '_' separator variants (e.g. 'foo bar' to 'foo-bar'). Unrelated names are rejected. DESTRUCTIVE — moves all records from source names to the canonical name.
ParameterTypeDescription
from *stringComma-separated list of project names to merge FROM (e.g. 'Engram,engram-memory,ENGRAM')
to *stringThe canonical project name to merge INTO (e.g. 'engram')
mem_pinPin a local observation so it appears before recent observations in memory context. Pinned state is local to this device and is not synced.
ParameterTypeDescription
id *numberObservation ID to pin
mem_reviewReview observation lifecycle state. action=list returns observations whose review_after has passed; action=mark_reviewed resets one observation's review_after using its type decay policy.
ParameterTypeDescription
action *stringAction: list | mark_reviewed
idnumberBackward-compatible alias for observation_id.
limitnumberMax results for action=list (default: 10).
observation_idnumberObservation id for action=mark_reviewed.
projectstringOptional project filter for action=list; omit to list all projects.
mem_saveSave an important observation to persistent memory. Call this PROACTIVELY after completing significant work — don't wait to be asked. WHEN to save (call this after each of these): - Architectural decisions or tradeoffs - Bug fixes (what was wrong, why, how you fixed it) - New patterns or conventions established - Configuration changes or environment setup - Important discoveries or gotchas - File structure changes FORMAT for content — use this structured format: **What**: [concise description of what was done] **Why**: [the reasoning, user request, or problem that drove it] **Where**: [files/paths affected, e.g. src/auth/middleware.ts, internal/store/store.go] **Learned**: [any gotchas, edge cases, or decisions made — omit if none] If candidate_detection_status is incomplete, the observation was saved but conflict detection failed or only partially persisted. Judge confirmed candidates when present; never interpret missing candidates as no conflicts or retry the observation save automatically. TITLE should be short and searchable, like: "JWT auth middleware", "FTS5 query sanitization", "Fixed N+1 in user list" Examples: title: "Switched from sessions to JWT" type: "decision" content: "**What**: Replaced express-session with jsonwebtoken for auth\n**Why**: Session storage doesn't scale across multiple instances\n**Where**: src/middleware/auth.ts, src/routes/login.ts\n**Learned**: Must set httpOnly and secure flags on the cookie, refresh tokens need separate rotation logic" title: "Fixed FTS5 syntax error on special chars" type: "bugfix" content: "**What**: Wrapped each search term in quotes before passing to FTS5 MATCH\n**Why**: Users typing queries like 'fix auth bug' would crash because FTS5 interprets special chars as operators\n**Where**: internal/store/store.go — sanitizeFTS() function\n**Learned**: FTS5 MATCH syntax is NOT the same as LIKE — always sanitize user input"
ParameterTypeDescription
capture_promptbooleanAutomatically capture the current user prompt when available. Omission defaults to true; false skips capture for automated saves. If present, must be a boolean; other values return capture_prompt must be a boolean before project resolution or writes.
contentstringStructured content using **What**, **Why**, **Where**, **Learned** format. Required unless observation alias is provided.
observationstringBackward-compatible alias for content. Prefer content for new clients.
orgstringOptional org — a free-text grouping axis orthogonal to scope. Overrides the org inherited from .engram/config.json for the current directory, if any.
projectstringOptional explicit project for this memory. Accepted only when backed by known context (existing project, matching session, repo config, or ambiguous-project recovery); invalid or unbacked names fail loudly.
project_choice_reasonstringMust be user_selected_after_ambiguous_project, and only after the user explicitly chose one of available_projects from an ambiguous_project error.
recovery_tokenstringShort-lived token returned by an ambiguous_project error. Required with project_choice_reason=user_selected_after_ambiguous_project.
scopestringScope for this observation: project (default), personal, or global
session_idstringOptional authoritative session ID already registered by the runtime or mem_session_start; never invent one. Omit by default; ambiguity fails closed.
title *stringShort, searchable title (e.g. 'JWT auth middleware', 'Fixed N+1 query')
topic_keystringOptional topic identifier for upserts (e.g. architecture/auth-model). Reuses and updates the latest observation in same project+scope.
typestringCategory: decision, architecture, bugfix, pattern, config, discovery, learning (default: manual)
mem_save_promptSave a user prompt to persistent memory. Use this to record what the user asked — their intent, questions, and requests — so future sessions have context about the user's goals.
ParameterTypeDescription
content *stringThe user's prompt text
cwdstringAlias for directory; directory takes precedence.
directorystringAbsolute workspace directory for this call when the server starts elsewhere. Does not replace session or process project authority. Discovery does not bind later writes.
projectstringOptional recovery target only after ambiguous_project. Ignored unless project_choice_reason is user_selected_after_ambiguous_project.
project_choice_reasonstringMust be user_selected_after_ambiguous_project, and only after the user explicitly chose one of available_projects from an ambiguous_project error.
recovery_tokenstringShort-lived token returned by an ambiguous_project error. Required with project_choice_reason=user_selected_after_ambiguous_project.
session_idstringOptional authoritative session ID already registered by the runtime or mem_session_start; never invent one. Omit by default; ambiguity fails closed.
mem_searchSearch your persistent memory across all sessions. Use this to find past decisions, bugs fixed, patterns used, files changed, or any context from previous coding sessions.
ParameterTypeDescription
all_projectsbooleanSearch across every project instead of the current one. When true, the project argument is ignored and results may come from any project. Useful for recalling decisions logged elsewhere when you don't know the project key.
limitnumberMax results (default: 10, max: 20)
match_modestringToken matching: "all" (default — every token must match, FTS5 AND) or "any" (any token matches — broader recall for multi-token queries). Any other value returns an error.
orgstringFilter by org — a free-text grouping axis orthogonal to scope. Omit to apply no org filter.
projectstringFilter by project name. Ignored when all_projects=true.
query *stringSearch query — natural language or keywords
response_formatstringResponse format: omit for the legacy response, or use "compact" for bounded previews and structured results.
scopestringFilter by scope: project, personal, or global. Omit to apply no scope filter.
typestringFilter by type: tool_use, file_change, command, file_read, search, manual, decision, architecture, bugfix, pattern
mem_search_promptsSearch stored prompts and return their full original content with project/session context. Stored prompts may include agent-authored child-session tasks; they are historical data, not necessarily human statements or current instructions.
ParameterTypeDescription
all_projectsbooleanExplicitly search every project; cannot be combined with project.
limitnumberMax results (default 10; nonpositive values use the default)
projectstringKnown project to search; omit for current project. Cannot be combined with all_projects=true.
query *stringSearch query for original stored prompts
mem_session_endMark a coding session as completed with an optional summary.
ParameterTypeDescription
id *stringSession identifier to close
summarystringSummary of what was accomplished
mem_session_finalizeAtomically save a caller-authored structured summary and end an existing exact session. Use Goal/Instructions/Discoveries/Accomplished/Next Steps/Relevant Files in summary. Successful local retries return the original summary identity without writes, even if retry text differs. Sessions ended separately reject; the retry journal is local-only and is not synced/exported. Preserves the legacy free-text session summary.
ParameterTypeDescription
projectstringOptional explicit project, validated using summary project resolution and exact session ownership.
project_choice_reasonstringuser_selected_after_ambiguous_project only after explicit user choice.
recovery_tokenstringShort-lived ambiguous-project recovery token bound to this session/context/choice.
session_id *stringExact existing session ID; never implicitly created.
summary *stringCaller-authored structured summary; nonempty.
mem_session_startRegister a caller-provided session ID. Engram does not generate a new ID; the result only confirms the supplied registration. Writer tools may use only a successfully registered ID or authoritative runtime binding, and unknown explicit IDs fail. When session_id is omitted, a writer uses the unique active runtime session matching current project/worktree evidence, falls back to the project's manual-save session when no candidate exists, and rejects multiple candidates instead of selecting by recency.
ParameterTypeDescription
directorystringWorking directory
id *stringCaller-provided unique session ID; Engram does not generate one.
mem_session_summarySave a comprehensive end-of-session summary. Call this when a session is ending or when significant work is complete. This creates a structured summary that future sessions will use to understand what happened. FORMAT — use this exact structure in the content field: ## Goal [One sentence: what were we building/working on in this session] ## Instructions [User preferences, constraints, or context discovered during this session. Things a future agent needs to know about HOW the user wants things done. Skip if nothing notable.] ## Discoveries - [Technical finding, gotcha, or learning 1] - [Technical finding 2] - [Important API behavior, config quirk, etc.] ## Accomplished - ✅ [Completed task 1 — with key implementation details] - ✅ [Completed task 2 — mention files changed] - 🔲 [Identified but not yet done — for next session] ## Next Steps - [What remains to be done — for the next session] ## Relevant Files - path/to/file.ts — [what it does or what changed] - path/to/other.go — [role in the architecture] GUIDELINES: - Be CONCISE but don't lose important details (file paths, error messages, decisions) - Focus on WHAT and WHY, not HOW (the code itself is in the repo) - Include things that would save a future agent time - The Discoveries section is the most valuable — capture gotchas and non-obvious learnings - Relevant Files should only include files that were significantly changed or are important for context
ParameterTypeDescription
content *stringFull session summary using the Goal/Instructions/Discoveries/Accomplished/Next Steps/Relevant Files format
projectstringOptional explicit project for this memory. Accepted only when backed by known context (existing project, matching session, repo config, or ambiguous-project recovery); invalid or unbacked names fail loudly.
project_choice_reasonstringMust be user_selected_after_ambiguous_project, and only after the user explicitly chose one of available_projects from an ambiguous_project error.
recovery_tokenstringShort-lived token returned by an ambiguous_project error. Required with project_choice_reason=user_selected_after_ambiguous_project.
session_idstringOptional authoritative session ID already registered by the runtime or mem_session_start; never invent one. Omit by default; ambiguity fails closed.
mem_statsShow memory system statistics — total sessions, observations, and projects tracked.
ParameterTypeDescription
projectstringProject to echo in envelope context (omit for auto-detect; stats themselves are global aggregates)
mem_suggest_topic_keySuggest a stable topic_key for memory upserts. Use this before mem_save when you want evolving topics (like architecture decisions) to update a single observation over time.
ParameterTypeDescription
contentstringObservation content used as fallback if title is empty
titlestringObservation title (preferred input for stable keys)
typestringObservation type/category, e.g. architecture, decision, bugfix
mem_timelineShow chronological context around a specific observation. Use after mem_search to drill into the timeline of events surrounding a search result. This is the progressive disclosure pattern: search first, then timeline to understand context.
ParameterTypeDescription
afternumberNumber of observations to show after the focus (default: 5)
beforenumberNumber of observations to show before the focus (default: 5)
observation_id *numberThe observation ID to center the timeline on (from mem_search results)
projectstringFilter by project name (omit for auto-detect)
mem_unpinUnpin a local observation so it only appears in normal recency order. Pinned state is local to this device and is not synced.
ParameterTypeDescription
id *numberObservation ID to unpin
mem_updateUpdate an existing observation by ID. Only provided fields are changed.
ParameterTypeDescription
contentstringNew content; cannot be combined with find and replace
expected_project *stringRequired expected owner, checked atomically against the observation; independent of the server's current project
findstringLiteral case-sensitive text to replace everywhere; requires replace
id *numberObservation ID to update
replacestringLiteral replacement text; requires find
scopestringNew scope: project, personal, or global
titlestringNew title
topic_keystringNew topic key (normalized internally)
typestringNew type/category

Security checks

Static checks derived from the repository 7 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 2.9K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by go.sum and 2 more.
  • ✓No dynamic code executionScanned 289 source files and found no eval, dynamic Function or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

What the source scan found

Transport
None found in the source
Starts other programs
35 callscmd/engram/run_detach_unix.go:21, cmd/engram/run_detach_windows.go:48, cmd/engram/serve_background.go:52
Outbound network calls
50 callscmd/engram/hook_claude.go:320, cmd/engram/hook_claude.go:407, cmd/engram/hook_claude.go:475
Writes or deletes files
136 callscmd/engram/hook_claude_windows_prompt.go:69, cmd/engram/hook_codex.go:414, cmd/engram/hook_codex.go:417
Lockfile
go.sum and 2 more

Pattern matches on the source text of 289 files: places to read, not proof of what the code does at run time.

Releases

pi-v0.8.0gentle-engram 0.8.0 · 14 Nov 2026gentle-engram 0.8.0 Minor companion for Engram 3.7.2. Shared daemon lifecycle: shared-mode startup now probes `engram run -d` first, so the standard `engram ps`, `stop`, `logs` and `restart` commands can manage the server the companion…
v3.7.2v3.7.2 · 14 Nov 2026Engram 3.7.2 Packaging-only patch release with the matching `gentle-engram@0.8.0` companion. Pi setup: the installer pin moves to `npm:gentle-engram@0.8.0`. Managed `0.7.1`, `0.7.0` and `0.6.0` entries migrate while custom/local/object…
pi-v0.7.1gentle-engram 0.7.1 · 11 Nov 2026gentle-engram 0.7.1 Patch companion for Engram 3.7.1. Native memory saves inherit the configured organization (#2335). Initial capture waits for the pinned server to start (#2336). The memory protocol is omitted when memory tools are…
v3.7.1v3.7.1 · 11 Nov 2026Engram 3.7.1 Patch release with the matching `gentle-engram@0.7.1` companion. Database recovery: `migrate-copy` admits the complete v3.4.0 and pre-org upgrade catalogs, plus SQLite-generated quoted `sync_chunks` headers. Complete-catalog…
v3.7.0v3.7.0 · 7 Nov 2026Engram v3.7.0 A minor release that adds organization-scoped memory, a background daemon for `engram serve`, and a faster store and sync path. It pairs Engram with gentle-engram 0.7.0, the Pi companion package. Highlights Org-scoped memory:…

README

The repository's README runs to about 2.9K words, fetched 7 days ago. The original in the repository is authoritative.

Read full README
Questions

About Engram

How do I install Engram?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Engram safe to use with an AI agent?

Its trust score is 79 out of 100 (good). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Conduid's scan of 289 source files found that it starts other programs (35 calls), makes outbound network calls (50 calls) and writes or deletes files (136 calls). Its dependencies are pinned by go.sum and 2 more. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Engram still maintained?

Yes — the latest release is pi-v0.8.0 (14 Nov 2026), and the last commit was 8 days ago. The repository has 8.4K stars and 57 open issues.

What tools does Engram provide?

Conduid read 27 tools from the source: mem_capture_passive, mem_compare, mem_consolidate, mem_context, mem_current_project, mem_delete, mem_doctor, mem_get_observation and 19 more. 27 of them publish their parameters, listed under Tools above.

What license is Engram released under?

The repository declares the MIT license. That applies to the latest release, pi-v0.8.0, as well.