Multimodal Filesystem Memory for Long-Horizon Embodied Agents

Chloe Su1,2 Jiahan Li3 Zhenting Qi1 Chaoran Cheng4 Haoyu Chen1 Sejoon Jun5 Weirui Ye6 Yilun Du1,2

1Harvard   2Kempner Institute   3NYU   4UIUC   5NEU   6MIT

Paper Code How it works Results

21 of the 24 milestones. Our agent—MFM with Claude Opus 5.5—playing the Ender Dragon task over 58 minutes at real-time game speed. Click any lit milestone to jump straight to it. A separate hill-climbing experiment. This video is outside the paper's main benchmark, which caps each life at 36,000 steps (see Results). Here we raised the step budget to 80,000 steps per life and ran a four-life chain. Each life inherited the memory and tools of earlier lives, and Nether lives started at a fortress. Where baseline methods had already plateaued, MFM kept climbing with a larger step budget and additional lives.

IWhy long games need memory

We drop an LLM into a Minecraft world. It sees only first-person frames and plays in turns: each turn, it looks at the latest frame and outputs a short sequence of raw keyboard and mouse actions for the environment to execute. In the Ender Dragon task, it has a step budget of 36,000 steps—about half an hour of play—to progress through 24 milestones from punching its first tree to defeating the dragon. What makes this so challenging comes down to memory.

What it needs is out of view

The agent may walk past an exposed iron vein early on and need it thousands of steps later—long after the vein has vanished from the screen and the context window.

Mistakes compound

Every milestone builds on the ones before it. Falling into lava wipes out the agent's entire inventory, and the exact same hazard will kill it again unless it remembers what went wrong.

Skills are learned in play

We give the agent no built-in procedures—not for tunneling, not for fighting a blaze, not even for walking to a block. It has to spot which action sequences work and save them as reusable procedures for this life and the next.

Without persistent memory, all three base models we tested stall around milestone 6 of 24. The core question is what to keep from tens of thousands of steps of experience—and how the agent can find the right detail again when it matters.

IIHow agents remember

Agent memory generally follows a few designs. We can compare them on a single question from our runs: in its first life, the agent spots an iron vein deep underground; tens of thousands of steps later, in its second life, it needs iron again. Where was that vein?

  1. 1

    Context window

    The model reads recent steps directly from its prompt.

    KeepsOnly the last few frames and messages.

    Finds things byReading its active prompt.

    LosesEverything older than the context window.

    The iron veinGone—it scrolled out of context tens of thousands of steps ago.

  2. 2

    Text memory

    The agent writes notes, summaries, or logs, and searches them by keyword or similarity.

    KeepsOnly what the agent thought to put into words.

    Finds things bySearching its text notes.

    LosesUnwritten details and what the scene actually looked like.

    The iron veinCoordinates if noted, but not what the tunnel entrance looks like.

  3. 3

    Frame memory

    Every frame is saved on disk so the agent can inspect it later.

    KeepsEvery frame it ever saw.

    Finds things byTurn or frame number.

    LosesThe way back—it has to already know when it saw the target.

    The iron veinBuried somewhere among thousands of unindexed frames.

  4. 4

    Multimodal filesystem memory

    MFM indexes every recorded frame under searchable cues and stores the agent's notes and procedures beside it.

    KeepsEvery action's frame, state, and outcome—indexed by when, where, and what happened—plus the agent's own notes, procedures, and plan.

    Finds things byQuerying the text cues, then opening the matching frames.

    LosesNothing recorded. Notes can be wrong, so each one cites the episodes behind it.

    The iron veinQuery the location, open the past frame, and compare it side by side with the live view.

Text is easy to search but strips away visual detail; raw frames preserve everything but are hard to search. MFM keeps the raw frames and places a lightweight text index over them: a quick query leads straight back to the original image, and the agent files its notes and procedures right beside the evidence.

We store memory as ordinary files because long-horizon tasks demand it. Memory has to outlast a single life so the next life can build on it. It quickly grows too large to fit in a prompt, so the agent opens only the specific frames it needs. It keeps separate files for places, knowledge, and plans—updating each independently—and the entire folder can be handed directly to a fresh agent, as we show in Section VII. Remembering “I already placed three blocks” needs none of this; surviving across tens of thousands of steps does. Next, we follow our agent back to that iron vein.

IIIHow MFM works

