" ai tooling · ../
memoryctl: project memory for one human and many agents
The tool I'm proudest of isn't user-facing. It's the reason I could build Sentinel alone: backend, ETL, NLU, iOS, Android, web and infrastructure, with AI agents resuming each part with the right context instead of starting cold every session.
how a session starts
Real output from my memory, trimmed to titles ("Dormindo" is the app’s sleep state). The rest of the memory stays private.
$ memoryctl context --project mapa-crimes-cometidos --query "ios sleep live activity" { "mode": "compact", "latest_checkpoint": { "area": "nlu", "title": "#797 em prod (aa4b773)" }, "open_blockers": [ { "title": "iOS cannot deterministically clear Dormindo at sleep end under suspension" } ], "recent_decisions": [ { "title": "Use one broad iOS Live Activity standby state across sleep and post-sleep waiting" }, { "title": "Do not show a dedicated Dormindo Live Activity state on iOS" } ], "active_tasks": [ { "title": "Validate iOS standby Live Activity behavior after sleep in field use" } ], "relevant_hits": [ { "type": "note", "title": "iOS notification regression: AlertConfig silently killed in 3399fd8" }, { "type": "checkpoint", "title": "End session: ship broad standby Live Activity state for iOS sleep" } ] } $ # …the agent works… $ memoryctl checkpoint --project mapa-crimes-cometidos --area mobile --title "Standby state verified on device" --created-by claude { "id": 801, "item_type": "checkpoint", "status": "active" }
One command gives the agent the latest checkpoint, open blockers, recent decisions, active tasks and semantic matches for its topic. It's compact by default to keep tokens low, with --full when needed.
the problem
Every agent session starts with no memory. On a small project, the code and git log are enough. On one with seven moving parts, the important things live nowhere in the code: why GPS polling works the way it does, which approach was tried and dropped, what is blocked on what. I kept re-explaining them, and agents kept re-deciding them.
the design
- Typed items:
decision,blocker,task,note,checkpoint,verification,featureand a few more. Each has a status, area, platform, priority, confidence, tags and the branch/commit it was written on. - Links and refs: items link to each other (
blocks,caused_by,fixes,validates,implements…) and point at files, symbols, commits, tests, logs or URLs. - Supersedes, not edits: a new decision can replace an old one with
supersedes, so the history of a change of mind is kept. - Handoff import:
import-handoffturns a Markdown handoff into a checkpoint with one linked item per section, with a--dry-run. - Local-first: a Go CLI over a PostgreSQL schema on my machine. There is no HTTP endpoint, and it never touches the production server.
the rules
The tool is small. The rules that agents follow (from AGENTS.md) are what make it work:
- Load
memoryctl context --query "<topic>"before meaningful work. - Record only what code,
git logand the handoff can't tell you: durable decisions, non-obvious root causes, blockers with a next action, real follow-ups. - Search before writing. Supersede instead of duplicating. Memory is not a progress log.
- End each meaningful session with one concise checkpoint.
- Sign every record with
--created-by, so Codex, Claude and I share one memory and I can tell who wrote what.
semantic search, offline
items ──► chunk-items ──► embed-sync ──► semantic-search
│ (cosine, in Postgres)
▼
multilingual-e5 sidecar (CPU, local)Notes mix Portuguese, English and code, so a multilingual model matters. The embedder is the same e5 family that powers Sentinel's assistant, running on CPU with no external API. Vectors live in plain Postgres, and pgvector is an optional speed-up. A deterministic hash provider lets the pipeline be tested without the model.
in numbers
- since
- 2026-04 (first 3 commits on the same day), in daily use
- items
- 799: 332 checkpoints, 169 tasks, 167 notes, 121 decisions, plus blockers and verifications
- authors
- Codex 360 · Claude 305 · me, directly, 131
- graph
- 113 links · 198 refs
- size
- ~1.9k lines of Go for the CLI, ~2.7k with the store and schema