Table of Contents
Fetching ...

LEGOMem: Modular Procedural Memory for Multi-agent LLM Systems for Workflow Automation

Dongge Han, Camille Couturier, Daniel Madrigal Diaz, Xuchao Zhang, Victor Rühle, Saravan Rajmohan

TL;DR

LEGOMem tackles statelessness in multi-agent LLM workflow systems by introducing modular procedural memory, split into full-task and subtask memories stored in a semantic memory bank. The framework operates offline memory construction and online retrieval to augment planning for the orchestrator and execution guidance for task agents, with three retrieval variants (vanilla, dynamic, query rewrite). Experiments on OfficeBench show that orchestrator memory is crucial for planning and delegation, while fine-grained agent memory boosts execution accuracy, enabling smaller models to approach or surpass larger ones. The work provides a practical framework and a research tool to study memory design for multi-agent workflow automation, with implications for continual learning and scalable tool use.

Abstract

We introduce LEGOMem, a modular procedural memory framework for multi-agent large language model (LLM) systems in workflow automation. LEGOMem decomposes past task trajectories into reusable memory units and flexibly allocates them across orchestrators and task agents to support planning and execution. To explore the design space of memory in multi-agent systems, we use LEGOMem as a lens and conduct a systematic study of procedural memory in multi-agent systems, examining where memory should be placed, how it should be retrieved, and which agents benefit most. Experiments on the OfficeBench benchmark show that orchestrator memory is critical for effective task decomposition and delegation, while fine-grained agent memory improves execution accuracy. We find that even teams composed of smaller language models can benefit substantially from procedural memory, narrowing the performance gap with stronger agents by leveraging prior execution traces for more accurate planning and tool use. These results position LEGOMem as both a practical framework for memory-augmented agent systems and a research tool for understanding memory design in multi-agent workflow automation.

LEGOMem: Modular Procedural Memory for Multi-agent LLM Systems for Workflow Automation

TL;DR

LEGOMem tackles statelessness in multi-agent LLM workflow systems by introducing modular procedural memory, split into full-task and subtask memories stored in a semantic memory bank. The framework operates offline memory construction and online retrieval to augment planning for the orchestrator and execution guidance for task agents, with three retrieval variants (vanilla, dynamic, query rewrite). Experiments on OfficeBench show that orchestrator memory is crucial for planning and delegation, while fine-grained agent memory boosts execution accuracy, enabling smaller models to approach or surpass larger ones. The work provides a practical framework and a research tool to study memory design for multi-agent workflow automation, with implications for continual learning and scalable tool use.

Abstract

We introduce LEGOMem, a modular procedural memory framework for multi-agent large language model (LLM) systems in workflow automation. LEGOMem decomposes past task trajectories into reusable memory units and flexibly allocates them across orchestrators and task agents to support planning and execution. To explore the design space of memory in multi-agent systems, we use LEGOMem as a lens and conduct a systematic study of procedural memory in multi-agent systems, examining where memory should be placed, how it should be retrieved, and which agents benefit most. Experiments on the OfficeBench benchmark show that orchestrator memory is critical for effective task decomposition and delegation, while fine-grained agent memory improves execution accuracy. We find that even teams composed of smaller language models can benefit substantially from procedural memory, narrowing the performance gap with stronger agents by leveraging prior execution traces for more accurate planning and tool use. These results position LEGOMem as both a practical framework for memory-augmented agent systems and a research tool for understanding memory design in multi-agent workflow automation.

Paper Structure

This paper contains 29 sections, 4 figures, 3 tables, 1 algorithm.

Figures (4)

  • Figure 1: LEGOMem framework overview and example memory. The multi-agent system consists of an orchestrator and task agents. The orchestrator performs planning, next agent selection, and subtask allocation, while task agents execute subtasks by interacting with the environment via API tool calls. (Note: For clarity, additional task agents such as Word agent are omitted.)
  • Figure 2: Comparison of LEGOMem variants: (a) LEGOMem-Dynamic dynamically retrieves subtask memories during execution, and (b) LEGOMem-QueryRewrite employs query rewriting to retrieve multiple candidate memories for each subtask.
  • Figure 3: Qualitative example of agent execution with and without memory. The memory-less team fails to identify the earliest email due to incomplete planning, stopping after reading the first email, while the team with LEGOMem systematically reads to obtain and compare all email timestamps, producing the correct answer.
  • Figure 4: Ablations study: execution steps comparison for different LEGOMem memory placement for LLM teams. (a) shows that LEGOMem variants reduce the number of execution steps required, with up to 16.2% reduction for Level 3 tasks. (b) shows lower failure rates of steps, indicating more reliable task execution with procedural memory.