@readmodelmag
MODEL

Tools

Agent memory tip: keep the raw log, and quote your searches

SummaryA new Hatchery essay says an agent searching its own raw event log beat or matched specialised memory systems. We built the pattern with plain SQLite and hit one gotcha: 3 of 3 raw search strings threw errors.

· MODEL Editors · 3 min read

Some links may be affiliate links. Disclosure

MODEL card on a cream background. Red kicker: BUILDER TIP / AGENT MEMORY. Large red text: 3 of 3. Black headline: raw search strings threw SQLite errors. Bottom left: MODEL. Bottom right: Sources: MODEL test, Dec 2 2026; Hatchery essay.
Our own test results, December 2, 2026. Illustration by MODEL. Original. Image source.

Most AI agent memory products work the same way: they boil past conversations down into facts, summaries or a graph, then feed the best matches back to the model. A new essay from Hatchery argues you can skip most of that.

In "The bitter lesson for agent memory," published December 2, Arjun Kumar describes a memory system with no extraction and no summaries. Every turn goes into an event log. The agent gets tools to run full-text search (SQLite FTS5) and read-only SQL over that log, and looks things up when it needs them. "Agentic search over an event log defers compression until query time," he writes.

What Hatchery reports. These are Hatchery's own runs, with its code published on GitHub:

  • On DolphinBench (600 tasks), the raw-log agent scored 85.7% for $4.73. The benchmark's official results list Mem0 at 70.7% (424 of 600) for $96.21 with the same model.
  • It leads its LongMemEval V1 and BEAM comparisons. On LongMemEval V2 it was second, 79.8% vs 81.2%, behind another system that also searches raw transcripts.
  • Stronger models wrote better queries. On the 10-million-token BEAM test, going from the smallest to the largest model they tried added 13.8 points (53.2% to 67.0%).
  • A nightly "dreaming" pass that writes wiki notes helped smaller models but added nothing on the strongest ones in their test.

What we did. We built the basic pattern in Python using only the built-in sqlite3 module (SQLite 3.46.1). No model, no memory product.

  • We wrote 10,000 events into an append-only table, with an FTS5 index kept in sync by a trigger. Triggers block UPDATE and DELETE. Total size: 1.2 MB, written in about 135 ms.
  • At turn 12, a user mentions that staging Postgres moved to port 5433. A "last 50 turns" window, a simple stand-in for a trimmed context, no longer had it.
  • A search for staging postgres port returned turn 12 as the top hit in under 2 ms.
  • The agent's query connection was opened read-only. DELETE and UPDATE both failed with "attempt to write a readonly database."

The gotcha. We passed three ordinary search strings straight into FTS5's MATCH. All three threw errors instead of results:

  • read-only gave "no such column: only"
  • port:5433 gave "no such column: port"
  • staging db? gave "fts5: syntax error near "?""

Hyphens, colons and question marks mean something in FTS5's query language. SQLite's FTS5 docs say an unquoted search term may only use letters, digits, underscores and non-ASCII characters, and "strings that include any other characters must be quoted." Agents type these characters all the time. Wrapping each search term in double quotes fixed it: "read-only" and "port:5433" both found turn 12.

The tip. If you're building agent memory:

  • Keep every turn and tool result in an append-only log before you summarize anything.
  • Give the agent a search tool and a read-only SQL tool over that log.
  • Quote each search term before it hits MATCH, or catch the error and retry with quotes.
  • Add summaries or caches later, as shortcuts that point back to the raw log.

The catch. We did not run a model or reproduce any benchmark. Our test checks the plumbing, not how well an agent uses it. Hatchery's scores are its own runs, and the essay ends by pitching Hatchery's own service for benchmarking memory systems.

Not sponsored. No affiliate links. Test script and output are from MODEL's own run on December 2, 2026.

Get three tested tools every Friday

Free, weekly. Unsubscribe anytime.

Sources

  1. The bitter lesson for agent memory (Arjun Kumar, Dec 2 2026)

    Hatchery

  2. Arjun Kumar on the essay (X post, Dec 2 2026)

    X

  3. DolphinBench official results: Hermes + GPT 5.6 Luna + Mem0

    GitHub (mem0ai/dolphinbench)

  4. agent-memory-benchmarks (Hatchery's benchmark code)

    GitHub

  5. SQLite FTS5 extension: full-text query syntax

    SQLite

FREE · EVERY WEEK

The top AI tools this week, tested.

Every week MODEL's editors pick the AI tools worth your time, try them hands-on, and tell you what's good, what's not, and who it's for. Free, in your inbox.

Free. Unsubscribe anytime. Our picks are editorial and can't be bought.