Hatchery: agents that run SQL over raw event logs match memory systems

A post on hatchery.build, titled "The bitter lesson for agent memory", borrows Richard Sutton's argument from The Bitter Lesson: general methods such as search and learning outperform systems built with human domain knowledge. The authors say they found the same to be true of agent memory. Their claim is that letting an agent run SQL queries and search over its own event log beats or matches specialised memory systems in all major memory benchmarks, and that it scales with model intelligence.
The argument rests on where compression happens. The authors argue that memory systems lose task-relevant information when they compress raw events into a store, because they have to guess future queries in advance. Agentic search over an event log defers compression until query time. They propose a design built on a hierarchy of derived views over an immutable event log.
The post first surveys existing systems, sorting them by encoding, consolidation and retrieval, and by whether each step is open-loop or closed-loop. Mem0, Supermemory and Mastra are given as open-loop examples; Mem0 sends every new turn to an extraction model that distills atomic facts into a vector store and, at retrieval, injects the top_k matches into context. Claude, Codex and Letta use a hybrid: small closed-loop updates with shell and file tools during latency-sensitive work, and deeper consolidation in idle time. Letta researchers coined the term sleep time compute for that idle-time consolidation; Anthropic's version for managed agents is called dreaming; Codex summarises idle sessions into markdown files in a /memories directory.
The authors' own system has no encoding or consolidation step. For retrieval the agent runs SQL queries and FTS5 search over its own event logs. Benchmarks that span sessions use the Tardigrade library, which exposes four tools; single-session benchmarks use the log library, with three tools. The dreaming comparison follows Anthropic's approach: a reflection loop after every task and before the next, in which a dreaming agent writes notes and a wiki from the event log and task feedback. They chose five benchmarks covering different history types, sizes and tests, split into recall and transfer. Prompts for BEAM-100K, 500K and 1M were tuned on 20 questions from the BEAM-100K dataset. Models were GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna from OpenAI, plus Opus 5.5, Sonnet 5.5 and Haiku 5.5 from Anthropic for Continual Learning Bench.
On results, the authors say the raw-log approach sets the Pareto frontier on cost and accuracy, beating or matching both bare in-context learning and specialised memory systems. On DolphinBench, using what the post calls the leaderboard's GPT-5.6 Luna model, it scores 85.7% at $4.73. That compares with Graphon at 84.0% for $11.84 (less than half the cost) and Mem0 at 70.7% for $96.21 (a twentieth of the cost). It also leads LongMemEval V1 (94.6% on S, 92.2% on M) and all four BEAM context sizes up to 10M tokens. On LongMemEval V2 it scores 79.8%, close behind AgentRunbook-C at 81.2%, which also uses agentic search over raw transcripts, but with grep over files rather than SQL over events.
Scaling with model strength: on DolphinBench, moving from GPT-6 Luna to GPT-6.1 Terra and GPT-6.1 Sol lifts accuracy from 87.2% ($2.47) to 90.5% ($20.32) and 93.8% ($36.38), beating bare 500K in-context learning at every model tier for roughly a tenth of the cost. The gap widens with context size: going from GPT-6 Luna to GPT-6.1 Sol adds 6.4 points on BEAM-100K, 9.9 on BEAM-1M and 13.8 on BEAM-10M (53.2% to 67.0%), and the gain grows from 8.8 points on LongMemEval V1-S to 10.8 on V1-M. The authors say stronger models write better SQL, and that this translates directly into recall scores.
On Continual Learning Bench's database_exploration suite (40 stateful SQL episodes with a mid-run schema migration), raw logs alone roughly double the stateless baseline on frontier models: mean reward rises from 0.422 to 0.768 on Opus 5.5 and from 0.282 to 0.727 on GPT-6.1 Terra. Adding sleep-time wiki consolidation on top helps smaller and mid-tier models (+0.227 on Sonnet 5.5, +0.134 on Haiku 5.5, +0.118 on GPT-6 Luna). It shrinks to +0.039, within run-to-run spread, on GPT-6.1 Sol, and disappears on the strongest models (-0.004 on GPT-6.1 Terra, -0.011 on Opus 5.5). The authors read wikis as a scaffold for weaker models.
The discussion gives one worked example from Continual Learning Bench: find the mean deviation of electronics prices in a store inventory database, where the relevant table has three price columns after migration (prc, prc_usd and prc_v2). Sonnet 5.5, even with logs and a dreaming wiki, uses four DB queries and gets the wrong answer, because its notes had not saved which column to use after the migration. Opus 5.5 with raw logs is described as getting the answer in a single query; the text available breaks off there, mid-word.
Key facts
- The authors claim an agent that runs SQL and FTS5 search over its own raw event log beats or matches specialised memory systems on the major memory benchmarks they tested, with no encoding or consolidation step.
- On DolphinBench the raw-log approach scores 85.7% at $4.73, against Graphon at 84.0% for $11.84 and Mem0 at 70.7% for $96.21.
- On LongMemEval V2 it scores 79.8%, behind AgentRunbook-C at 81.2%, which uses grep over files; it leads LongMemEval V1 (94.6% on S, 92.2% on M).
- Gains from stronger models grow with context size: GPT-6 Luna to GPT-6.1 Sol adds 6.4 points on BEAM-100K and 13.8 on BEAM-10M (53.2% to 67.0%).
- Sleep-time wiki consolidation helps weaker models (+0.227 on Sonnet 5.5) but adds nothing measurable on the strongest ones (-0.004 on GPT-6.1 Terra, -0.011 on Opus 5.5).
Why it matters
Agent memory products are mostly built around encoding and consolidating past experience into stores such as vector embeddings, graphs or notes. This post argues the opposite: keep an immutable log and let the model search it when a question arrives, so nothing is thrown away on a guess about future queries. If the authors are right, a lot of memory engineering becomes unnecessary, and the case gets stronger as models improve. The post frames this as the Bitter Lesson applied to memory. The reported numbers also put cost next to accuracy: on DolphinBench the raw-log approach is cheaper than both Graphon and Mem0.
Who it affects
Teams building agent memory layers or choosing between memory products such as Mem0, Supermemory, Mastra and Letta. Developers whose agents already keep session transcripts or event logs. Anyone running long-horizon agents on OpenAI or Anthropic models, since the post compares model tiers and finds the log approach benefits more from stronger ones.
How to use it
The setup is plain: store every event in a log and give the agent tools for SQL queries and FTS5 full-text search over it. For work across sessions the authors used the Tardigrade library, which exposes four tools; for single-session work they used the log library, which exposes three. The post says the complete code for their setup is linked from the article; the link's URL is not in the text available here. The results suggest that on weaker or mid-tier models a sleep-time wiki consolidation step still adds value on Continual Learning Bench, while on the strongest models raw logs alone did as well.
How solid is it
The figures are the authors' own, from benchmarks they chose. The post names five, though the list is missing from the text available; the text names DolphinBench, LongMemEval V1 and V2, BEAM and Continual Learning Bench. Prompts for BEAM-100K, 500K and 1M were tuned on 20 questions from the BEAM-100K dataset, which the authors say matches how other systems run their benchmarks. The text names no author and no publication date. No independent replication or third-party review is mentioned. The text is truncated mid-sentence in the Discussion, so any conclusion or limitations section is not visible. The post also calls the DolphinBench model both the leaderboard's GPT-5.6 Luna (85.7%) and GPT-6 Luna (87.2%), and does not reconcile the two figures or names. The strongest result is mixed: on LongMemEval V2 the authors' system trails AgentRunbook-C, 79.8% to 81.2%.
Risks and caveats
The headline claim covers the benchmarks the authors picked, not memory tasks in general. The wiki result is reported as a scaffold effect that fades with model strength, and the +0.039 gain on GPT-6.1 Sol is described as within run-to-run spread, so small differences should not be over-read. The cost advantage is quoted per benchmark run; the stronger tiers cost more, with DolphinBench at $2.47, $20.32 and $36.38 for GPT-6 Luna, GPT-6.1 Terra and GPT-6.1 Sol. The worked example shows the failure mode of consolidated notes: Sonnet 5.5's wiki had not saved the right column after a schema migration, so it guessed wrong after four queries. The approach also relies on the model writing good SQL, which the authors say improves with model capability.
“Wikis act as a scaffold for weaker models, while stronger models reconstruct what they need better from the raw event log.”
— The bitter lesson for agent memory, hatchery.build