We store the agent's memory as plain files in its workspace, organized into the five kinds of memory shown in Figure 2 of our paper. As the agent plays, the harness writes two of them automatically: episodic memory—one episode per action with its frame, state, outcome, and a line of cues in index.jsonl—and spatial memory, a grid of visited coordinates. The agent writes the other three itself: semantic notes, reusable procedures it can call as actions, and a working plan. In its first life, all three start empty. We provide no built-in procedures and no reflexes (the guards that monitor a running plan)—only raw keyboard and mouse actions—so every procedure the agent calls is one it wrote itself after observing how the world responded. During its turn, it reads and updates all five using standard shell commands, and when a life ends, the whole directory carries over to the next life.

The interactive figure below replays about 160 steps from the second life of a GPT-6-Astra agent on Ender Dragon. Guided by its first life's memory, the agent digs straight to the iron vein and mines it at step 8,992—whereas life 1 did not reach iron until step 18,231. Every frame, command, and file line comes directly from the recorded run. Stages 1 to 4 repeat on every turn, and stage 5 runs when a life ends. Watch it play through, or click any stage to inspect it.

Life 2 · step 8,833

Environment Minecraft

The agent's view at step 8,833: the stone wall of the stair it is digging underground.

statex −2953.4  y 18  z −5605.4

Memory filesystem ./

Written by the harness every step, never edited

Episodicepisodes/ · index.jsonl
what happened, and what it looked like
Spatialgrid.jsonl

Written by the agent read every turn, revised as it learns

Semanticmine/GUIDE.md
facts and places
Proceduralmine/procedures/
procedures it can call as actions
Workingmine/working.md
the plan for the next turns

previous/life_1/ · 3,035 episodes

Agent GPT-6-Astra

It searches its memory, looks at the frames it finds, writes down what it learns, and plans its next actions.

actions, executed in the environment

Each turn goes through four stages: the harness records what happened, and the agent retrieves, consolidates and acts. When a life ends, the memory carries over to the next life.

Open step 8,963 in the explorer
The paper's Figure 2, with the files of each kind of memory
Figure 2 of the paper. The environment records every step into the memory filesystem: episodic memory with one directory per episode and an index of cues, and spatial memory with a grid; the agent-written semantic, procedural and working memory under mine/. The agent retrieves by searching cues, locating episodes and inspecting the evidence, and consolidates episodes into knowledge, procedures and a plan.
Figure 2 of the paper.

In the interactive explorer below, you can scrub through complete runs step by step—including this one.

IVExplore a run

We selected 2 recorded runs so you can watch the agent play alongside its evolving filesystem memory. Press Play: gameplay runs on the right while the five memory boxes populate on the left. Click any box or file to inspect its exact contents at that step, and click again to return. The Ender Dragon run is the second life shown above, reaching 16 of 24 milestones within 36,000 steps. The Diamond run is a GPT-6-Astra life starting from scratch with raw actions only—no built-in procedures and no reflexes. Its prompts also carried no [RECALL] block, so anything it took from its past it looked up itself. It wrote two procedures and one reflex of its own, copied a second reflex from an example in its skill files, and mined the diamond at step 8,389 of 12,000.

About this replay

Everything shown here is the exact record written by the harness and the agent: the rows of index.jsonl, the spatial grid, the log, and the files under mine/. Pause or scrub to any step to inspect the workspace at that moment, or run a query over the memory as it stood then using the agent's own search rules. Exported directly by scripts/export_demo.py—nothing is simulated and no model is called.

  • The index is a file, and the query is a filter. MFM computes no embeddings and ranks nothing. index.jsonl has one row per closed episode, and tools/episodes.py selects rows by step range, by distance from a point, by tag, by action, or by text found in the episode's files. Filters combine with AND, and results come back in the order they were recorded.
  • The query box runs a port of that tool. It was checked against this run: each episodes.py call the agent made was re-run over the index as it stood at that turn and compared, line for line, with the output the run recorded.
  • Replaying the harness's files is exact. The index, the grid and the log are append-only and every row carries its step, so the memory at step s is the rows written by step s.
  • The agent's own files are rebuilt from its patches. The run keeps only the final mine/ files. Their history here comes from the apply_patch calls in the session record, and is shown only when replaying those patches gives back the final file exactly.
  • The video is the run's own recording, one frame per step. The page takes its step from the frame on screen, so the memory on the left is always the memory at the moment the video shows.
  • Frames are reduced. The stored frames are PNG; the page shows JPEG copies no larger than 320×180. Recorded command output is cut at 6,000 characters. Reference and skill files, and images the agent made, are listed and not included.
  • The tool differs between runs. Each run carries its own copy of tools/episodes.py, and the query box accepts the flags of the copy the chosen run had. Where a run carried the memory of earlier lives, the export has the index of those lives and not their episode files, so --previous returns their rows without the harness notes.
  • One run. Each entry in the list is a single recorded life. It shows how the memory is built and read, and says nothing about how often the agent succeeds.
