You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ A personal memory system for coding agents. Built for Claude Code; lives outside
10
10
11
11
## Why this exists
12
12
13
-
Each agent session resets from zero. The memory features that exist today — `CLAUDE.md`, Cursor rules, ChatGPT memory, the various provider built-ins — are *there* but rarely used, and when they do fire they often feel pointless: shallow grep against a static rules file, no judgment about what's worth remembering vs what isn't, no idea what's stale, no composition with the current turn. I was tired of teaching the same agent the same thing on day 17.
13
+
The memory features that exist today — `CLAUDE.md`, Cursor rules, ChatGPT memory, the various provider built-ins — are *there* but I always felt they did not surface the lessons that had been learned well enough. They seem to be rarely useful, bloat the context, get ignored and when they fire they often feel trivial: shallow grep against a static rules file, no judgment about what's worth remembering vs what isn't, no idea what's stale, no composition with the current turn. I was tired of teaching the same agent the same thing over and over and I did not want to have to manually curate an ever changing set of shared knowledge per project and globally.
14
14
15
-
So I wondered what could be achieved if you stopped optimising for token cost first. Real memory is salience-gated at write time, decays without reinforcement, mutates on retrieval, resists deletion of high-arousal traces, and uses different mechanisms for different latencies (ambient familiarity, deliberate recall, fast suppression). So we took the neurology seriously and built towards it — a curator pair (Sonnet + Opus) gating writes by surprise magnitude; three retrieval tiers each tuned to a different cognitive analog; surfacing-aware decay with optional arousal pinning; an opt-in mutation/reconsolidation pathway; archive-don't-delete so contradictions can resurrect old traces. Tokens cost something, but less than the friction of repeating yourself.
15
+
So I wondered what could be achieved with a much more advanced system. There are obviously many alternatives but none had all the features that I wanted. Real memory is salience-gated at write time, decays without reinforcement, mutates on retrieval, resists deletion of high-importance traces, and uses different mechanisms for different latencies (ambient familiarity, deliberate recall, fast suppression). So we took the neurology seriously and built towards it — a curator pair (currently Sonnet + Opus) gating writes by surprise magnitude; three retrieval tiers each tuned to a different cognitive analog; surfacing-aware decay with optional arousal pinning; an opt-in mutation/reconsolidation pathway; archive-don't-delete so contradictions can resurrect old traces. Tokens cost something, but less than the friction of repeating yourself.
16
16
17
17
Ultan watches your conversations as you work, learns your preferences and conventions, and surfaces them when they matter. It's the "remember when you told me to always use uv" that you wish Claude already did natively, except organised, deduplicated, validated, and proactively consulted before the agent interrupts you to ask something you've already answered.
18
18
@@ -107,7 +107,8 @@ cd ../tools/search && uv sync
107
107
# machine — it listens on ~/.agent-mem/priming.sock and answers Tier-1
108
108
# priming requests from every hook on every project.
109
109
cd /path/to/ultan/daemon && uv run agent-mem-daemon -v
110
-
# (nohup, tmux, or a launchd plist if you want it persistent — Phase 4 work.)
110
+
# (nohup, tmux, or a launchd plist if you want it persistent — auto-supervision
111
+
# not yet implemented.)
111
112
112
113
# 5. Open Claude Code in any project (no per-project setup needed once the
113
114
# hooks are global) and work normally. Entries land under
@@ -126,6 +127,7 @@ Everything Ultan owns lives under **`~/.agent-mem/`** on your local disk — no
126
127
|`~/.agent-mem/.bm25.idx`, `.embeddings.idx`| Search indexes over the library. Rebuilt automatically when the library changes. |
See *Storage on disk* below for the full layout including the folders inside `knowledge/`.
@@ -234,7 +236,7 @@ agent-mem/
234
236
README.md ← this file
235
237
daemon/ ← the long-lived event-ingest daemon
236
238
agent_mem_daemon/ ← package
237
-
tests/ ← 177 pytest tests
239
+
tests/ ← pytest suite (see Status below for current count)
238
240
pyproject.toml ← uv-managed
239
241
src/ ← Phase-0 hook layer (forked from claude-memory-compiler)
240
242
hooks/ ← UserPromptSubmit, PostToolUse, Stop, ...
@@ -278,7 +280,7 @@ Storage on disk:
278
280
279
281
-**Librarian (Sonnet)** runs after each session's quiet period (per-session debounce, default 30s). With moderate activity that's ~10-30 invocations per working day per project. Each is a few thousand input tokens (prompt + library snapshot + buffer) plus a few hundred output tokens.
280
282
-**Scholar (Opus)** runs in batches — every 3 Librarian packets or 60s, whichever first. Each batch is one Opus call: prompt + accumulated proposals, ~30s wall time, ~$0.20-0.50 per batch on pay-as-you-go pricing.
281
-
-**Ambient priming (Tier 1)** is daemon-side BM25 + embeddings, **no LLM cost**, but it injects up to 500 chars into every UserPromptSubmit — call it ~150 tokens of prompt overhead per turn.
283
+
-**Ambient priming (Tier 1)** is daemon-side BM25 + embeddings + cross-encoder rerank, **no LLM cost**, but it injects up to 1500 chars into every UserPromptSubmit — call it ~400 tokens of prompt overhead per turn.
282
284
-**Advisor (`/ultan-advisor`)** is one Sonnet call (Librarian step) + one Opus call (Scholar synthesis) per invocation. ~$0.30-0.50 each.
283
285
-**PreToolUse Tier 3** is pure deterministic regex match, **no LLM cost**, sub-100ms.
0 commit comments