Agents
User as Code: Executable Memory for Personalized Agents
The paper introduces "User as Code" (UaC), a novel paradigm for personalized AI agents that transforms user memory into executable code, utilizing typed Python objects to represent user state and functions to encode governing rules. This approach allows for improved performance on long-term conversation benchmarks, achieving 78.8% recall on LOCOMO and near-perfect accuracy (99%) on aggregate questions regarding user history, significantly outperforming traditional retrieval-based memory systems. UaC's deterministic execution of rules enables proactive safety alerts, enhancing the reliability and functionality of personalized AI agents for practitioners.
personalizeduser memoryAI agents