---memoryctl · Fabio FernandesSkip to content

" 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.

799memory items in 7 months
121recorded decisions
3authors: Codex, Claude, me
0external APIs (embeddings run locally)

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

the rules

The tool is small. The rules that agents follow (from AGENTS.md) are what make it work:

  1. Load memoryctl context --query "<topic>" before meaningful work.
  2. Record only what code, git log and the handoff can't tell you: durable decisions, non-obvious root causes, blockers with a next action, real follow-ups.
  3. Search before writing. Supersede instead of duplicating. Memory is not a progress log.
  4. End each meaningful session with one concise checkpoint.
  5. 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

→ the project it was built for · the rest of my AI tooling

:help portfolio

j / k
scroll down / up, selecting links as you reach them
Enter
open the selected link
gg / G
top / bottom
Ctrl-d / Ctrl-u
half page down / up
/text · n / N
search the page · next / previous match
Ctrl-o / Ctrl-i
jump back / forward
1–4
switch buffer (tabs)
-
go up a directory
:e <name>
open a project, e.g. :e sentinel, :e memoryctl or :e work
:ls
list projects
:q
close the buffer (back to index.md), then try it again

Mouse and touch work too. Esc closes this.