AI agent memory via event logs: simpler design, better results, and what it means for mobile apps

Short answer

Hatchery published research on 2 December 2026 showing that an AI agent can remember context better by simply querying its own immutable event log than by using heavyweight memory systems that encode events into summaries or vector embeddings. The event log approach lets the agent run SQL queries and full-text search over everything it has seen, deferring compression until query time. It matched or beat specialized memory systems in all major benchmarks. For product teams building AI assistants or agents into mobile apps, the opportunity is simpler memory design (append-only log plus search tools) instead of building encoding, extraction, and consolidation pipelines. The privacy consideration is that a full log of user actions and agent responses persists everything, so plan retention, encryption, and user control from the start.

Sources: Hatchery (2 Dec 2026) and the Hacker News discussion.

Planning an AI assistant for your mobile app?

What the research shows

On 2 December 2026, Arjun Kumar from Hatchery published research titled "The bitter lesson for agent memory." The post draws on Richard Sutton's observation that general methods like search and learning outperform systems built with human domain knowledge. Kumar tested whether the same holds for agent memory.

The team built a memory system without encoding or consolidation. The agent stores an immutable event log and queries it with SQL and SQLite FTS5 full-text search when it needs context. That system beat or matched specialized memory systems in all major memory benchmarks and, the post says, scales with model intelligence.

The post benchmarks the approach against systems that encode events into vector embeddings (Mem0), temporal graphs (Supermemory), summaries and notes (Mastra, compaction systems), and git-backed memory stores (Letta, Claude). The raw log approach performed as well or better across the board, with less engineering.

The event log approach

Instead of building a memory system that extracts, encodes, and consolidates information from agent turns into a compressed store, the event log approach is simpler:

  1. Append every event to an immutable log. User messages, agent responses, tool calls, results, errors — everything goes into the log.
  2. Give the agent tools to query the log. The Hatchery setup uses SQLite with FTS5 full-text search and SQL for structured queries.
  3. Let the agent decide what to retrieve. When the agent needs context, it runs queries until it has enough task-relevant information.

For multi-session scenarios, the setup exposed four tools: sessions_list, sessions_search (FTS5 search across all past sessions), sessions_read (read a verbatim window of turns from one session), and sessions_query (run SQL against the global sessions index). For single-session scenarios, it used three tools: describe (inspect event types and schemas), search (FTS5 search), and query (SQL).

Memory system Encoding Consolidation Retrieval
Compaction Open-loop summary at context limit None Open-loop (prepended summary)
Mem0 Open-loop per-turn extraction to vectors None Open-loop (top_k search)
Letta / Claude Closed-loop (shell / file tools) Open-loop (sleep / dreaming) Closed-loop (pinned files + search)
Raw event log None (append-only) None Closed-loop (SQL + FTS5)

The post also describes a "dreaming" variation where, after every task, an idle agent runs a reflection loop to build a wiki from the log. That approach layered a consolidation step on top of the raw log and improved results further. Even without it, the raw log alone matched or beat the other systems.

Why it works and what it trades off

The post argues that memory systems lose task-relevant information during compression. When an encoding step distills a conversation into atomic facts or a summary, it must decide what to keep. That decision happens before the agent knows what it will need. In contrast, agentic search over an event log defers compression until query time. The agent retrieves exactly what it needs, nothing more and nothing less.

The trade-off is storage and query cost. An immutable log grows linearly with every event. Encoding systems compress that into a fixed-size store or bounded vector index. For short-lived sessions, storage is cheap. For long-lived agents, retention policies and archival become part of the design.

What the Hacker News discussion raised

The Hacker News thread was short but supportive. Commenters noted that the approach mirrors how human memory works: we store experiences in full and reconstruct what we need at query time. One commenter asked about privacy: an immutable log of everything the user did is a large attack surface. Another raised the question of how to handle log corruption or versioning when the event schema changes. The post does not address those concerns.

What this means for your mobile app and business

If you are building an AI assistant, in-app agent, or AI-powered support feature into a mobile app, the event log approach offers a simpler architecture than heavyweight memory systems. Here is a practical checklist:

  1. Store an append-only event log. Use SQLite (iOS and Android both support it natively) or a similar local database. Log every user message, agent response, tool call, and result.
  2. Enable FTS5 for search. SQLite's FTS5 extension provides full-text search over the log. The agent can search for keywords, phrases, or patterns.
  3. Give the agent query tools. Let it run SQL queries for structured questions (e.g., "how many times did the user ask about payments?") and FTS5 search for semantic retrieval.
  4. Plan retention and privacy from the start. An immutable log of user interactions is powerful but sensitive. Decide how long to keep events, whether to encrypt the log at rest, and how users can delete their data.
  5. Consider local-first storage for privacy. If the log stays on-device and never syncs to a server, the user controls it. If you sync to a server for multi-device access, encryption and clear user consent are essential.
  6. Test graceful degradation. If the log gets large, query performance can degrade. Set a retention policy (e.g., keep the last 90 days) or archive older events.

The event log approach is especially relevant for apps with AI-powered features that need context: fintech apps with spending advisors, sports apps with personalized coaching, or ticketing apps with purchase history lookups. Our Application Engineering practice builds iOS, Android, and AI-powered products, and we help teams architect for privacy and maintainability. The AI-assisted app development guide covers related trade-offs, and the California chatbot law AB 1609 post discusses another compliance angle for in-app AI. If you want to design an agent memory system that is simple, effective, and privacy-respecting, we are happy to help.

Frequently asked questions

What is the event log approach to AI agent memory?

Instead of encoding and compressing events into summaries or vector embeddings, store an immutable log of everything the agent did and let the agent query it with SQL and full-text search when it needs context. The research shows this beats or matches specialized memory systems in all major benchmarks.

Why is an event log better than vector embeddings for agent memory?

The Hatchery post argues that encoding steps like vector embeddings or summaries lose task-relevant information during compression. The event log approach defers that decision to query time, so the agent retrieves exactly what it needs without information loss.

What are the privacy risks of storing agent event logs?

An immutable log of every user action and agent response can expose sensitive information if leaked or accessed improperly. For mobile apps, consider retention policies, encryption, local-only storage, and clear user control over what is remembered.

How can a mobile app use this approach?

Instead of building complex memory extraction and consolidation systems, give the agent tools to search and query its own interaction log. Use SQLite FTS5 for search and SQL for structured queries. This works for in-app assistants, support bots, and AI-powered features.

Planning an AI assistant for your mobile app?

Tell us what your app does and what your assistant should remember. We will outline a memory architecture, privacy controls, and a local-first implementation plan.

We'll get back to you shortly. We use your details only to reply to this request.