CodeMem: Architecting Reproducible Agents via Dynamic MCP and Procedural Memory
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Current tool-using AI agents suffer from limited action space, context inefficiency, and probabilistic instability that makes them unsuitable for handling repetitive tasks which are otherwise reliably and efficiently tackled by agentic workflows built on platforms like n8n and Zapier. Earlier works like CodeAct, DynaSaur, Code Mode have tried to tackle the first two issues by using the whole Python language as its action space: The number of tools that the agent can call becomes infinite. Python code blocks can execute complex actions into a single step and print only relevant results which helps in keeping the context lean. However, the probabilistic instability issue still remains, as for the same task in the same environment, the agent can follow different trajectories due to the probabilistic nature of LLMs. Therefore, we need procedural memory for consistency and reliability. This paper proposes CodeMem, an architecture to implement procedural memory via code which can be used to build and run reusable agentic workflows with deterministic reliability.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 4 of its 15 references that are in the map. First posted on arXiv 17 Dec 2025.
Builds on
4 of 15 references.
References · 4
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2024LightRAG: Simple and Fast Retrieval-Augmented Generationcited by 310
- 2024DynaSaur: Large Language Agents Beyond Predefined Actionscited by 30
- 2025Dynamic ReAct: Scalable Tool Selection for Large-Scale MCP Environmentscited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025LEGOMem: Modular Procedural Memory for Multi-agent LLM Systems for Workflow Automation
- 2025Memp: Exploring Agent Procedural Memory
- 2026PROJECTMEM: A Local-First, Event-Sourced Memory and Judgment Layer for AI Coding Agents
- 2026AdMem: Advanced Memory for Task-solving Agents
- 2026Agent Behavior as Code: Efficient and Robust LLM Agents with Programmatic Specifications
- 2024MOSS: Enabling Code-Driven Evolution and Context Management for AI Agents
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities
- 2026CONTRAMEM: Learning Self-Evolving Procedural Memory from Contrasting Multi-Model Trajectories