LayerFS: The filesystem for AI coding agents
Recorded: Oct. 21, 2026, 1 p.m.
| Original | Summarized |
LayerFS: the filesystem for AI coding agentsLayerFSv1.0.0 →releasesDocsArchArchitectureBenchBenchmarksBlogDocsArchitectureBenchmarksBlogReleases v1.0.0GitHub+1+1+1+1+1+1+1+1+1+1+1+1+1+1Ephemerality: scaling multi-agent development beyond imaginationEphemeral Workspaces.Durable Shared History.LayerFS is the substrate under your agents. Each one mounts a complete, writable Workspace over shared committed history, does its work, commits what it changed, and goes away.GET STARTEDWATCH VIDEOTRY IT LIVE ↓Ephemeral workspacesDurable resultsMassive parallelismLayerFS×andDSHCopy to play with LayerFS on DSHLayerFS×andPisoonCLOSE ✕Why LayerFSTen ideas, one filesystem.six core · four supportingEphemeral Computing01 →Compute exists only while a command runs.fs · atomic write → Storewriteeditrmsandbox · workspace per bashmountexeccommitunmountmountexeccommitunmountmountexeccommitunmountmountexeccommitunmountmountexeccommitunmount>_ mkdir out>_ cat log.txt>_ python train.py>_ node build.jsUpToDateStoreC41C42C43C44C45C46Compute: Agents spend ~80% thinking, ~10% in Bash.FS: Each file tool call is one atomic Store op.Sandbox: Each Bash tool call mounts an ephemeral workspace, then commits.Decentralized Agents02 →Agents on different computers share one serverless Store.store.dbC41C42C43C44C45C46C47computer 1computer 2computer 3computer 4Shared storage: Every agent commits to one Store, with no DB server.Distributed computing: Each agent runs on its own computer.Multiagent Coordination03 →One project, many branches. One branch, many agents.mainauthuilogin.tsapi.tssession.tsapp.tsxtoken.tsapp.tsxnav.tsxConflict: app.tsxapp.tsx · merge markers<<<<<<< head C44 <Cart />======= <Search />>>>>>>> workspaceblame app.tsxC12import NavC44<Header />C44<Cart />C46<Search />L3 · publishL4 · publishCommits: Every tool call is a commit on its branch.Conflict: A same-file clash is refused with Conflict.Blame: Each line names the step that wrote it.Recursive Filesystem04 →Fork recursively any commit, at any depth.publish0.620.480.210.400.780.660.300.710.910.69prunedprunedprunedprunedpruned★ best 0.91explorers ×3explorers ×3explorers ×4explorers ×3explorers ×1fork: no files copiedZero cost: A fork is metadata and copies no files.Recursive: A filesystem for RSI agents and recursive exploration for RL training.Ultra Storage Optimization05 →10 copies compress into 0.31.commits1 · dedupe12 chunks13 chunks14 chunks15 chunks11 matched · +1 new11 matched · +1 new11 matched · +1 newdedup → ≈1.05 copies→2 · compress≈0.31 copiesillustrative · store.statsDedup: Each content chunk is stored once.Compression: The stored chunks shrink further.Ratio: 10 copies → 1.05 dedup → 0.31 compression wtf???Instant Bootstrap06 →Dependencies come with every mount. No wasting time for re-installation.1 · git / other AgentFS without .gitignore filesoops!src/package.json.git/node_modules/node_modules/.cache/.cache/$ npm test✗ Error: Cannot find module 'react'$ npm install$ npm test✓ passed⏱ 0:05⏱ 0:20⏱ 1:00⏱ 2:00⏱ 3:00⏱ 4:00⏱ 5:00⏱ ≈5 min before the first runclone + install, typical⚠ wasting time · waiting on install⌛2 · LayerFSnpm install committed once, back then (C12)src/package.json.git/node_modules/.cache/$ mount → workspace ready$ npm test✓ passedinstant · no install⚡ mount 0.05 smeasured mounts: 5–20 ms⚡⚡ ready the moment it mountsGit / other AgentFS: Drops ignored files; reinstalls.LayerFS: Ignored files stay in every commit.Comparison: ~5 min to install vs 0.05 s to mount.Four supporting ideasAuto Checkpoints07 →Every step an agent takes is a checkpoint to return to.Every call: Each file call is a commit; each Bash call commits when it ends.No noise: A call that changes nothing commits nothing.Rewind: Fork from any checkpoint and read any file as it was.Append-only Objects08 →Saved objects are never rewritten. The Store only grows.Content-addressed: An object is named by the hash of its bytes.Sealed: A written pack is never updated or deleted.Safe to share: Branches share objects; readers never wait for the writer.Conflict Rules (.lww)09 →Name the files that should never conflict. The newest edit wins./.lww: Gitignore-style rules at the root of the tree.Newer wins: A matched file changed on both sides takes the newer edit.For: Lockfiles, build output and caches.Big File, Small Edit10 →An edit costs the size of the edit, not the size of the file.Overlay: A write keeps only the bytes it wrote.Commit: Only the edited extents and their tree path are rebuilt.Storage: The rest of the file is shared with its old version.Agent tool calls and their historyHistoryTerminalsHISTORYmain @ L00 commits · 0 liveUprightSideways0:050:100:150:20nowL0main · show every Branchmainmain is the green middle bough; each publish adds a Layer bandLayer · a band on mainCommit · a leafBranch · a boughmerge · grafts backpublish · adds a bandstopped · bare twigclick a name tag to focus its Branchmainread-only1×2×5×10×sandboxes00 workspaces mounted12 idleno Branch yet · the orchestrator forks one from mainunassignedstore.statsmain · read-onlydedupe1.5×compression3.32×stored9.4 MBfile10.0 MBlogical 48.0 MB · canonical 31.2 MB · metadata 420 KB · free 180 KB · 0 commits · 1 layersorchestratorproject · branchLayerFSproject · branchLayerFSDocsArchitectureBenchmarksBlogReleases v1.0.0GitHub |
The document presents LayerFS v1.0.0, a filesystem designed as the substrate under AI coding agents, with the central goals of ephemerality, durable shared history, and massive parallelism. Each agent mounts a complete, writable workspace over shared committed history, performs its coding tasks, commits the changes it made, and then dismounts. This architecture allows many agents to operate simultaneously without persisting each agent's full state, while preserving a shared, verifiable record of every modification. LayerFS organizes its design around six core ideas. The first is ephemeral computing, where computation exists only while a command runs. File operations are executed as atomic store operations, and each Bash tool call mounts an ephemeral workspace, runs the command, commits the resulting changes, and then unmounts. This creates a tight cycle of mount, exec, commit, and unmount that keeps active work lightweight and workspace state ephemeral. The second core idea is decentralized agents, in which agents on different computers share a single serverless Store. There is no central database server; instead, every agent commits to one Store, and each agent runs on its own computer. The third is multiagent coordination, enabling one project with many branches and one branch with many agents. Every tool call produces a commit on its branch, and a same-file conflict is explicitly refused with a Conflict. Each line is also blamed, recording the step that wrote it, which supports traceability and debugging. The fourth idea is a recursive filesystem, in which any commit can be forked recursively at any depth. Forking copies no files, so it is metadata-only and zero-cost. This design serves both recursive exploration for reinforcement learning agents and recursive exploration for RSI agents. The fifth is ultra storage optimization, where ten copies are compressed into approximately 0.31 copies. Each content chunk is stored once, and stored chunks are further compressed, yielding a reduction from ten copies to roughly 1.05 deduplicated copies to 0.31 compressed copies. The sixth core idea is instant bootstrap, where dependencies are included with every mount. Agents do not waste time re-installing dependencies; ignored files remain in every commit, and the mount process is measured at five to twenty milliseconds. Four supporting ideas further refine the filesystem behavior. Auto checkpoints ensure that every step an agent takes is a checkpoint to return to. Each file operation is a commit, and each Bash operation commits when it ends. If a call changes nothing, it commits nothing, so there is no noise. Rewind allows forking from any checkpoint and reading any file as it was. Append-only objects are never rewritten; the Store only grows. Objects are content-addressed by the hash of their bytes and are sealed, meaning a written pack is never updated or deleted. Branches share objects, and readers never wait for a writer. The LWW conflict rules name files that should never conflict and state that the newest edit wins. When a matched file is changed on both sides, the newer edit is accepted. These rules are intended for lockfiles, build output, and caches. Finally, the big file, small edit principle ensures that an edit costs the size of the edit rather than the size of the file. An overlay write keeps only the bytes it wrote, and a commit rebuilds only the edited extents and their tree path, while the rest of the file is shared with its old version. The document also describes the filesystem's history and storage representation. For example, a logical file of 48.0 MB may be stored canonically as 31.2 MB, with metadata and free space accounting for 420 KB and 180 KB, and the number of layers and commits can be tracked. The history is visualized through terminals and a main branch represented as a green middle bough, with branches as bands added by publish, merges grafting back, and stopped states as bare twigs. Read-only and sandbox contexts are also represented. Performance characteristics include the observation that agents spend roughly eighty percent thinking and ten percent in Bash, and that each file tool call corresponds to one atomic store operation. The instant bootstrap feature contrasts a typical installation that takes about five minutes with LayerFS mounting in about five to twenty milliseconds, making the workspace ready immediately. These features collectively make LayerFS a filesystem that supports ephemeral, parallel coding agents while maintaining durable, decentralized, and storage-efficient coordination, with explicit conflict handling and efficient storage compression. |