LayerFS: The filesystem for AI coding agents

Hacker News by 3 min read 76x views
LayerFS: The filesystem for AI coding agents

Share Post

Ephemerality: scaling multi-agent betterment beyond imagination

LayerFS is the substrate under your agents. Each one mounts a complete, writable Workspace complete shared committed history, does its work, commits what it changed, and goes away.

  • Ephemeral workspaces
  • Durable results
  • Massive parallelism

LayerFSandDSHLayerFSandPisoon

Why LayerFS

Ten ideas, one filesystem.

six center · four supporting

Compute exists lone during a command runs.

fs · nuclear compose → Storewriteeditrmsandbox · workspace per bashmountexeccommitunmountmountexeccommitunmountmountexeccommitunmountmountexeccommitunmountmountexeccommitunmount>_ mkdir out>_ cat log.txt>_ python train.py>_ node build.jsUpToDateStoreC41C42C43C44C45C46

  • Compute: Agents expend ~80% thinking, ~10% in Bash.
  • FS: Each document tool call is one nuclear Store op.
  • Sandbox: Each Bash tool call mounts an ephemeral workspace, afterward commits.

Agents on distinct computers portion one serverless Store.

store.dbC41C42C43C44C45C46C47computer 1computer 2computer 3computer 4

  • Shared storage: Every delegate commits to one Store, alongside no DB server.
  • Distributed computing: Each delegate runs on its own computer.

One project, many branches. One branch, many agents.

mainauthuilogin.tsapi.tssession.tsapp.tsxtoken.tsapp.tsxnav.tsxConflict: app.tsxapp.tsx · merge markers<<<<<<< caput C44 <Cart />======= <Search />>>>>>>> workspaceblame app.tsxC12import NavC44<Header />C44<Cart />C46<Search />L3 · publishL4 · publish

  • Commits: Every tool call is a commit on its branch.
  • Conflict: A same-file battle is refused alongside Conflict.
  • Blame: Each row names the stage that wrote it.

Fork recursively any commit, at any depth.

publish0.620.480.210.400.780.660.300.710.910.69prunedprunedprunedprunedpruned★ finest 0.91explorers ×3explorers ×3explorers ×4explorers ×3explorers ×1fork: no records copied

  • Zero cost: A fork is metadata and copies no files.
  • Recursive: A filesystem for RSI agents and recursive exploration for RL training.

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.stats

  • Dedup: Each satisfied chunk is stored once.
  • Compression: The stored chunks shrink further.
  • Ratio: 10 copies → 1.05 dedup → 0.31 compression wtf???

Dependencies arrive alongside all mount. No wasting period for re-installation.

1 · git / another AgentFS without .gitignore filesoops!src/package.json.git/node_modules/node_modules/.cache/.cache/$ npm test✗ Error: Cannot discover component 'react'$ npm install$ npm test✓ passed⏱ 0:05⏱ 0:20⏱ 1:00⏱ 2:00⏱ 3:00⏱ 4:00⏱ 5:00⏱ ≈5 min before the archetypal runclone + install, typical⚠ wasting period · waiting on install⌛2 · LayerFSnpm instal committed once, rear afterward (C12)src/package.json.git/node_modules/.cache/$ mount → workspace ready$ npm test✓ passedinstant · no install⚡ mount 0.05 smeasured mounts: 5–20 ms⚡⚡ prepared the instant it mounts

  • Git / another AgentFS: Drops ignored files; reinstalls.
  • LayerFS: Ignored records remain in all commit.
  • Comparison: ~5 min to instal vs 0.05 s to mount.

Agent tool calls and their history

HISTORYmain @ L00 commits · 0 live

main is the green center bough; all publish adds a Layer bandLayer · a collection on mainCommit · a leafBranch · a boughmerge · grafts backpublish · adds a bandstopped · naked twigclick a name tag to concentration its Branch

store.statsmain · read-only

dedupe1.5×

compression3.32×

stored9.4 MB

file10.0 MB

logical 48.0 MB · canonical 31.2 MB · metadata 420 KB · liberated 180 KB · 0 commits · 1 layers

orchestratorproject · branch

Other Article Hacker News
↑
Close Right Ads
Close Left Ads