Skip to content

Engrim

The Universal Cross-Model Episodic Memory Standard. Local-first, project-scoped SQLite engine for Google Antigravity, Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, and…

Install: pip install engrim

Works with Claude Code, Codex, Cursor, GitHub Copilot, OpenCode · 304 GitHub stars

Install

$pip install engrim

Install command taken from the project's README or registry entry. Always review code before running it.

engrim

The Universal Cross-Model & Cross-Agent Episodic Memory Standard.

A local-first, project-scoped SQLite memory engine that allows developers to freely switch between models and environments (Google Antigravity, Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, OpenCode, and Windsurf) on the same codebase without losing architectural decisions, user constraints, or project state.


1. Overview & Core Value Proposition

"Why pay for 200,000 tokens of forgotten noise on every turn? The models are disposable utilities; your project's decisions are not."

Engrim is the universal, cross-model episodic memory standard engineered specifically for autonomous AI coding agents and heavy software development.

It solves the "200,000-token context window trap" (where coding models suffer from severe attention dilution, compounding per-turn token costs, and the loss of prior architectural decisions whenever a chat session is cleared) by replacing raw transcript replay with 4,000 characters of high-precision, curated episodic working memory stored in a single, local-first SQLite file (~/.engrim/memory.db).

The Problem vs. The Engrim Standard

Challenge Without Engrim (Token Bloat & Context Resets) With Engrim (Episodic Continuity)
Context Window Attention Dilution: 150k+ tokens re-sent on every turn; models lose reasoning sharpness and hallucinate past constraints. Precision Working Memory: ~4,000 chars (<1,000 tokens, <1% of context) injected at boot. Zero attention dilution.
Session Clearing Context Reset on /clear: Clearing chat wipes agent context to zero; you spend minutes re-explaining rules and architecture. Continue-As-Clear: Clear anytime (/clear). Decisions, active state, and [▶ RESUME HERE] reload instantly.
Agent Ecosystem Vendor Silos: Decisions made in Claude Code are invisible in Antigravity, Cursor, Codex, Copilot CLI, or OpenCode. Universal Substrate: One local SQLite store (~/.engrim/memory.db) shared across all 6 major harnesses.
Hook Reliability Silent Failures: Moving across machines or OSes silently breaks hardcoded binary paths with no error message. Self-Healing Diagnostics: engrim doctor --fix checks the supported hook and MCP configurations and repairs stale binary paths.
Data Privacy SaaS Cloud Leakage: Proprietary code and architectural constraints sent to third-party memory APIs. 100% Local & Private: Stored locally in SQLite WAL mode (POSIX 0600). No telemetry, no cloud sync, no tracking.

2. Architecture & How It Works (The 10-Second Mental Model)

graph TD
    subgraph Agents ["Supported Agent Environments"]
        AGY["Google Antigravity(PreInvocation & Stop Hooks)"]
        CLAUDE["Claude Code(SessionStart & Stop Hooks)"]
        CURSOR["Cursor / Windsurf(Model Context Protocol stdio)"]
        CODEX["Codex CLI(Hooks, guidance & optional MCP)"]
        OPENCODE["OpenCode(Plugin & MCP)"]
        COPILOT["GitHub Copilot CLI(Command hooks & MCP)"]
    end

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related