Loading the run…

VResults

We evaluate MFM against the same agent without persistent memory (Direct) and two recent long-horizon memory systems, PRO-LONG and VISTA, across three base models. In Minecraft (MCU-AgentBeats), Mine Diamond from Scratch spans 10 milestones within a 12,000-step budget, and Ender Dragon spans 24 milestones within 36,000 steps. In CUABench-KiCad, the agent designs and edits circuits in the KiCad desktop app using screenshots, mouse, and keyboard, scored from 0 to 1 per task. Every setting is run across three seeds; bars show the mean and whiskers show one standard deviation.

Mine Diamond milestones reached, of 10
Table
ModelDirectPRO-LONGVISTAMFM
GPT-5.6-Sol4.0 ± 1.08.0 ± 1.09.3 ± 0.69.7 ± 0.6
Claude Opus 56.0 ± 1.08.0 ± 1.08.7 ± 0.69.3 ± 0.6
GPT-6-Astra6.3 ± 0.69.3 ± 0.69.7 ± 0.610.0 ± 0.0
Ender Dragon milestones reached, of 24
Table
ModelDirectPRO-LONGVISTAMFM
GPT-5.6-Sol6.0 ± 1.08.3 ± 0.69.0 ± 1.010.7 ± 0.6
Claude Opus 56.0 ± 1.08.0 ± 1.08.7 ± 0.610.3 ± 0.6
GPT-6-Astra6.3 ± 0.611.0 ± 1.012.7 ± 0.616.0 ± 0.0
KiCad mean reward over the tasks, from 0 to 1
Table
ModelDirectPRO-LONGVISTAMFM
GPT-5.6-Sol0.240 ± 0.0260.306 ± 0.0140.400 ± 0.0110.413 ± 0.009
Claude Opus 50.240 ± 0.0230.300 ± 0.0160.373 ± 0.0130.389 ± 0.010
GPT-6-Astra0.267 ± 0.0210.375 ± 0.0120.400 ± 0.0100.440 ± 0.013

MFM achieves the highest mean across every model and every benchmark, with the widest lead on Ender Dragon, our longest horizon task. Paired with GPT-6-Astra, it completes all 10 Mine Diamond milestones in every seed and reaches 16 of 24 milestones on Ender Dragon, compared to 12.7 for the strongest baseline. On KiCad, it averages 0.440 with GPT-6-Astra, ahead of 0.400 for the best baseline and 0.267 without persistent memory.

The next two sections examine where these gains come from: how the agent inspects past frames to guide decisions, and how it writes and refines procedures across lives.

More baselines on Ender Dragon

We also compare MFM on Ender Dragon with five more memory systems for agents, and with three variants of MFM that each remove one kind of evidence or addressing: the frames replaced by captions written when the episode is stored, no visual observations at all, and no index. Each setting was run with three seeds. MFM averages 16.0 of 24; the best of the others averages 10.0.

Ender Dragon milestones reached, of 24, three seeds
Table
Method or variantVisual evidence and addressingMilestones
MFMLossless PNGs + index.jsonl + linked mine/16.0 ± 0.0
JARVIS-1 / Optimus-1Plan keyframes + bge-small-en-v1.5 / CLIP ViT-B/32 (no editable notes)10.0 ± 4.0
MemGPTCore memory + FIFO text summaries + bge10.0 ± 0.0
MFM: caption-only memory60–150 word GPT-6-Astra captions at write time (no PNGs)9.7 ± 0.6
MFM: no visual observationsStructured text state and outcomes only (no PNGs)9.7 ± 0.6
MFM: flat memoryLossless PNGs without index.jsonl9.3 ± 0.6
Generative AgentsRecency + importance + bge + reflections9.0 ± 1.0
MrSteveCLIP place memory (no outcome cues or notes)7.3 ± 1.5
VoyagerSkill library (wrote very few verified skills from raw pixels)6.0 ± 1.7

VILooking back at past frames

The text index points the agent to the right episode, but the frame itself holds the visual evidence. Our agents regularly open stored frames from both the current life and earlier ones: episodes.py --then-now places a past frame side by side with the live view, and zoom.py crops a region for closer inspection. Below, we highlight five moments along one life's milestone staircase where looking back changed what the agent did. Hover or focus any callout to enlarge the frames and see the outcome.

