---
format: "aidr-story-markdown/v1"
id: "d675ad5b276b0b10577b8c0eca2cdd3ab68392797b0f87848f7acdd0cb873727"
canonical_url: "https://aidr.today/d675ad5b?lang=en"
title: "I accidentally turned LLM memory into program analysis"
lang: "en"
requested_lang: "en"
available_langs: ["en","vi"]
translation_fallback: null
fallback_fields: []
published_at: "2026-08-28T23:27:45.000Z"
category: "Research"
topics: ["llm","agent","reasoning","benchmark"]
source_urls: ["https://pwning.systems/posts/llm-memory-program-analysis/","https://news.ycombinator.com/item?id=49485416"]
summary: "Why I stopped trying to give LLM agents a better memory and instead built Lemmalog, a Datalog engine that maintains an agent's knowledge as analysis state, with provenance, retractions and incremental evaluation, plus what happened when I benchmarked it on LongMemEval and LoCoMo."
---

# I accidentally turned LLM memory into program analysis

> [Open the canonical story](<https://aidr.today/d675ad5b?lang=en>)

**Published:** 2026-08-28T23:27:45.000Z
**Category:** Research
**Topics:** llm, agent, reasoning, benchmark

## Summary

Why I stopped trying to give LLM agents a better memory and instead built Lemmalog, a Datalog engine that maintains an agent's knowledge as analysis state, with provenance, retractions and incremental evaluation, plus what happened when I benchmarked it on LongMemEval and LoCoMo\.

## Sources

- [Story source](<https://pwning.systems/posts/llm-memory-program-analysis/>)
- [Discussion](<https://news.ycombinator.com/item?id=49485416>)

