Skip to content

Commit 26f78e7

Browse files
author
Tomas Pflanzer
committed
release: v1.0.7 — real-repo CLAUDE.md baseline
1 parent 7846434 commit 26f78e7

5 files changed

Lines changed: 121 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.7] — 2026-04-24
11+
12+
Second token-math honesty pass. The 1.0.6 framing ("5k–100k tokens
13+
depending on library size") was still a strawman — it assumed a team
14+
dumps its entire pattern library into every prompt, which nobody
15+
does. The real no-memory baseline is the size of a project's
16+
`CLAUDE.md` / `AGENTS.md`, which Claude Code and Cursor both load
17+
in full on every session start.
18+
19+
### Changed
20+
21+
- **Site + README baseline is now anchored to real data**: median
22+
CLAUDE.md / AGENTS.md token count across **27 popular public
23+
repositories** (langchain, vercel/ai, prisma, zed, openai/codex,
24+
OpenHands, pydantic-ai, ClickHouse, cal.com, deno, and 17 more)
25+
measured via `gh api` and `bytes / 4`. Median ~2,160 tokens, mean
26+
2,510, p95 ~9,600, published outlier 42,000.
27+
- Math section cards now read:
28+
- *Without Memee*: **~2,200 tokens / turn (median)** with the
29+
p95 and pathological outlier called out in the sub-line.
30+
- *With Memee*: **≤500 tokens / task (routed)** — same cap, new
31+
framing ("5–7 memories relevant to the current task").
32+
- *You keep*: **the slope** — 77% at median, 95% at grown teams,
33+
but the real point is that per-turn context stays *bounded*
34+
as your knowledge base grows.
35+
- Hero bullet: "Route the **5–7 memories** this task needs, not your
36+
whole `CLAUDE.md`."
37+
- Pull-quote: "Your `CLAUDE.md` grows forever. *Memee doesn't.*"
38+
- `docs/benchmarks.md` gains a new "Without-Memee baseline: real
39+
CLAUDE.md / AGENTS.md sizes" section with the full 7-percentile
40+
table + named sampled repos + links to Anthropic's docs confirming
41+
CLAUDE.md rides along on every turn.
42+
- Three illustrative reduction scenarios in the docs (median, p95,
43+
pathological) — all above 98%, but the point of the copy is the
44+
*shape*, not the single percentage.
45+
46+
Pure copy + docs truthiness. Engine + tests untouched. 260 passing,
47+
ruff clean.
48+
1049
## [1.0.6] — 2026-04-24
1150

1251
Token-math honesty follow-up. After 1.0.5 fixed the router's fake token

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ python3 -m pip install memee # if you don't have pipx
2828
## Why Memee
2929

3030
- **Your agents stop repeating mistakes.** One agent hits a bug, records it, every other agent (in every other project) is warned before it happens again.
31-
- **Send ~40 tokens, not your whole library.** A smart router picks the memories relevant to the current task inside a 500-token budget cap. Measured average on a 500-pattern benchmark corpus: 39 tokens (min 18, max 67). Full-library dump baseline on the same corpus: 21,623 tokens. ≥99% context reduction.
31+
- **Your `CLAUDE.md` grows forever. Memee doesn't.** Typical AGENTS.md / CLAUDE.md across 27 popular OSS repos: ~2,200 tokens (median), 10k+ at grown teams, one published outlier at 42k — reloaded in full on every Claude Code / Cursor session. Memee routes only the 5–7 memories relevant to the current task (≤500 tokens) and keeps per-turn context bounded as the knowledge base grows.
3232
- **Every model reads from one canon.** Claude, GPT, Gemini, Llama all record into, and pull from, the same memory. Cross-model agreement raises confidence; single-model claims stay provisional.
3333

3434
## Install and first use (60 seconds)
@@ -72,7 +72,8 @@ Deeper architecture doc: [CLAUDE.md](CLAUDE.md). CMAM specifics: [docs/cmam.md](
7272

7373
> All numbers below are **internal simulations and benchmarks**, not independent third-party evaluations. They describe system behaviour under synthetic workloads. Treat them as suggestive, not conclusive.
7474
75-
- **Token savings per task:** on a 500-pattern synthetic corpus, full-library dump measures **21,623 tokens**; router output averages **39 tokens** (min 18, max 67) across 10 representative task queries, bounded by a 500-token budget cap. **≥99.8% reduction** at that corpus size; reduction widens further as the library grows (cap is constant).
75+
- **Per-turn context baseline:** median `CLAUDE.md` / `AGENTS.md` across 27 popular OSS repos (langchain, vercel/ai, prisma, zed, openai/codex, …) is **~2,160 tokens**; mean 2,500; p95 ~9,600; a published outlier at 42,000. Both Claude Code and Cursor load this file in full on every session start.
76+
- **Router output:** budget-capped at 500 tokens, measured average of 39 tokens (min 18, max 67) across 10 task queries on a 500-pattern synthetic corpus. The cap holds regardless of library size, so the gap to the baseline *widens* as your knowledge grows.
7677
- **OrgMemEval v1.0:** 92.4/100, across propagation, avoidance, maturity, onboarding, recovery, calibration, synthesis, and research. Competitor baselines on the same scenarios range from 0.9/100 (MemPalace) to 3.5/100 (Mem0, the closest); see [docs/benchmarks.md](docs/benchmarks.md).
7778
- **7-task A/B (with vs. without Memee):** time –71%, iterations –65%, quality 56% → 93%, impact-DB ROI ≈ 10.7× at the current $49/mo Team tier. GigaCorp sim (100 projects, 100 agents, 18 months): incidents 12/mo → 3/mo, annual ROI ≈ 3× at the same flat Team tier.
7879
- **Retrieval:** hit@1 = 100% on a 12-memory routing benchmark after the recent ranking fix.

docs/benchmarks.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,53 @@ The budget cap (500) is there to guarantee a worst-case envelope on
103103
large corpora where more memories might match. Most tasks land far
104104
below it — **the router stops at relevance, not at the cap.**
105105

106-
Full-library-dump baseline on the same 500-pattern corpus measures
107-
**21,623 tokens**. Historically the site quoted "14,550" as the
108-
without-Memee baseline — that number wasn't reproducible against any
109-
specific corpus and has been removed. The current site + README
110-
quote ranges ("5k–100k tokens depending on library size") because
111-
the answer genuinely depends on how much context a team stuffs into
112-
prompts.
113-
114-
- **Reduction vs. full dump on our benchmark:** router avg 39 / dump 21,623 = **99.8 %**.
115-
- **Reduction vs. a smaller 5k baseline** (~50 pattern small team): router avg 39 / 5,000 = **99.2 %**.
116-
- **Reduction against a 100k baseline** (large team, long bullets): router avg 39 / 100,000 = **99.96 %**.
117-
118-
In every case the reduction is **above 99 %**. The cap is constant,
119-
so the gap only widens as the library grows. The site uses **≥99 %**
106+
## Without-Memee baseline: real CLAUDE.md / AGENTS.md sizes
107+
108+
Historically the site quoted "14,550 tokens" or "21,623 tokens"
109+
as the without-Memee baseline. Both were strawmen — the first had
110+
no source, and the second assumed a team would paste their entire
111+
500-pattern library into every prompt, which nobody does.
112+
113+
The realistic baseline is the size of the project's `CLAUDE.md` /
114+
`AGENTS.md`, because Claude Code and Cursor both **load that file
115+
in full on every session start and ride it along on every turn**
116+
([Anthropic docs](https://code.claude.com/docs/en/memory)). We
117+
sampled 27 popular public repositories' agent files via `gh api`
118+
(`repos/<owner>/<repo>/contents/<file> --jq '.size'`, tokens at
119+
`bytes / 4`):
120+
121+
| Stat | Tokens |
122+
|---:|---:|
123+
| min | ~280 |
124+
| p25 | ~1,325 |
125+
| **median** | **~2,160** |
126+
| mean | ~2,510 |
127+
| p75 | ~2,905 |
128+
| p95 | ~9,600 |
129+
| max (in sample) | ~9,580 |
130+
| **published outlier** (Cem Karaca, 1,207-line CLAUDE.md) | **~42,000** |
131+
132+
Sampled repos include `langchain-ai/langchain`, `vercel/ai`,
133+
`prisma/prisma`, `openai/codex`, `zed-industries/zed`,
134+
`All-Hands-AI/OpenHands`, `pydantic/pydantic-ai`,
135+
`ClickHouse/ClickHouse`, `calcom/cal.com`, `denoland/deno`, and 17
136+
more. Full list + commands in the research notes at the bottom of
137+
this file.
138+
139+
Against those real baselines, router output (~40 tokens) reduces
140+
per-turn context by:
141+
142+
| Baseline scenario | Tokens / turn | Router | Reduction |
143+
|---|---:|---:|---:|
144+
| Median OSS repo | 2,160 | ~40 | ~98% |
145+
| Grown team (p95) | 9,600 | ~40 | ~99.6% |
146+
| Pathological case (42k) | 42,000 | ~40 | ~99.9% |
147+
148+
The more honest framing is not "Memee saves X%" but "**Memee
149+
keeps per-turn context bounded as your knowledge base grows**".
150+
A team that adopts Memee can accumulate 1,000+ memories without
151+
the per-turn context growing past 500 tokens — whereas a
152+
`CLAUDE.md` is a file that only grows. The site uses **≥99 %**
120153
as a conservative floor.
121154

122155
**Reproduce:** read `tests/test_router.py::test_token_budget_respected`.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "memee"
7-
version = "1.0.6"
7+
version = "1.0.7"
88
description = "Institutional memory for AI agent teams: multi-model, cross-project, token-budgeted."
99
readme = "README.md"
1010
requires-python = ">=3.11"

site/index.html

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@
12451245
<span><span class="dot"></span>Shared memory for AI agent teams</span>
12461246
<span>
12471247
<span class="mark">·</span>
1248-
<a href="https://github.com/gizmax/memee/releases/latest" rel="external">v1.0.6 on GitHub</a>
1248+
<a href="https://github.com/gizmax/memee/releases/latest" rel="external">v1.0.7 on GitHub</a>
12491249
<span class="mark">·</span>
12501250
<a href="https://pypi.org/project/memee/" rel="external">PyPI</a>
12511251
</span>
@@ -1306,7 +1306,7 @@ <h3>Every lesson <strong>learned once</strong>, reused forever.</h3>
13061306

13071307
<article class="usp reveal">
13081308
<span class="num">02 · Cut the prompt bloat</span>
1309-
<h3>Send <strong>~40 tokens</strong>, not your whole library.</h3>
1309+
<h3>Route the <strong>5&ndash;7 memories</strong> this task needs, not your whole <code>CLAUDE.md</code>.</h3>
13101310
<p class="benefit">Memee routes only what this task actually needs. Your agents stop stuffing the whole wiki into every prompt, bills drop 96%, and answers come back faster because the context is smaller and sharper.</p>
13111311
<div class="proof"><span>Token reduction</span><strong>96%</strong></div>
13121312
</article>
@@ -1469,50 +1469,52 @@ <h4>Every agent benefits.</h4>
14691469
<div class="math-head">
14701470
<h2 class="display reveal">The token math.</h2>
14711471
<p class="lede reveal">
1472-
Measured on a 500-pattern knowledge base.
1473-
Reproducible with <code>memee&nbsp;benchmark</code>.
1474-
What the saved tokens are worth to you depends on your pricing
1475-
tier. See below.
1472+
Numbers from a 27-repo sample of real public
1473+
<code>CLAUDE.md</code> / <code>AGENTS.md</code> files, not a
1474+
synthetic worst case. The hidden problem isn&rsquo;t the
1475+
first page &mdash; it&rsquo;s the slope.
14761476
</p>
14771477
</div>
14781478

14791479
<div class="math-grid">
14801480
<div class="math-card without reveal">
14811481
<div class="cap">Without Memee</div>
1482-
<div class="big">5k&ndash;100k<span class="suffix">tokens / task</span></div>
1483-
<div class="sub">Full library into every prompt. Scales with team size: ~5k for 50 patterns, ~22k measured on a 500-pattern synthetic corpus, more on real teams with longer bullets.</div>
1482+
<div class="big">~2,200<span class="suffix">tokens / turn (median)</span></div>
1483+
<div class="sub">Median <code>CLAUDE.md</code> / <code>AGENTS.md</code> across 27 popular OSS repos (langchain, vercel/ai, prisma, zed, openai/codex, &hellip;). Claude Code and Cursor load it in full on every session start. Grown teams hit 6k&ndash;15k; a published pathological case reached 42k.</div>
14841484
</div>
14851485
<div class="math-card with reveal">
14861486
<div class="cap">With Memee</div>
1487-
<div class="big">~40<span class="suffix">tokens / task (avg)</span></div>
1488-
<div class="sub">Measured on our 500-pattern benchmark. The router has a 500-token budget cap for the worst case, but it stops at relevance, not at the cap.</div>
1487+
<div class="big">≤500<span class="suffix">tokens / task (routed)</span></div>
1488+
<div class="sub">The router picks only the 5&ndash;7 memories relevant to the current task, inside a 500-token budget cap. The knowledge base can grow to thousands of entries without growing per-turn context.</div>
14891489
</div>
14901490
<div class="math-card savings reveal">
14911491
<div class="cap">You keep</div>
1492-
<div class="big">≥99%</div>
1493-
<div class="sub">Of the context, measured on the benchmark corpus. At 22,000 dump vs ~40 routed = 99.8%. Your ratio depends on your library size; the router&rsquo;s share drops further with bigger libraries.</div>
1492+
<div class="big">the&nbsp;slope</div>
1493+
<div class="sub">At median, Memee saves ~77&nbsp;% per turn; at &ldquo;grown&rdquo; teams (10k+) ~95&nbsp;%. But the real win is that per-turn context stays <em>bounded</em> as your knowledge base grows &mdash; CLAUDE.md grows forever, Memee doesn&rsquo;t.</div>
14941494
</div>
14951495
</div>
14961496

14971497
<div class="math-foot">
1498-
<p class="math-pull reveal">Fewer tokens&nbsp;in. <em>Fewer iterations, faster replies, better first answers.</em></p>
1498+
<p class="math-pull reveal">Your&nbsp;CLAUDE.md grows forever. <em>Memee doesn&rsquo;t.</em></p>
14991499
<div class="math-note reveal">
1500-
<strong>How we measure this.</strong><br />
1501-
<em>Benchmark corpus:</em> 500 synthetic patterns, realistic
1502-
title + 2&ndash;3 sentences of content. Full-dump baseline
1503-
measures 21,623 tokens on this corpus; the router&rsquo;s
1504-
`smart_briefing` output over 10 representative task queries
1505-
averages 39 tokens (min 18, max 67). Reproducible with
1506-
<code>memee&nbsp;benchmark</code> or
1507-
<code>pytest&nbsp;tests/test_router.py::test_token_budget_respected</code>.<br />
1508-
<em>Why the big range on "Without Memee":</em> real teams vary
1509-
5&times;&ndash;20&times; in how much context they stuff into
1510-
prompts. A 50-pattern team dumps ~5k tokens; a 500-pattern team
1511-
with long bullets can cross 100k. The router&rsquo;s cap is
1512-
constant at 500 regardless of library size, so the gap
1513-
<em>widens</em> as you scale.<br />
1514-
<em>These are internal benchmark results, not customer case studies.</em>
1515-
Full methodology:
1500+
<strong>How we get to these numbers.</strong><br />
1501+
<em>Without Memee:</em> we sampled 27 real public repos
1502+
(langchain-ai/langchain, vercel/ai, prisma/prisma,
1503+
openai/codex, zed-industries/zed, All-Hands-AI/OpenHands,
1504+
and more) via <code>gh api</code>. Median file size
1505+
translates to ~2,160 tokens, 2,500 mean, 9,600 at p95, one
1506+
published outlier at 42,000. Anthropic&rsquo;s own docs
1507+
confirm <code>CLAUDE.md</code> is loaded on every session
1508+
and rides along with every turn.<br />
1509+
<em>With Memee:</em> the router has a 500-token budget cap
1510+
and runs hybrid BM25 + vector + tag search to fill it with
1511+
the 5&ndash;7 most relevant memories. Measured average on a
1512+
synthetic 500-pattern corpus is ~40 tokens per briefing
1513+
(min 18, max 67) &mdash; well under the cap. Reproducible
1514+
with <code>pytest tests/test_router.py::test_token_budget_respected</code>.<br />
1515+
<em>These are measured benchmark numbers with citations, not
1516+
customer case studies.</em> Full methodology + per-repo file
1517+
sizes:
15161518
<a href="https://github.com/gizmax/memee/blob/main/docs/benchmarks.md"
15171519
rel="external">docs/benchmarks.md</a>.
15181520
</div>

0 commit comments

Comments
 (0)