iGEN
Visit IGEN World Explore IGEN Expo
EXPLORE UPGRADE PLANS
BREAKING
Telegram Blocked in India for NEET Exam, But Remains Accessible via VPN FTAs, Agri-Start-ups and FPOs to Drive Next Phase of Farm Export Growth: APEDA Chief India's mango exports reach 45 countries; US shipments likely to grow over 30% this season: APEDA MSC denies report of Hapag-Lloyd acquisition talks; carrier says claim 'not true or correct' Tin Prices Poised to Rule Elevated in 2026 on Semiconductor Demand and Supply Disruptions India must boost oilseed yields to cut edible oil imports, SEA chief says India Air Freights 5 Tonnes of Medical Aid to Afghanistan Under Humanitarian Assistance Tsakos Joins Greek Capesize Ordering Wave at Hengli Heavy Industries How US quietly kept Gulf crude moving despite Iran's Hormuz blockade Rupee Rebounds 31 Paise to 94.29 as Easing Oil, Dollar Index Boost Sentiment Telegram Blocked in India for NEET Exam, But Remains Accessible via VPN FTAs, Agri-Start-ups and FPOs to Drive Next Phase of Farm Export Growth: APEDA Chief India's mango exports reach 45 countries; US shipments likely to grow over 30% this season: APEDA MSC denies report of Hapag-Lloyd acquisition talks; carrier says claim 'not true or correct' Tin Prices Poised to Rule Elevated in 2026 on Semiconductor Demand and Supply Disruptions India must boost oilseed yields to cut edible oil imports, SEA chief says India Air Freights 5 Tonnes of Medical Aid to Afghanistan Under Humanitarian Assistance Tsakos Joins Greek Capesize Ordering Wave at Hengli Heavy Industries How US quietly kept Gulf crude moving despite Iran's Hormuz blockade Rupee Rebounds 31 Paise to 94.29 as Easing Oil, Dollar Index Boost Sentiment
Home ›› Technology ›› Ai ›› User as Code: Executable Memory Paradigm Boosts AI Agent Personalization with Deterministic Execution

User as Code: Executable Memory Paradigm Boosts AI Agent Personalization with Deterministic Execution

A new arXiv preprint introduces User as Code (UaC), a paradigm where AI agent user memory is stored as executable Python code rather than unstructured text. On benchmarks, UaC achieves 78.8% recall on LOCOMO and 99% accuracy on aggregate questions, while enabling unsolicited safety alerts that retrieval-based systems cannot provide.

iG
iGEN Editorial
June 16, 2026
User as Code: Executable Memory Paradigm Boosts AI Agent Personalization with Deterministic Execution

Enterprise AI agents struggle to maintain consistent, actionable user memory across conversations. A new research paper from arXiv, authored by Li and Bojie, introduces a paradigm called User as Code (UaC) that stores user profiles as executable Python programs, enabling deterministic reasoning and proactive safety-critical alerts.

The Problem with Retrieval-Based Memory

According to the paper, current personalized AI agents almost always store user memory as unstructured text, a knowledge graph, or a flat store of facts. They consult this memory by retrieval — fetching entries most similar to the current request. The authors label this approach "bag-of-facts" memory, which recalls individual facts well but struggles to resolve contradictions, aggregate over many records, or enforce rules. Because storing a fact and acting on it are separate steps, the memory cannot compute derived answers or trigger alerts without explicit query.

How User as Code Works

UaC reimagines user memory as a living software project. In this paradigm, typed Python objects hold the user's state, and ordinary Python functions encode the rules that govern that state. Representation and reasoning happen in one medium that 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 means the memory is executable — the AI can run the code to compute answers or enforce rules automatically.

Benchmark Performance

On standard long-term conversation benchmarks, UaC matches both a full-context upper bound and the strongest prior memory systems on recall. Specifically, it achieves 78.8% recall on the LOCOMO benchmark. However, its advantage emerges where representation matters most. On aggregate questions over a user's history — for example, "how many international trips did I take last year?" — retrieval-based memory collapses, scoring between 6% and 43%, while UaC stays near-perfect at 99%. The reason, the paper explains, is that the answer is a one-line computation over typed state rather than a search over text.

Metric Retrieval-Based Memory User as Code (UaC)
LOCOMO recall Comparable to UaC (78.8%) 78.8%
Aggregate query accuracy 6% – 43% 99%

Moreover, because UaC's rules execute deterministically whenever the state changes, it can surface unsolicited, safety-critical alerts — such as a newly prescribed drug that conflicts with an allergy recorded months earlier. The paper notes this is a capability that query-driven memory cannot provide.

Implications for Enterprise AI

For enterprise technology leaders, UaC offers a framework for building AI agents that maintain reliable, computable user profiles. Instead of sifting through conversational logs, agents can execute code to enforce compliance rules, aggregate usage patterns, or detect conflicts in real time. The use of typed Python objects and deterministic functions means that memory is auditable and testable — critical for regulated industries. While the research is still at the preprint stage, the architecture points toward more robust personalization in customer service bots, internal knowledge assistants, and any system requiring persistent, actionable user context.


Sources:

Keep Reading

Recommended Stories

CLoVE: New Federated Learning Algorithm Clusters Loss Vectors for Personalization Technology

CLoVE: New Federated Learning Algorithm Clusters Loss Vectors for Personalization

Researchers propose CLoVE (Clustering of Loss Vector Embeddings), a novel clustered federated learning algorithm that groups clients based on loss patterns. It achieves high cluster recovery in few rounds and state-of-the-art accuracy across supervised and unsupervised tasks.

June 16, 2026
AutoDojo: Adaptive Attacks Expose Superficial Defenses and Structural Limits in LLM Agents Technology

AutoDojo: Adaptive Attacks Expose Superficial Defenses and Structural Limits in LLM Agents

The AutoDojo framework adaptively optimizes indirect prompt injections against LLM agent defenses, revealing that many current defenses are superficial. Against a filter that reduces static attack success rate to 0%, AutoDojo recovers 28% overall and 64% on action-open tasks due to a structural limitation where injections can pose as ordinary data.

June 16, 2026
LectūraAgents Multi-Agent Framework Promises Adaptive Personalized AI-Assisted Learning Technology

LectūraAgents Multi-Agent Framework Promises Adaptive Personalized AI-Assisted Learning

Researchers propose LectūraAgents, a multi-agent framework for adaptive personalized AI-assisted learning. It uses a hierarchical architecture with a ProfessorAgent leading specialized agents to generate and deliver tailored lecture content with embodied teaching actions. The system was validated on diverse courses and showed gains in content quality and personalization.

June 16, 2026
CoffeeBench: New Benchmark Evaluates LLM Agents in Multi-Agent Economic Simulations Technology

CoffeeBench: New Benchmark Evaluates LLM Agents in Multi-Agent Economic Simulations

Researchers introduce CoffeeBench, a benchmark for evaluating LLM agents in a long-horizon multi-agent economy. The 90-day simulation features farmers, roasters, and retailers, with models controlling one roaster. All models outperformed a passive baseline, but Claude Haiku 4.5 showed an idle-drift failure mode.

June 16, 2026