mlsanityData to 14 Oct 2026

User as Code: Executable Memory for Personalized Agents

arXiv 2606.16707 ↗First posted 15 Jun 2026cs.AIcited by 7

Not on the map. Why?

Abstract (arXiv)

A personalized AI agent needs a user memory: a persistent model of who the user is, built across many conversations and consulted on each new one. Today this memory is almost always stored as unstructured text, a knowledge graph, or a flat store of facts, and consulted by retrieval -- fetching the entries most similar to the current request. Such "bag-of-facts" memory recalls individual facts well, but because storing a fact and acting on it are separate steps, it struggles to resolve contradictions, aggregate over many records, or enforce rules. We argue that user memory should instead be executable. We introduce User as Code (UaC), a paradigm in which an agent's model of a user is a living software project: typed Python objects hold the user's state and ordinary Python functions encode the rules that govern it, so representing and reasoning about the user happen in one medium an interpreter can run. The enabling mechanism is a two-phase pipeline: an append-only log that never discards a fact, periodically checkpointed into typed code. This changes what memory can do. On standard long-term conversation benchmarks, UaC matches both a full-context upper bound and the strongest prior memory systems on recall (78.8% on LOCOMO). Its advantage emerges where representation matters most. On aggregate questions over a user's history -- "how many international trips did I take last year?" -- retrieval-based memory collapses (6-43%) while UaC stays near-perfect (99%), because the answer is a one-line computation over typed state rather than a search over text. And because its rules execute deterministically whenever the state changes, UaC can surface unsolicited, safety-critical alerts -- such as a newly prescribed drug that conflicts with an allergy recorded months earlier -- a capability query-driven memory cannot provide.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 44 of its 53 references that are in the map. First posted on arXiv 15 Jun 2026.

Builds on

44 of 53 references.

References · 44

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  4. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  5. 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
  6. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  7. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
  8. 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,210
  9. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  10. 2025A-MEM: Agentic Memory for LLM Agentscited by 1,063
  11. 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 779
  12. 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
32 more
  1. 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
  2. 2024Executable Code Actions Elicit Better LLM Agentscited by 564
  3. 2025Zep: A Temporal Knowledge Graph Architecture for Agent Memorycited by 400
  4. 2023Large Language Models as Tool Makerscited by 303
  5. 2025Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactionscited by 254
  6. 2025Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learningcited by 237
  7. 2025LightMem: Lightweight and Efficient Memory-Augmented Generationcited by 180
  8. 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
  9. 2025From Human Memory to AI Memory: A Survey on Memory Mechanisms in the Era of LLMscited by 124
  10. 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulatorcited by 123
  11. 2024Personalization of Large Language Models: A Surveycited by 104
  12. 2024Proactive Agent: Shifting LLM Agents from Reactive Responses to Active Assistancecited by 87
  13. 2026MemoryArena: Benchmarking Agent Memory in Interdependent Multi-Session Agentic Taskscited by 84
  14. 2024TroVE: Inducing Verifiable and Efficient Toolboxes for Solving Programmatic Taskscited by 75
  15. 2025MemOS: An Operating System for Memory-Augmented Generation (MAG) in Large Language Modelscited by 73
  16. 2025A Survey of Personalized Large Language Models: Progress and Future Directionscited by 71
  17. 2026Memory for Autonomous LLM Agents:Mechanisms, Evaluation, and Emerging Frontierscited by 65
  18. 2025Mem-α: Learning Memory Construction via Reinforcement Learningcited by 55
  19. 2026EverMemOS: A Self-Organizing Memory Operating System for Structured Long-Horizon Reasoningcited by 54
  20. 2026MAGMA: A Multi-Graph based Agentic Memory Architecture for AI Agentscited by 52
  21. 2026Skill-Pro: Learning Reusable Skills from Experience via Non-Parametric PPO for LLM Agentscited by 47
  22. 2025Hindsight is 20/20: Building Agent Memory that Retains, Recalls, and Reflectscited by 44
  23. 2026Graph-based Agent Memory: Taxonomy, Techniques, and Applicationscited by 25
  24. 2026PersistBench: When Should Long-Term Memories Be Forgotten by LLMs?cited by 21
  25. 2026Locomo-Plus: Beyond-Factual Cognitive Memory Evaluation Framework for LLM Agentscited by 19
  26. 2026ProAgentBench: Evaluating LLM Agents for Proactive Assistance with Real-World Datacited by 16
  27. 2026MemMachine: A Ground-Truth-Preserving Memory System for Personalized AI Agentscited by 16
  28. 2025ENGRAM: Effective, Lightweight Memory Orchestration for Conversational Agentscited by 15
  29. 2026Beyond the Context Window: A Cost-Performance Analysis of Fact-Based Memory vs. Long-Context LLMs for Persistent Agentscited by 15
  30. 2026FadeMem: Biologically-Inspired Forgetting for Efficient Agent Memorycited by 14
  31. 2026Toward Personalized LLM-Powered Agents: Foundations, Evaluation, and Future Directionscited by 14
  32. 2025VERAFI: Verified Agentic Financial Intelligence through Neurosymbolic Policy Generationcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 7.

7 papers.