SuperAPIAI Directory

engrim

github.com · AI coding

Engrim is a local-first, project-level SQLite episodic memory engine for AI coding agents, designed to solve the problem of losing architectural decisions and project state when switching across models and agents. It automatically captures decisions, facts, and state through MCP or lifecycle hooks, and injects a high-precision memory pack of about 4k characters at session startup, supports hybrid retrieval (BM25 + vectors), and enables a "continue means clear" workflow. It supports environments such as Google Antigravity, Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, OpenCode, and Windsurf, with data stored entirely locally and no cloud lock-in.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Engrim is a universal cross-model, cross-agent episodic memory standard, designed specifically for autonomous AI coding agents and heavy software development. It stores project-level memory through a local-first SQLite file (~/.engrim/memory.db), replacing raw conversation replay, and solves the "200,000 token context window trap"—namely model attention dilution, accumulating per-turn token costs, and the loss of prior architectural decisions after session clearing.

Key Capabilities

  • Startup injection: When an agent starts or submits a prompt, Engrim injects a high-priority memory pack of about 4k characters into the context, beginning with [▶ RESUME HERE].
  • Automatic capture: While the agent works, it automatically records architectural decisions through MCP (engrim_add) or lifecycle hooks, and tracks the origin_agent source.
  • Hybrid retrieval: Combines lexical (bm25) and vector (model2vec) search to retrieve relevant records on demand, completing in about 30ms without slowing down the agent.
  • Continue means clear: When context bloats or the model drifts, type /clear, and the next session starts from memory.db with zero memory loss.
  • Multi-agent support: Automatically detects and configures environments such as Google Antigravity, Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, OpenCode, and Windsurf.
  • Diagnostics and self-healing: engrim doctor verifies database integrity, semantic recall coverage, and all agent hook configurations.
  • Source tracking: Records the origin_agent of each memory (antigravity, claude-code, cursor, codex, opencode, copilot, cli, or user).
  • MCP server: Provides a zero-dependency JSON-RPC 2.0 stdio MCP server exposing engrim_* tools.

Usage

Run engrim setup to automatically detect installed environments and configure all supported tools. You can also explicitly configure each platform, for example configuring hooks for Claude Code in ~/.claude/settings.json, adding engrim serve --mcp for Cursor in ~/.cursor/mcp.json, configuring command hooks for Codex CLI in $CODEX_HOME/hooks.json, and so on. Use engrim doctor to perform a health check.

Use Cases

Suitable for developers who switch between multiple AI coding agents and models and need to preserve architectural decisions, user constraints, and project state to avoid re-explaining context. Also suitable for long-term projects that require cross-session continuity.

Limitations

The materials do not provide specific pricing, costs, platform compatibility details, or performance guarantees. Some features (such as the Codex MCP server) require explicit enablement. The event file format may change with Copilot updates; Engrim detects incompatible records and warns.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools