Getting started
Introduction
Every AI coding agent on your machine keeps its own memory, and forgets it between sessions. Sigil replaces all of them with one brain that persists, and that every agent reads and writes.
The problem
Section titled “The problem”Claude Code knows your preferences from this morning. Cursor doesn’t. Kiro learned your architecture last week; Codex CLI has never heard of it. Tomorrow, all four start cold.
The built-in answer is a hand-edited file — CLAUDE.md, AGENTS.md, .cursorrules, Kiro steering. Per-agent, size-capped, manually maintained, and reloaded in full on every single prompt.
What Sigil does
Section titled “What Sigil does”Sigil stores facts, decisions, preferences, and documents in your own Postgres (or a zero-install embedded database), and injects the relevant ones into every agent prompt automatically.
Four Claude Code hooks classify and save what you say as you work. Other agents write through MCP or the CLI.
Documents become chunks, chunks become atomic facts, facts link into an entity graph — all in your database.
Hybrid search (vector + keyword) re-ranked by recency and co-retrieval, injected before the model sees your prompt.
You tell Claude Code on Tuesday that events route through Postgres LISTEN/NOTIFY instead of Redis pubsub. Thursday you open Cursor in the same repo and ask for an event handler. It already knows. Friday, an agent on your home server answers the same question the same way.
Versus your agent’s built-in memory
Section titled “Versus your agent’s built-in memory”| Built-in memory files | Sigil | |
|---|---|---|
| Capture | Manual — you write and edit the file | Automatic via Claude Code hooks |
| Scale | Whole file loaded into context, every prompt | Top-K retrieved from an unlimited corpus |
| Token cost | Linear in file size | ~1.5K per prompt, regardless of corpus size |
| Search | None — the model reads everything | Hybrid: pgvector + tsvector BM25, fused with RRF |
| Cross-agent | One file per agent, no sharing | One brain, every wired agent |
| Cross-machine | Manual sync (git, scp) | Point installs at the same database |
| Freshness | Stale until you rewrite it | Decay, supersession, importance reweighting |
| Provenance | None | Source, confidence, temporal validity, writer |
Keep CLAUDE.md for hard project rules. Sigil handles everything else.
Which agents
Section titled “Which agents”Auto-detected and wired by setup — nothing to configure:
One line of config from sigil register --print:
Claude Code gets the deepest integration — four hooks that capture and inject with no tool calls at all. Every other agent uses the MCP server or the sigil CLI directly.
Where your data lives
Section titled “Where your data lives”In your database and nowhere else. There is no Sigil cloud, no account, and no telemetry.
Text leaves your machine only when Sigil calls the LLM or embedding provider you chose. Pick Ollama for both and nothing leaves at all — Sigil is fully air-gappable.