Milestone staircase of an MFM life on the Ender Dragon task with GPT-6-Astra, reaching 16 of 24 milestones within 36,000 steps. Five callouts pair a recorded frame with the later moment an agent retrieved it.
Five times the agent looked back. The staircase tracks an MFM life on Ender Dragon with GPT-6-Astra, reaching 16 of 24 milestones within the 36,000-step budget. Each callout pairs a recorded frame with the later moment the agent retrieved it, showing how the visual check changed its action: centering over a hole it was straddling (a), replacing an aiming procedure that had pitched wrong (b), avoiding a wolf it had mistaken for a sheep (c), digging into an iron entrance recorded in an earlier life (d), and identifying a sheep for food (e).

Looking back at past frames tells the agent what is in the world. The same filesystem also stores how to act in it: procedures the agent writes for itself and passes on to the next life.

VIISelf-improvement through skill learning

Because the model's weights never change, an MFM agent improves entirely through what it writes to its filesystem. Part of that is semantic knowledge, like where an iron vein lies. The other part is procedural memory: when a sequence of raw actions works, the agent saves it as a Python procedure under mine/procedures/ and calls it as a single action on future turns. The first life starts with no procedures at all. When a life ends, its episodic records and procedures carry over to the next. Here we trace how procedures evolve across two lives in the same world, and then test transferring world knowledge and procedures separately to fresh agents on new tasks.

How a skill is written

We trace a two-life chain with GPT-6-Astra on the Ender Dragon task; the second life is the one featured in the method figure and interactive explorer above.

Saved after it works

The agent turns a sequence into a procedure only after testing it by hand. Life 2 cleared a stone wall manually twice before saving the script: "Save the clearing sequence after its second successful trial."

Guarded by its own checks

Every procedure checks the game state first and aborts if preconditions aren't met. For example, descend_one returns no actions unless the inventory screen is closed and the camera pitch is 60.

Inherited and revised

Each new life inspects the earlier life's procedures and retires what failed. Life 2 kept 20 of life 1's 21 procedures and retired level_step—the procedure life 1 had called most—after tracing life 1's fatal fall into lava back to it.

The skills of one life

Below are the 12 self-written procedures that life 2 called during its run. Hover or focus any procedure to watch one of its calls in action.

SkillWhat it doesWrittenCalls in lives 1, 2
clears an upper and a lower stone block while standing still, then inspects the floorlife 2, step 25,253—, 94
mines an upper and a lower block of a west wall and collects the dropslife 2, step 2,416—, 86
cuts one descending stair step and advanceslife 2, step 5,249—, 61
the same as quarry_west_pair, heading northlife 2, step 16,028—, 27
extends a floor one block north while sneakinglife 13, 10
clears an upper and a lower andesite block while standing stilllife 2, step 27,581—, 6
raises a cobblestone pillar under itself, then looks aroundlife 10, 5
clears three upper gravel blocks while standing stilllife 2, step 24,628—, 3
jumps up an inspected staircaselife 116, 3
steps down onto an inspected landing one block lowerlife 12, 2
walks down an inspected staircaselife 110, 1
mines a shallow descending step and advanceslife 125, 1

Of life 2's 299 procedure calls, 277 went to six procedures it wrote during life 2 itself, nearly all for excavation: clear_west_safe (94 calls), quarry_west_pair (86), and cut_step (61) lead the count. The remaining 22 calls went to six procedures inherited from life 1. It kept the rest of life 1's procedures on disk without calling them, and wrote three more that it never needed.

What the next life gains

Carrying over both episodic records and procedures let the second life progress much faster and reach further within the exact same step budget.

Two lives of one chain milestones reached against steps played
Table
MilestoneLife 1Life 2
Log685332
Crafting table1,451834
Wooden pickaxe1,593954
Cobblestone3,1421,417
Stone pickaxe3,3961,702
Iron ore18,2318,992
Furnace4,8202,416
Iron ingot18,7859,665
Iron pickaxe19,1859,971
Diamond ore34,32117,484
Diamond34,83217,494
Diamond pickaxe35,07117,666
Diamond sword—26,201
Obsidian—20,736
Flint and steel35,31217,951
Netherrack—35,828
Blaze killed, and the seven after it——
Episodes carried in03,035
Last step35,99935,999

Within the 36,000-step budget, life 1 started with an empty memory and reached 13 milestones. Life 2 started with life 1's 3,035 recorded episodes and reached 16 milestones—adding the diamond sword, obsidian, and netherrack. Just as importantly, it hit every milestone from life 1 in roughly half the steps: mining iron at step 8,992 vs. 18,231 (from the vein in the method figure), and mining its first diamond at step 17,494 vs. 34,832, just five blocks from the coordinates recorded in its guide from life 1.

Memory on a new task

