Each agent turn adds facts and entities and links them; a newer fact supersedes the old one instead of deleting it, and recall expands from matched entities to hand the top three facts to the asking agent.
Built AI agent memory that runs on the Claude and Codex plans I already pay for, so no new subscription, and stays on my machine. It went multi-device when my agents did. No launch, no marketing, strangers still found it.
See it work
One decision, two agents. Claude Code makes it, Sigil saves it, and Codex gets it back in a different session without being told.
Sigil · one memory, every agent
Paused
Claude Codesession 41
>
● Done. events/bus.ts now uses LISTEN/NOTIFY.
Stop hook · 1 decision saved
Codex CLInew session
~/code/acme-api
Sigil/ Knowledge Base local · no cloud
1,774
facts
4
agents
97%
hit-rate
Use jose for JWT signing; jsonwebtoken was removed.decision
Queue jobs must be idempotent; dedupe by event id.business rule
Prefers terse PR descriptions: what, why, how tested.preference
Run vitest with --pool=forks on the queue tests.domain knowledge
Recreated from Sigil's dashboard with made-up data. Hover to pause, or click a step.
Objective
Every coding agent forgets everything when a session ends. Each one also keeps its own memory: Claude doesn't know what you told Codex, and Cursor doesn't know what Kiro learned this morning. So you explain the same architecture again every day. The memory tools that exist fix this by sending your code context to someone else's cloud.
01
One memory for every agent
Claude Code, Codex, Cursor, Hermes, Kiro and any MCP client read and write the same memory.
02
Local first
Stored in a database on my machine, with no telemetry.
03
No new bill
The LLM work runs on the Claude or Codex plan I already pay for.
04
Set up in one sitting
Install, connect, and see a saved fact come back in a new session.
Approach
A small background daemon owns the database. Agents never talk to it directly. They reach it through hooks, an MCP server or the sigil CLI, whichever the agent supports.
01 · capture
Save what matters, once
When an agent finishes a turn, a Stop hook classifies the message (decision, preference, constraint) and pulls out atomic facts and entities. Each one is added, updated, merged or deleted against what is already stored, so memory doesn't fill up with near-duplicates.
02 · recall
Inject the best 1.5K tokens
Before an agent sees your prompt, a hook runs hybrid search: pgvector + BM25 fused with Reciprocal Rank Fusion in one SQL query. Results are re-ranked by ACT-R activation (recent, frequently used facts score higher) and by how often facts get recalled together.
03 · storage
Facts, entities and a graph
Facts carry confidence, importance and a valid-from/valid-to window, and link to an entity graph. They live in pods: one per session, project, person or runbook, each with its own decay and context budget.
04 · dashboard
A control panel on localhost
Plain ES modules served by the daemon, with a React island for the force-directed graph. Setup, health, browsing and correcting memory, agents, devices and the LLM engine.
Issues faced
01issue
Two copies of Sigil corrupted the database
The built-in database is an embedded Postgres (PGlite, with pgvector) that only one process can open at a time. Early npm installs ran their own copy of Sigil next to the git install, so two daemons could open the same files and corrupt the database.
fix
npm, npx and the curl installer now all land on one install in ~/.sigil/app. The daemon is the only owner of the database, holds a lock, and everything else goes through it.
02issue
"Connected" did not mean working
The dashboard said an agent was connected as soon as its config file had Sigil in it. But Codex starts the MCP server even when you never approved its hooks, so it looked connected and saved nothing.
fix
Status is now built from evidence. An agent shows working only after it has actually run a hook, started the MCP server or called the CLI. Otherwise it says not used yet or needs repair, with the fix.
03issue
Hooks fired twice
Re-running sigil init added Sigil's hooks again instead of replacing them. The check for existing hooks looked for words in the command path, and some install paths didn't contain them. Every event fired twice, which doubled the LLM and embedding cost of each turn.
fix
Sigil now recognises its own hooks by their script file name, whatever the install path, and replaces them in place.
04issue
Failures were silent
A background remember ran detached with its output thrown away. If the embedder or database failed, you saw "Saving in background…" and the fact was gone. Separately, the Ollama default pointed at a 768-dim model, which fails Sigil's 1024-dim check.
fix
Failed saves are written to the log that sigil doctor reads, and a write refuses up front if setup isn't finished. Ollama now defaults to a 1024-dim model, and setup tests each provider with a live call before saving it.
Features
claude code · session 41
let's use jose, not jsonwebtoken
Switched the auth helpers to jose and removed the old package.
stop hook · 1 decision saved
Remembers without being told
Decisions are saved at the end of each turn.
A Stop hook pulls out the facts worth keeping. You never type "remember this".
sigil search "how do we deliver webhooks?"
pgvector + bm25 → rrf → act-r—
0.00Webhooks via LISTEN/NOTIFY
0.00Queue jobs must be idempotent
0.00Billing retries failed charges 3×
◆◆◆ 3 facts injected · ~1.5K tokens
Finds the right fact in milliseconds
Vector and keyword search, fused with RRF, in 33ms on average.
Then re-ranked by recency, frequency and what gets recalled together. 100% recall@10 on the LongMemEval oracle set.
project:acme-apicurrent
Webhooks via Redis pub/sub
First event bus. Simple, but lost messages on restart.
v1updated 2d ago
Webhooks via Postgres LISTEN/NOTIFYsuperseded
Events go through Redis Streamssuperseded
Newer facts win
A change of mind supersedes the old fact.
It doesn't sit next to it. Every fact keeps its versions, confidence and the window it was true in.
agents on this machine0/4 working
Claude Codehooksnot used yet
Codex CLIhooks+mcpnot used yet
Cursorhooks+mcpnot used yet
KiroMCPnot used yet
Works with every agent
Claude Code, Codex, Cursor, Hermes, Kiro and any MCP client.
An agent shows as working only once it has really reached Sigil.
Built-in database
No Docker, no install
Claude Code plan
No API key, no new bill
Ollama embeddings
Optional, fully offline
Telemetry
Not a setting. There is none.
memory storedon this machine
Local, on the plan you pay for
Memory stays on your machine.
Extraction runs on your Claude Code subscription, so there is no API key and no per-token bill.
admin · darwin
macbook-pro
Use jose for JWT signing.
member · linux
home-server
Use jose for JWT signing.
one postgres · same fact on both
One brain across devices
Laptop and home server share one memory.
Point both at the same Postgres, or pair a device with a code.
Inside the dashboard
The real dashboard, filled with made-up data.
localhost:7777/#health
Home. Is memory working? Recall hit-rate, latency, providers and what agents asked for, at a glance.
How to use
Install it with one command. You need Node.js 20+ and Git.
bash
npm i -g @anmol-srv/sigil && sigil
Sigil installs into ~/.sigil and opens the setup wizard in your browser. Pick where memory lives, pick the models, connect the agents it finds, and save your name as the first memory.
Sigil · first run in one sitting
Paused
Sigilsetup
Database
LLM
Embeddings
Agents
First memory
Step 1 of 5
Where should memory live?
Start with the built-in database. Move to your own Postgres any time.
Built-in
No Docker, no Postgres install
Local Postgres
Detected on :5432
Connection URL
Shared across devices
Engine
pgvector + pg_trgm
Migrations
The setup wizard, recreated with made-up data. Every provider check is a live call in the real product.
After that, open Claude Code and memory is already wired in. The same memory works from any terminal:
bash
sigil search "how do we deliver webhooks?" # what does memory know?sigil remember "we use jose, not jsonwebtoken" # save a fact by handsigil why "webhooks" # explain why a fact was recalledsigil agents # which agents are really workingsigil update # update and restart the daemon