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

AuthorsDongge Han, Camille Couturier, Daniel Madrigal Diaz et al.

2025

TL;DR

LEGOMem uses modular full task memories and subtask memories to guide multi agent planning and tool use, boosting OfficeBench success by up to 13.38 percentage points over no memory.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

Multi agent workflows are stateless and discard prior trajectories

Current multi agent LLM systems are largely stateless and transactional, solving each task from scratch without reusing prior experience.

This limits procedural memory for workflow automation, so orchestrators and task agents repeatedly fail complex OfficeBench tasks instead of improving execution skills over time.

HOW IT WORKS

LEGOMem: Modular procedural memory for multi agent systems

LEGOMem introduces procedural memory bank, full task memories, and subtask memories, plus the LEGOMem-Dynamic and LEGOMem-QueryRewrite variants for fine grained retrieval.

You can think of LEGOMem like a card catalog of past workflows, where orchestrators pull whole task cards and agents pull Lego like subtask bricks.

This design lets LEGOMem reuse structured execution traces beyond a plain context window, enabling better planning, delegation, and tool use in multi agent workflows.

DIAGRAM

LEGOMem vanilla inference loop for multi agent execution

This diagram shows how LEGOMem retrieves memories and allocates them to orchestrator and task agents during Algorithm 1 multi agent execution.

DIAGRAM

OfficeBench evaluation and ablation pipeline for LEGOMem

This diagram shows how LEGOMem is trained and evaluated on OfficeBench, including memory curation, team configurations, and ablation settings.

PROCESS

How LEGOMem Handles a OfficeBench task execution

  1. 01

    Offline memory construction

    LEGOMem runs the LLM team without memory on 148 training tasks, extracting 93 successful trajectories into the procedural memory bank and 250 subtask memories.

  2. 02

    Memory retrieval and allocation

    For a new task, LEGOMem embeds the task description, retrieves top K full task memories, and assigns corresponding subtask memories to each task agent.

  3. 03

    Multi agent execution loop

    LEGOMem orchestrator generates an initial plan, selects task agents, and uses subtask memories to guide tool use and summarize observations back to the orchestrator.

  4. 04

    Replanning and final response

    If progress stalls, LEGOMem orchestrator replans using full task memories, then continues until the environment state satisfies the goal and returns the final answer.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    LEGOMem modular procedural memory

    LEGOMem introduces a procedural memory bank with full task memories and subtask memories, enabling role aware reuse of 93 successful trajectories and 250 subtask traces.

  • 02

    LEGOMem variants for retrieval

    LEGOMem defines LEGOMem-Dynamic and LEGOMem-QueryRewrite to explore subtask level retrieval, including just in time retrieval and query rewriting for agent specific memory banks.

  • 03

    Systematic study of memory placement

    LEGOMem provides ablations on orchestrator memory and task agent memory, showing orchestrator memory raises LLM team success from 45.83% to 53.29% even without agent memories.

RESULTS

By the Numbers

Overall success rate

58.44%

+12.61 over No memory (LLM team overall 45.83%)

SLM overall success

38.16%

+13.38 over No memory SLM team (24.78%)

Hybrid overall success

50.22%

+14.91 over No memory Hybrid team (35.31%)

Level 3 LLM success

47.46%

+14.13 over No memory LLM Level 3 (33.33%)

These metrics come from OfficeBench, a 300 task office automation benchmark split into 148 training and 152 test tasks, evaluating multi step workflows across three difficulty levels. The gains show that LEGOMem makes multi agent systems substantially more reliable than stateless baselines by reusing procedural memories.

BENCHMARK

By the Numbers

These metrics come from OfficeBench, a 300 task office automation benchmark split into 148 training and 152 test tasks, evaluating multi step workflows across three difficulty levels. The gains show that LEGOMem makes multi agent systems substantially more reliable than stateless baselines by reusing procedural memories.

BENCHMARK

Performance comparison across memory variants, task levels, and multi agent teams

Overall success rate on OfficeBench test set for SLM team configurations.

BENCHMARK

Memory placement mechanisms across LEGOMem variants

Overall success rate on OfficeBench for Hybrid (LLM + SLM) team under different memory placements.

KEY INSIGHT

The Counterintuitive Finding

Hybrid teams with LEGOMem-QueryRewrite reach 50.22% overall success, surpassing the memory less LLM team at 45.83% on OfficeBench.

This is surprising because it breaks the assumption that larger LLM only teams always dominate, showing procedural memory can compensate for smaller task agents.

WHY IT MATTERS

What this unlocks for the field

LEGOMem lets multi agent systems accumulate reusable procedural skills, so orchestrators and task agents improve planning, delegation, and tool use over time.

Builders can now deploy smaller or hybrid teams that match or exceed larger LLM teams by plugging in LEGOMem as a modular procedural memory layer.

~13 min read← Back to papers

Related papers

BenchmarkAgent Memory

Active Context Compression: Autonomous Memory Management in LLM Agents

Nikhil Verma

· 2026

Focus Agent adds start_focus, complete_focus, a persistent Knowledge block, and an optimized Persistent Bash plus String-Replace Editor scaffold to actively compress context during long software-engineering tasks. On five hard SWE-bench Lite instances against a Baseline ReAct agent, Focus Agent achieves 22.7% token reduction (14.9M → 11.5M) while matching 3/5 = 60% task success.

Questions about this paper?

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

Answers use this explainer on Memory Papers.

Checking…