SEAIDec 17, 2025

CodeMem: Architecting Reproducible Agents via Dynamic MCP and Procedural Memory

arXiv:2512.15813v12 citationsh-index: 1
Originality Incremental advance
AI Analysis

This addresses the issue of unreliable repetitive tasks for users of AI agents, though it is incremental as it builds on prior work like CodeAct.

The paper tackles the problem of probabilistic instability in tool-using AI agents by proposing CodeMem, an architecture that uses procedural memory via code to enable deterministic reliability in reusable agentic workflows.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes