Reproduce “User as Code: Executable Memory for Personalized Agents” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Bojie Li

User as Code (UaC) reframes personalized AI agent memory as an executable software project, representing user state as typed Python objects and rules as functions to enable complex reasoning and proactive alerting. The framework achieved 78.8% accuracy on the LOCOMO benchmark, 99.0% on analytical inference tasks, and 100% alert detection on standard active service scenarios, demonstrating improved capabilities over traditional retrieval-based memory systems.

Key insights

  • Unifying memory representation and verification through executable code enables advanced reasoning capabilities like precise analytical inference and deterministic enforcement of logical constraints that are challenging for retrieval-based systems.
  • Separating fact extraction (append-only) from periodic, full corpus code regeneration prevents information loss and facilitates the transition from raw conversational data to structured, typed memory.
  • The initial cost of structuring user memory into executable code is amortized over a few queries, leading to significant long-term cost savings and enabling capabilities for analytical and proactive tasks that are otherwise token-intensive or impossible.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.