Because world knowledge lives in plain files, we can also hand it to a completely new agent. We let one agent explore a world, then gave fresh agents slices of its memory: none of it, up to step 3,000, up to step 6,000, or the full memory. Each fresh agent was then tasked with finding and mining a target ore in that world: iron within 4,000 steps, or diamond or gold within 6,000.

Figure from the paper. Panel a: share of the step budget used against how much memory was inherited (none, up to step 3,000, up to step 6,000, full); 1 of 12, 2 of 6, 5 of 8 and 11 of 12 agents solved their task. Agents whose memory recorded where the ore lay use less of the budget. Panels b to d: steps to mine iron, diamond and gold.
From the paper. Blue: the inherited memory recorded where the ore lay; grey: it did not; hollow: not solved within the budget. (a) All three ores; (b–d) each ore.

Without inherited memory, only 1 of 12 agents mined its ore in time; with the full memory, 11 of 12 succeeded. What mattered most was whether the inherited memory had already seen the ore: agents whose memory recorded the ore's location dug straight to it, while those given snapshots from before that discovery mostly ran out of steps.

Skills on a new task

When a new life continues in the same world, procedures and map knowledge travel together. To isolate the value of procedures alone, we tested agents on three short tasks in an unseen world. In one condition, the agent starts from raw actions; in the other, it starts with procedures written by an earlier life already installed in mine/procedures/. Each video shows a complete life at real-time speed (with Climb Out brightened for visibility). For each task, we pair the slowest run without carried procedures against the fastest run with them, illustrating the widest gap observed. Hover over any procedure tag below to see it run.

Iron Shield

Starting with a stone pickaxe, crafting table, cobblestone, and logs—and told that an iron vein lies 13 blocks below—the agent must build a furnace, dig down to the vein, smelt an ingot, and craft a shield.

  • The life with carried skills called it once and went 13 blocks down to the vein in one action; the life without dug down with mine_ahead, 35 calls.
No carried skill. Shield at step 3,260.
With the scripts of a two-life Diamond chain. Shield at step 1,105.

Climb Out

Sealed in a pocket 40 blocks underground with a stone pickaxe and eight cobblestone, the agent must dig to the surface and mine a brick block directly overhead.

  • Written in a published Ender Dragon life and carried in with stair_up and three others. This life called it twice at the start, rose three blocks, then kept climbing the same way by hand.
  • The life without carried skills climbed with it, 20 calls between 61 of mine_ahead.
No carried skill. Bricks mined at step 2,483.
With the scripts of an Ender Dragon life. Bricks mined at step 1,665.

Cook Meat

Given a stone sword, stone pickaxe, crafting table, cobblestone, and logs—with three cows nearby—the agent must build a furnace, kill an animal, and cook its meat.

No carried skill. Cooked meat at step 771.
With the fight loop. Cooked meat at step 428.

VIIIBeyond Minecraft: computer use

Nothing in MFM is tied to a game. We ran the exact same memory architecture on CUABench-KiCad, a desktop computer-use benchmark where the agent designs and edits electronic schematics in KiCad through screenshots, mouse, and keyboard. Its 25 tasks run sequentially in the same application, and the agent begins each task with the episodic records and notes accumulated from earlier tasks. With GPT-6-Astra, MFM achieves a mean reward of 0.440, compared to 0.400 for the strongest baseline and 0.267 without persistent memory (see Results).

Below is a complete recorded run of MFM with GPT-6-Astra across all 25 tasks. Each task is scored by the fraction of three netlist checks passed against a reference schematic: components, connections, and net names. Open any task replay to step through the screenshots the agent saw, its reasoning and actions at each step, and the past episodes and notes it retrieved from memory.

CUABench-KiCad · MFM
GPT-6-Astra
one recorded run, in the order it ran
Mean reward
–
Solved
–
Partly solved
–
Steps taken
–
Status Replay
Loading the run…

This is a single run, one of the task orders behind the mean above; the tasks are listed in the order the agent took them. The task titles are ours; the benchmark names tasks by id. A step cap of 200 applied, and the agent ended every task itself.

Task

What the agent saw

Its plan

Actions, marked on the screen

    From memory at this step

    Notes it wrote during this task

    Cite

    @article{su2026mfm,
      title   = {Multimodal Filesystem Memory for Long-Horizon Embodied Agents},
      author  = {Su, Chloe and Li, Jiahan and Qi, Zhenting and Cheng, Chaoran and Chen, Haoyu and Jun, Sejoon and Ye, Weirui and Du, Yilun},
      journal = {arXiv preprint arXiv:2610.22686},
      year    = {2026}
    }