Skip to content

Raw event logs beat specialized memory systems and cut agent bill twentyfold

Share
Raw event logs beat specialized memory systems and cut agent bill twentyfold

Listen to this article

Read by Anchor

Before you buy or build a specialized memory layer for AI agents in your company in the Gulf, Egypt or the Levant, it may be enough to let the agent search directly in its raw logs. That is what an experimental study published by “Hatchery” concluded, showing that enabling the agent to run SQL queries and full-text search over the original event log outperforms or matches specialized memory systems on five key metrics, while reducing cost to a fraction of one-twentieth compared with one of the most popular such systems.

The study starts from a clear technical fact: language models suffer a kind of progressive forgetting, as they do not form long-term memory and their knowledge stops at the training cutoff date. To fill this gap, developers have traditionally built systems that preprocess conversations by summarising them or converting them into semantic vectors as in the “Mem0” system, temporal graphs as in “Supermemory”, or timestamped summaries as in “Mastra”. However, this upfront engineering pushes the processing ahead of when it is needed, causing fine-grained details that may later become critical to be lost.

Based on the “raw lesson” principle formulated by researcher Richard Sutton, which holds that general methods such as search and learning outperform systems designed with prior human knowledge, Hatchery tested a simpler approach.This approach postpones data compression until the moment of query itself, keeping an immutable raw event log and giving the agent a closed-loop search toolkit.In a single session the agent uses the “log” library to browse the log and perform full-text search via SQLite FTS5 and run SQL queries, while the “Tardigrade” library grants it search and read permissions across multiple prior sessions.

The numbers on the five measurement criteria reveal the gap clearly. On the DolphinBench benchmark, which includes 600 tasks, the raw-log approach achieved 85.7 % accuracy at a cost of only $4.73 using the GPT-5.6 Luna model, outperforming the Graphon system, which recorded 84.0 % at $11.84, and Mem0, which managed 70.7 % at a cost that rose to $96.21. The same approach also topped the LongMemEval V1 benchmark with 94.6 % on the small version and 92.2 % on the medium version, led across all sizes of the BEAM benchmark up to ten million tokens, and scored 79.8 % on LongMemEval V2, behind AgentRunbook-C’s 81.2 % which also relied on direct search in raw texts.

Nevertheless, the results do not eliminate the need to organise knowledge for complex cumulative tasks. The study distinguishes between literal fact retrieval and transferring learned rules to new situations, which it tested via the Continual Learning Bench by adding a “dream” loop after each task to update an internal wiki based on the original log, similar to what Claude, Codex and Letta systems do during idle periods.Notably, this method improves automatically as the model’s intelligence increases, because a more capable agent writes more precise queries without re-engineering the memory layer.

For engineers and technical product leaders, this shift moves the focus from purchasing intermediate memory tools or maintaining complex summarisation pipelines to designing clean, queryable event logs. Each repeated background extraction cycle adds inference cost and latency, whereas a permanent log allows exact context retrieval only when needed without losing details midway.

What does this mean for the region

For startups and development teams in the Gulf, Egypt and the Levant, these findings reshape the economics of building long-lived agents. In projects already burdened by high inference costs, discarding repeated extraction layers in favour of direct SQL-based search in logs reduces the memory bill to a modest portion and redirects budget toward stronger foundation models, whose retrieval quality improves automatically.

At the skill and compliance level, the simpler architecture aligns better with regulated sectors in the region such as banks and government agencies. Instead of relying on compressed summaries that might omit important details, a queryable raw log remains an exact audit trail that can be inspected and reviewed, raising the value of data-engineering and SQL expertise relative to assembling complex memory tools.

Don't miss the next story

Subscribe for updates