arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.15813cs.SEcs.AI
收藏

CodeMem: 通过动态MCP和程序记忆构建可重复的智能体

CodeMem: Architecting Reproducible Agents via Dynamic MCP and Procedural Memory

Nishant Gaurav, Adit Akarsh, Tejas Ravishankar, Manoj Bajaj

AI总结:

CodeMem通过动态MCP和程序记忆架构,解决智能体在重复任务中的概率不稳定性问题,实现可靠的工作流构建与运行。

摘要:

当前的工具使用AI智能体存在动作空间有限、上下文效率低下和概率不稳定的问题,这些问题使得它们无法处理本应由基于n8n和Zapier等平台构建的智能体工作流可靠而高效处理的重复性任务。早期的工作如CodeAct、DynaSaur、Code Mode尝试通过将整个Python语言作为动作空间来解决前两个问题:代理可以调用的工具数量变得无限。Python代码块可以将复杂动作整合到单一步骤中,并只打印相关结果,这有助于保持上下文简洁。然而,概率不稳定性问题仍然存在,因为在相同任务和相同环境中,由于LLM的随机性,代理可能会遵循不同的轨迹。因此,我们需要程序记忆来保证一致性和可靠性。本文提出了CodeMem,一种通过代码实现程序记忆的架构,可用于构建和运行可重用的智能体工作流,具有确定性的可靠性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