Rendered at 13:50:36 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
thih9 5 hours ago [-]
> Run engrim setup without arguments. It automatically detects installed environments on your machine and configures them all
Does it come with an uninstall script?
timgordontg 1 hours ago [-]
It does now! Good call. I actually just pushed an update based on your comment that adds engrim uninstall to cleanly unwire the hooks, MCP servers, and skills across all environments. Thanks for keeping me honest!
thih9 34 minutes ago [-]
Thanks and no problem.
Everyone should start calling me a plunger because I often hear that i was right to push back.
Congrats on the launch!
andai 52 minutes ago [-]
OP appears to be an LLM. Project looks very interesting though.
I especially like the provenance idea.
timgordontg 45 minutes ago [-]
No, I am not an LLM. I do use LLMs to help draft replies as I am a busy person living in the real world. Really glad you like the provenance feature tracking which agent (or human) made which decision ended up being one of the most useful parts of the whole system for me.
aidiveyt 5 hours ago [-]
Stop hooks can block the turn too: exit 2 with a message and the session keeps working until the check passes.
timgordontg 1 hours ago [-]
[flagged]
whsoul 2 hours ago [-]
I like this local-first concept.
you have already good desktop resource.
timgordontg 1 hours ago [-]
Thanks! Exactly. We have M-series chips and massive NVMe drives sitting mostly idle while we pay a 'cloud tax' to store string data. Local SQLite is practically zero-latency, keeps your IP entirely private, and means the memory engine survives even if your internet drops.
corv 6 hours ago [-]
I’m currently using gbrain as provider-agnostic memory but miss how lightweight SQLite is in practice, so this is interesting!
timgordontg 1 hours ago [-]
gbrain is an awesome project, but yeah, that was exactly the itch I was trying to scratch! I wanted something that felt as fast, portable, and bulletproof as a single .db file. Zero background daemons or cloud dependencies—just fast, hybrid queries.
dsemakin 6 hours ago [-]
What triggers a memory getting written in practice? is it on me to remember engrim add?
timgordontg 1 hours ago [-]
Great question, and I just updated the README to clarify this! It's a mix. If you're using connected agents (Antigravity, Claude Code, Cursor) via MCP, they have the engrim_add tool and will automatically log major architectural decisions as they make them. But you also have the manual engrim add CLI command for when you have an 'aha!' moment and want to drop a constraint into the project's brain yourself.
Schlagbohrer 5 hours ago [-]
"Switzerland of AI memory" :-/ ?
znort_ 3 hours ago [-]
i'm guessing it's a metaphor for neutrality. except it's a metaphor that isn't really aging well ...
timgordontg 1 hours ago [-]
[flagged]
stadeschuldt 6 hours ago [-]
OpenCode?
jauntywundrkind 5 hours ago [-]
already has a full sqlite based memory store of everything. :)
timgordontg 1 hours ago [-]
[dead]
dcreater 7 hours ago [-]
Pi?
timgordontg 1 hours ago [-]
[flagged]
4nm1tsu 4 hours ago [-]
Have you thought about adding an observability layer on top of the shared memory?
If multiple agents are reading and writing to the same memory, I'd love to be able to see which agent created a memory, which agents later retrieved it, and how it propagated across sessions. A timeline or knowledge graph of that could be really useful, especially for tracking down stale or conflicting memories.
daksh_aneja 6 hours ago [-]
Really nice approach. Local-first + SQLite is the right call for offline-first agent memory without the overhead of a full embedding db. Two quick thoughts:
How do you handle memory eviction when context windows get large? Are you doing semantic similarity cutoffs or just recency?
The 80-line constraint is impressive—did you consider supporting structured recalls (e.g., "all conversations about X topic")? Or is that out of scope for the minimalist angle?
Building this locally vs. cloud-hosted changes the whole game for AI CLI tools. Would use this.
alescalaios 4 hours ago [-]
[dead]
hefu_hk 5 hours ago [-]
[flagged]
timgordontg 9 hours ago [-]
Hi HN,
I built engrim to establish a local-first, open standard for cross-model AI agent memory.
As context windows scale past 1M+ tokens, developers face rapid attention dilution: reasoning degrades, and token costs multiply exponentially with every turn. But if you clear your agent's session (/clear) to save money and speed things up, the agent suffers total episodic amnesia, forgetting architectural rules, past debugging steps, and micro-decisions.
Engrim replaces attention dilution with a 4,000-character curated episodic working memory pack. It decouples your project's intelligence from single-vendor proprietary cloud silos. You can switch seamlessly from Gemini in Google Antigravity to Claude 3.7 in Claude Code to GPT-4o in Cursor or Windsurf mid-project—your agents pick up exactly where the others left off.
A few architectural details:
- Under the hood, it's a zero-latency hybrid retrieval engine combining SQLite FTS5 (BM25 keyword search) with static vector embeddings (model2vec) using Reciprocal Rank Fusion (RRF).
- Memory retrieval is gated per prompt and filtered by a relevance floor, meaning only high-signal records enter your token window.
- Provenance Tracking: It maps the origin of every memory entry via an `origin_agent` field (antigravity, claude-code, cursor, cli, user) across multi-agent setups.
- 100% Local & Offline: Runs entirely out of a local SQLite database (~/.engrim/memory.db) with POSIX 0600 file permissions and zero cloud telemetry.
Empirical Proof:
I production-tested this across 105 continuous sessions on a 50,000-line algorithmic trading system. Over 153,000 tokens of architecture and parameter-tuning logs were consolidated into an active memory pack under 1,000 tokens. That represents a 99%+ cut in reloaded context costs on session restarts with zero architectural regression.
Quickstart:
It configures environment lifecycle hooks automatically (e.g., configures hooks.json for Antigravity, settings.json hooks and CLAUDE.md for Claude Code, and registers the stdio MCP server for Cursor and Windsurf):
pip install engrim
engrim setup --all
I'm hoping this helps developers escape cloud lock-in and keep their data sovereign while putting an end to massive token bills. I'd love to hear your thoughts on the schema approach, the hybrid RRF engine, or how you handle episodic state across different AI tools!
byako 8 hours ago [-]
[dead]
imperiapmk 7 hours ago [-]
[dead]
skanga 7 hours ago [-]
Codex?
timgordontg 38 minutes ago [-]
Yes! Because the Codex CLI supports the Model Context Protocol (MCP) and lifecycle hooks, it actually worksperfectly out of the box.
In fact, your comment just inspired me to push a quick update a few minutes ago: if you pull the latest version, running engrim setup will now auto-detect your ~/.codex folder and completely wire up the MCP server and hooks (SessionStart, UserPromptSubmit, etc.) natively. Give it a try!
Does it come with an uninstall script?
Everyone should start calling me a plunger because I often hear that i was right to push back.
Congrats on the launch!
I especially like the provenance idea.
If multiple agents are reading and writing to the same memory, I'd love to be able to see which agent created a memory, which agents later retrieved it, and how it propagated across sessions. A timeline or knowledge graph of that could be really useful, especially for tracking down stale or conflicting memories.
How do you handle memory eviction when context windows get large? Are you doing semantic similarity cutoffs or just recency? The 80-line constraint is impressive—did you consider supporting structured recalls (e.g., "all conversations about X topic")? Or is that out of scope for the minimalist angle?
Building this locally vs. cloud-hosted changes the whole game for AI CLI tools. Would use this.
I built engrim to establish a local-first, open standard for cross-model AI agent memory.
As context windows scale past 1M+ tokens, developers face rapid attention dilution: reasoning degrades, and token costs multiply exponentially with every turn. But if you clear your agent's session (/clear) to save money and speed things up, the agent suffers total episodic amnesia, forgetting architectural rules, past debugging steps, and micro-decisions.
Engrim replaces attention dilution with a 4,000-character curated episodic working memory pack. It decouples your project's intelligence from single-vendor proprietary cloud silos. You can switch seamlessly from Gemini in Google Antigravity to Claude 3.7 in Claude Code to GPT-4o in Cursor or Windsurf mid-project—your agents pick up exactly where the others left off.
A few architectural details: - Under the hood, it's a zero-latency hybrid retrieval engine combining SQLite FTS5 (BM25 keyword search) with static vector embeddings (model2vec) using Reciprocal Rank Fusion (RRF). - Memory retrieval is gated per prompt and filtered by a relevance floor, meaning only high-signal records enter your token window. - Provenance Tracking: It maps the origin of every memory entry via an `origin_agent` field (antigravity, claude-code, cursor, cli, user) across multi-agent setups. - 100% Local & Offline: Runs entirely out of a local SQLite database (~/.engrim/memory.db) with POSIX 0600 file permissions and zero cloud telemetry.
Empirical Proof: I production-tested this across 105 continuous sessions on a 50,000-line algorithmic trading system. Over 153,000 tokens of architecture and parameter-tuning logs were consolidated into an active memory pack under 1,000 tokens. That represents a 99%+ cut in reloaded context costs on session restarts with zero architectural regression.
Quickstart: It configures environment lifecycle hooks automatically (e.g., configures hooks.json for Antigravity, settings.json hooks and CLAUDE.md for Claude Code, and registers the stdio MCP server for Cursor and Windsurf):
pip install engrim engrim setup --all
I'm hoping this helps developers escape cloud lock-in and keep their data sovereign while putting an end to massive token bills. I'd love to hear your thoughts on the schema approach, the hybrid RRF engine, or how you handle episodic state across different AI tools!
In fact, your comment just inspired me to push a quick update a few minutes ago: if you pull the latest version, running engrim setup will now auto-detect your ~/.codex folder and completely wire up the MCP server and hooks (SessionStart, UserPromptSubmit, etc.) natively. Give it a try!