Releases: lionellau/leptin
Release list
v1.4.0 — the personal-infrastructure release
Leptin is personal, local-first memory infrastructure for your coding agent — no account, no subscription, installs in ~30 seconds, and your agent can install it on itself. This release repositions around that vision and builds the self-install path to make it real. (It is not a SaaS memory component; the production-scale / governor-over-pgvector angle is deliberately de-prioritized.)
🤖 The agent installs itself
leptin setup [host]— one command: create the store, wire the hooks + MCP into your host config, and verify it. Prints a single PASS/FAIL line and exits non-zero on failure, so an agent can run it unattended.leptin connect --write— edits~/.claude/settings.jsondirectly instead of printing JSON to paste: timestamped.bakbackup, idempotent deep-merge that never clobbers your other servers/hooks, and refuses to touch a malformed file. Also--minimal(SessionStart + Stop) and--dry-run.leptin doctorhost-wiring check — confirms Leptin is actually wired in (MCP + hooks present, binary resolves); machine-readable via--jsonas a post-install gate.- AGENTS.md — written to the agent: when to install yourself, the exact commands, and how to operate.
Tell your agent: "You keep forgetting decisions we've changed — read AGENTS.md and give yourself persistent memory." It runs pip install … && leptin setup claude-code && leptin doctor --json and checks the result.
🧠 Agent-as-operator + a better free tier
- The MCP
instructionsand tool descriptions now speak to the agent about correctness-when-decisions-change ("callrecallbefore acting — your human may have reversed a decision you don't remember"), not token savings. - Free offline tier hardened, still zero-dependency: recall scores as
max(hash-cosine, word-overlap)so a clear lexical match isn't lost to hash-collision noise, and an absolute offline floor means a no-good-match query returns nothing instead of a confidently-wrong memory. The benchmark's governance share rose ~19% → ~33%.
🧭 Positioning swept clean
"Satiety hormone" and token-budget-as-hero are gone from every surface — package identity, CLI/MCP strings, dashboard, demo, TS client, pyproject metadata, CONTRIBUTING (host-installers are now the highest-leverage area; core deps stay [] forever), and LAUNCH (now discovery-first).
164 tests pass; correctness + footprint benchmarks green on Python 3.10–3.13.
Full changelog: https://github.com/lionellau/leptin/blob/main/CHANGELOG.md
v1.3.0 — the credibility release
We ran an 8-persona adversarial review — senior engineers who know agent context/memory and use Headroom — against Leptin, verified every critique against the code, and fixed what was real. The verdict: the wedge is genuine (correctness-of-state over time), but it was asserted, not measured, and oversold on the offline default. v1.3.0 makes it true, measured, and honestly scoped.
🩹 Correctness blockers fixed
- The flagship offline contradiction-supersede no longer no-ops on real edits. A graded detector confidently catches negation flips, antonyms, single-slot value swaps (
pnpm→bun,dark→light) and numeric reversals (14 days→30 days) — and stops burying a true fact on a loose numeric match (8 cpu coresvs32 gb ram). Conflicts it can't confidently resolve are flagged for review (leptin conflicts), never silently coexisting or wrongly deleted. Verify it:leptin bench --eval-contradiction→ precision 1.0, recall ~0.87, zero true facts buried. - The recall guardrail is no longer circular. It verifies the fact still resolves (not just that an id survived — catching a merge that drops a value), no longer carves "noise" out of its protected set, and reports
low_confidence/verbatim_probe_fractionso a lexical-embedder run is honest about its resolution. - Session-start injection respects the budget. Lessons are ranked and packed under a sub-budget (
+N morepointer) instead of growing unbounded; the push path now feeds the usefulness loop.
✨ Added
- Correctness-first benchmark — after a reversed decision, a naive store serves the outdated fact 100% of the time; Leptin 0% (0% recall loss). The token reduction is split into packing (budget+floor — the axis a compressor also helps) vs governance (dedup/supersede/decay — the wedge), so it can't proxy for correctness.
- Reframed flywheel — recurrence (a weak ranking tiebreaker) is separated from usefulness (explicit
record_feedback, now an MCP tool); oneharmfulmark only down-weights and is reversible. - Reversible + discoverable supersede (
leptin superseded), bounded/demotable candidate lessons with failure-gated auto-capture, embedder provenance + non-permanent hosted→local downgrade +leptin reembed, scale quick-tier (LRU cache, subject-scoped dedup), deterministic tuner split, normalized health score.
🧭 Changed (honesty)
Docs/positioning scoped to what the code actually does: offline limits named, the 66% attributed (packing vs governance), and "runs on top of YOUR store" softened to "a self-contained store with a correctness loop that runs alongside your compressor" — the external-store governor is on the roadmap, not shipped.
🗄️ Storage
Schema v5: recur_sessions, last_inject_at, embedder, conflicts_with — migrates in place, additive, reversible.
155 tests pass; correctness + footprint benchmarks green on Python 3.10–3.13.
Full changelog: https://github.com/lionellau/leptin/blob/main/CHANGELOG.md
v1.2.0 — the feedback-loop release
Leptin is a control loop for agent memory — it rides your coding agent's harness hooks (session-start, post-tool, pre-compact) to keep long-term memory correct and useful over time. This release sharpens that positioning and adds the loops that make the store get more correct and more relevant with use — the axis a plain store (Mem0) or a context-compressor (Headroom) doesn't cover.
📖 New design note: docs/loops.md — why Leptin runs on the harness (push), not as an MCP tool the model must remember to call (pull).
✨ New
- Auto mistake-capture (post-tool loop) — when a tool call fails, the
PostToolUsehook distills it into a never-decaying lesson automatically. Re-injected next session, so the agent doesn't repeat it. - Recall-usefulness flywheel — memories track inject / useful / harmful signals. What proves useful is reinforced; what's injected over and over but never useful becomes prune-eligible noise (under the recall guardrail). Close the loop by hand with
leptin feedback <id> [--harmful]. - Memory-health score —
leptin healthgrades the store 0–100 (A–D) on stale rate, noise rate, and harmful hits, with drift flags. Also surfaced indiet_report.
🔁 Changed
- README, docs, and package metadata re-cut around the control loop (harness + hooks) instead of the MCP surface; new loop diagram (
assets/loop.svg). - Auto-probes now treat importance as useful, not merely injected, so the guardrail no longer shields noise from its own safe pruning.
🗄️ Storage
- Schema v4 adds
inject_count,useful_count,harmful_count,last_inject_session— migrates in place, additive and reversible.
131 tests pass; offline benchmark green (≥60% fewer memory tokens at ≤2% recall loss).
Full changelog: https://github.com/lionellau/leptin/blob/main/CHANGELOG.md
Leptin v1.1.0 — memory that stays correct
Repositions Leptin from a token-saving store into a memory governor: keep long-term memory correct and current, and forget only when recall is provably preserved.
- Never-decaying lessons-learned, auto-injected at session start (your agent stops repeating mistakes).
- Memory typing (fact/procedural/task/lesson) + contradiction supersede (recall returns the current truth).
- Provenance anchoring +
leptin stale(a fact is confidently wrong once its source changes). - Lifecycle hooks for Claude Code + Codex (
leptin connect) — discipline runs via hooks, not model tools. - Lean MCP surface (recall + remember by default;
LEPTIN_MCP_TOOLS=allfor the rest). - Schema migrates v2→v3 in place. 122 tests. See CHANGELOG.
Leptin v1.0.0 — the satiety hormone for agent memory
First stable release. A drop-in MCP memory server for AI coding agents: token-budgeted recall, an auditable savings ledger, an identity-based recall guardrail, glass-box reversibility, and closed-loop self-tuning. Zero core dependencies, fully offline, 112 tests, CI on Python 3.10–3.13.
Headline: ≥60% fewer memory tokens at ≤2% recall loss — reproduce with leptin bench.
pip install leptin-mcp # or: uvx leptin-mcp serve
leptin init # prints the Claude Code / Codex MCP config block
See CHANGELOG.md for the full feature list.