LayerFS gives every agent an isolated, disposable filesystem fork without copying the shared base. Useful states become durable, deduplicated checkpoints with workspace-scoped tool history—ready to branch, rewind, or reuse across parallel development, environment experiments, and MCTS-style rollouts.
See the code
Ephemeral Workspaces. Durable Shared History.
v0.1.6 Developer Preview: release and downloads, every measured selection, and compatibility boundary. Live Workspace state now lives in the sandbox and the Store format is unchanged; one construction worker, a bounded sandbox spool and every measured regression, waiver and declared allowance stay explicit.
Source notice (2026-10-10): the v0.1.6 implementation described below is not on
mainany more. Its source under rootcrates/was retired once the replacement incore/reached its closing examination; the release tagv0.1.6still carries it, and the sections below describe that release.core/is under development and is not a release.
LayerFS is a SQLite-backed, content-addressed time machine for agent
Workspaces. Give every filesystem-affecting tool call its own ephemeral
Workspace; when retained, that call becomes one immutable Commit—the base unit
of the filesystem timeline. CAS, CDC, and COW store one shared base plus unique
deltas instead of cloning full environments. From any Layer or eligible Commit,
agents can fork zero-copy Branches, run parallel rollouts, discard failures,
roll back by forking an earlier state, and promote a winning Branch with Add.
The filesystem remains load-bearing for recursive multi-agent exploration
without multiplying storage.
[!WARNING] LayerFS 0.1.6 is a Developer Preview. It is intended for local evaluation, agent-runtime integration, and performance research—not production storage. It does not provide crash- or power-loss-durability guarantees. Keep an independent copy of important data.
CAS, CDC, and COW make LayerStack history storage-efficient by reusing unchanged objects, file regions, and filesystem structure.
The governing invariant is simple: every filesystem state is complete logically, but incremental physically. A new state should cost what changed, not the size of the Workspace it exposes. Read the CAS + CDC + COW foundations for the design rationale and step-by-step storage model.
| 🔐 01 · Identity | 📍 02 · Byte locality | 🌳 03 · Structural locality |
|---|---|---|
| Content-addressed storage — Names immutable objects from their canonical bytes, verifies reads, and reuses exact duplicates across files, LayerStacks, and agents. | Content-defined chunking — Keeps chunk boundaries stable around localized edits, so changing a small region does not require storing an entirely new large file. | Copy-on-write — Rebuilds only the changed file and directory path when publishing a new Commit, preserving unchanged subtrees; a Branch head can then be added as the next Layer. |
A LayerStack records complete filesystem checkpoints. Agent A can start from L1 while Agent B independently starts from L3. Each gets a private place to work while the selected history remains shared.
This is the conceptual checkout view; the public lifecycle is
Layer or Commit → Branch → Workspace.
One LayerStack, many zero-copy Branches, and ephemeral COW Workspaces sharing immutable history.
The primary storage signal is semantic content growth: the canonical bytes needed by a new state. SQLite page allocation is reported separately because existing database pages can absorb new objects without changing the logical content represented by the Store.
| Workload | LayerFS semantic growth |
|---|---|
| Sixteen deterministic edits | 0.2250 MiB |
| Prepend 10 bytes to 32 MiB | 0.0256 MiB |
These measurements come from the final public-SDK, real-FUSE campaign. See the full benchmark report for physical allocation, equations, source identity, and raw evidence.
The storage engine, SDK, CLI, and filesystem projection are implemented in the 0.1.6 Developer Preview. They remain separate public boundaries so callers do not depend on private CAS handles or storage formats.
| Status | Component | Role |
|---|---|---|
| Implemented core | Storage | Owns identities, canonical objects, CDC, file manifests, structural COW, immutable CAS admission, lifecycle coordination, and verified reads. |
| Implemented preview | SDK and CLI | Expose filesystem, Workspace, LayerStack, Branch, Commit, publication, query, monitoring, and container-lifecycle operations through the public surfaces. |
| Implemented preview | Filesystem projection | Exposes a Workspace through host materialization or real container FUSE and captures bounded filesystem effects while delegating identity, CDC, COW, and admission to storage. |
| Implemented preview | Container runtime | Creates and controls resource-bounded Linux FUSE containers for Workspaces without placing the durable Store inside the container. |
The one-Store boundary is intentional: a Client binds one SQLite Store, one
Monitor, and one Workspace manager. A second Store uses a separate Client.
Each workspace exec starts a fresh process. commit publishes the Workspace state to its Branch. end removes the ephemeral projection and never commits implicitly.
Releases are built from source. You need macOS or Linux and Rust 1.85 or newer. Docker, /dev/fuse, and CAP_SYS_ADMIN are needed only for managed container-FUSE workspaces. No packages are published to crates.io for this release.
From the repository root, at the v0.1.6 release tag:
git clone https://github.com/Ephemeral-AI-Lab/layerfs.git
cd layerfs
git checkout v0.1.6
cargo build --release -p layerfs-cli
export LAYERFS_BIN="$PWD/target/release/layerfs"
export LAYERFS_CONTEXT="$PWD/.layerfs/context"
mkdir -p "$PWD/.layerfs"
"$LAYERFS_BIN" db create "$PWD/.layerfs/store.sqlite"
"$LAYERFS_BIN" context use --store "$PWD/.layerfs/store.sqlite"
"$LAYERFS_BIN" layerstack init --name demo --empty
"$LAYERFS_BIN" query layerstacks
This creates a SQLite Store and an empty LayerStack with a genesis Layer. Continue with the complete quickstart for Branch creation, Workspace execution, commits, cleanup, directory imports, managed containers, and real FUSE.
When importing an existing directory, keep the Store file outside the directory being imported or projected:
mkdir -p "$PWD/import-root"
printf 'hello\n' > "$PWD/import-root/hello.txt"
"$LAYERFS_BIN" layerstack init --name imported "$PWD/import-root"
core/ replacement implementation (in development)
├── crates/ content, storage, history, persistence, project,
│ telemetry, overlay, workspace, fuse, daemon,
│ bridge, sandbox and the SDK
├── benchmark/ core harnesses, registrations and proof tools
└── docs/ architecture, design contracts and run records
benchmark/ v0.1.6 harness, historical; not runnable on main
docs/versioned/0.1.6 v0.1.6 manual
docs/versioned/0.1.2 previous versioned product manual
release-notes/ release records, evidence and limitations
tools/production_loc.py pinned production source-line counter
The v0.1.6 crates, tools/layerfs-eval and containers/layerfs-fuse are in the
v0.1.6 release tag.
LayerFS is suitable for evaluation and integration work, but the preview boundary matters:
mmap is still not captured by a Commit;namespace-100000 Init target is
owner-waived (4.986 s against 2.7 s). Read the
release record,
acceptance and
waivers;Read the full limitations before using LayerFS with important data.
Start with the documentation index, or jump directly to a focused guide:
| Goal | Guide |
|---|---|
| Learn the concepts | Core concepts |
| Run the CLI and SDK | Quickstart |
| Find a CLI command | CLI reference |
| Integrate with Rust | Rust SDK reference |
| Configure container FUSE | Container runtime |
| Understand storage | Storage format |
| Review v0.1.6 changes | Numbered changelog |
| Review released evidence | 0.1.6 release record |
| Review completed 0.1.2 work | 0.1.2 checklist |
| Contribute changes | 0.1.x development guide |
The first-principles learning site is educational material and may describe future work. The versioned repository manual defines the current product contract.
| Stage | Focus | Status |
|---|---|---|
| 0.1.0 Developer Preview | One SQLite Store, immutable LayerStack history, Branches, Workspaces, public SDK/CLI, host materialization, container FUSE, monitoring, and benchmark evidence. | Released as source under v0.1.0. |
| 0.1.1 | Measure and harden existing-directory initialization through localized Commit, with focused FUSE and Docker proof. | Released as source under v0.1.1; see the release record. |
| 0.1.2 | Three SDK-only 1/10/100/500 MiB edit families, namespace and Store refresh, and universal regular-file editing. | Released as source under v0.1.2; see the release record. |
| 0.1.3 | Shared live Workspaces, optimized Commit and reads, and the 198-case/226-proof checkpoint. | Released as source under v0.1.3; see the release record. |
| 0.1.4 | Packed storage and bounded Init/Commit improvements; measured tradeoffs accepted. | Closed; release qualified; release record and limitations. |
| 0.1.5 | Ordinary schema-10 storage, bounded pending edits, coalesced pack rows and the removal of explicit compaction; full campaign qualification with published regressions. | Released as source under v0.1.5; see the release record, acceptance and limitations. |
| 0.1.6 | Sandbox-local Workspace state: the sandbox owner holds the live namespace and file data, the host keeps canonical construction and publication, and Commit transfers mutable state with no pause fence and one construction worker. | Released as source under v0.1.6; see the release record, acceptance and limitations. |
| 0.2.0 | Establish a portable projection foundation, including capability-detected reflink/clonefile paths and a future OverlayFS projection. | Planned; requires a new compatibility contract. |
| Later | Add platform/runtime expansion and verified Store export, import, and synchronization. | Research; no cross-host synchronization is part of 0.1.0. |
See the roadmap checklist and roadmap architecture notes for acceptance gates, ownership boundaries, and sequencing. Use the Rust SDK reference to integrate the current public SDK.
Bug reports, reproducible performance evidence, documentation corrections, and focused pull requests are welcome. Before opening a change, review the 0.1.x development guide and run the repository’s relevant verification commands.
LayerFS is licensed under the MIT License.
340 followers · starred Sep 2026
490 followers · starred Sep 2026
6,863 followers · starred Aug 2026
688 followers · starred Oct 2026
LayerFS gives every agent an isolated, disposable filesystem fork without copying the shared base. Useful states become durable, deduplicated checkpoints with workspace-scoped tool history—ready to branch, rewind, or reuse across parallel development, environment experiments, and MCTS-style rollouts.
See the code
Ephemeral Workspaces. Durable Shared History.
v0.1.6 Developer Preview: release and downloads, every measured selection, and compatibility boundary. Live Workspace state now lives in the sandbox and the Store format is unchanged; one construction worker, a bounded sandbox spool and every measured regression, waiver and declared allowance stay explicit.
Source notice (2026-10-10): the v0.1.6 implementation described below is not on
mainany more. Its source under rootcrates/was retired once the replacement incore/reached its closing examination; the release tagv0.1.6still carries it, and the sections below describe that release.core/is under development and is not a release.
LayerFS is a SQLite-backed, content-addressed time machine for agent
Workspaces. Give every filesystem-affecting tool call its own ephemeral
Workspace; when retained, that call becomes one immutable Commit—the base unit
of the filesystem timeline. CAS, CDC, and COW store one shared base plus unique
deltas instead of cloning full environments. From any Layer or eligible Commit,
agents can fork zero-copy Branches, run parallel rollouts, discard failures,
roll back by forking an earlier state, and promote a winning Branch with Add.
The filesystem remains load-bearing for recursive multi-agent exploration
without multiplying storage.
[!WARNING] LayerFS 0.1.6 is a Developer Preview. It is intended for local evaluation, agent-runtime integration, and performance research—not production storage. It does not provide crash- or power-loss-durability guarantees. Keep an independent copy of important data.
CAS, CDC, and COW make LayerStack history storage-efficient by reusing unchanged objects, file regions, and filesystem structure.
The governing invariant is simple: every filesystem state is complete logically, but incremental physically. A new state should cost what changed, not the size of the Workspace it exposes. Read the CAS + CDC + COW foundations for the design rationale and step-by-step storage model.
| 🔐 01 · Identity | 📍 02 · Byte locality | 🌳 03 · Structural locality |
|---|---|---|
| Content-addressed storage — Names immutable objects from their canonical bytes, verifies reads, and reuses exact duplicates across files, LayerStacks, and agents. | Content-defined chunking — Keeps chunk boundaries stable around localized edits, so changing a small region does not require storing an entirely new large file. | Copy-on-write — Rebuilds only the changed file and directory path when publishing a new Commit, preserving unchanged subtrees; a Branch head can then be added as the next Layer. |
A LayerStack records complete filesystem checkpoints. Agent A can start from L1 while Agent B independently starts from L3. Each gets a private place to work while the selected history remains shared.
This is the conceptual checkout view; the public lifecycle is
Layer or Commit → Branch → Workspace.
One LayerStack, many zero-copy Branches, and ephemeral COW Workspaces sharing immutable history.
The primary storage signal is semantic content growth: the canonical bytes needed by a new state. SQLite page allocation is reported separately because existing database pages can absorb new objects without changing the logical content represented by the Store.
| Workload | LayerFS semantic growth |
|---|---|
| Sixteen deterministic edits | 0.2250 MiB |
| Prepend 10 bytes to 32 MiB | 0.0256 MiB |
These measurements come from the final public-SDK, real-FUSE campaign. See the full benchmark report for physical allocation, equations, source identity, and raw evidence.
The storage engine, SDK, CLI, and filesystem projection are implemented in the 0.1.6 Developer Preview. They remain separate public boundaries so callers do not depend on private CAS handles or storage formats.
| Status | Component | Role |
|---|---|---|
| Implemented core | Storage | Owns identities, canonical objects, CDC, file manifests, structural COW, immutable CAS admission, lifecycle coordination, and verified reads. |
| Implemented preview | SDK and CLI | Expose filesystem, Workspace, LayerStack, Branch, Commit, publication, query, monitoring, and container-lifecycle operations through the public surfaces. |
| Implemented preview | Filesystem projection | Exposes a Workspace through host materialization or real container FUSE and captures bounded filesystem effects while delegating identity, CDC, COW, and admission to storage. |
| Implemented preview | Container runtime | Creates and controls resource-bounded Linux FUSE containers for Workspaces without placing the durable Store inside the container. |
The one-Store boundary is intentional: a Client binds one SQLite Store, one
Monitor, and one Workspace manager. A second Store uses a separate Client.
Each workspace exec starts a fresh process. commit publishes the Workspace state to its Branch. end removes the ephemeral projection and never commits implicitly.
Releases are built from source. You need macOS or Linux and Rust 1.85 or newer. Docker, /dev/fuse, and CAP_SYS_ADMIN are needed only for managed container-FUSE workspaces. No packages are published to crates.io for this release.
From the repository root, at the v0.1.6 release tag:
git clone https://github.com/Ephemeral-AI-Lab/layerfs.git
cd layerfs
git checkout v0.1.6
cargo build --release -p layerfs-cli
export LAYERFS_BIN="$PWD/target/release/layerfs"
export LAYERFS_CONTEXT="$PWD/.layerfs/context"
mkdir -p "$PWD/.layerfs"
"$LAYERFS_BIN" db create "$PWD/.layerfs/store.sqlite"
"$LAYERFS_BIN" context use --store "$PWD/.layerfs/store.sqlite"
"$LAYERFS_BIN" layerstack init --name demo --empty
"$LAYERFS_BIN" query layerstacks
This creates a SQLite Store and an empty LayerStack with a genesis Layer. Continue with the complete quickstart for Branch creation, Workspace execution, commits, cleanup, directory imports, managed containers, and real FUSE.
When importing an existing directory, keep the Store file outside the directory being imported or projected:
mkdir -p "$PWD/import-root"
printf 'hello\n' > "$PWD/import-root/hello.txt"
"$LAYERFS_BIN" layerstack init --name imported "$PWD/import-root"
core/ replacement implementation (in development)
├── crates/ content, storage, history, persistence, project,
│ telemetry, overlay, workspace, fuse, daemon,
│ bridge, sandbox and the SDK
├── benchmark/ core harnesses, registrations and proof tools
└── docs/ architecture, design contracts and run records
benchmark/ v0.1.6 harness, historical; not runnable on main
docs/versioned/0.1.6 v0.1.6 manual
docs/versioned/0.1.2 previous versioned product manual
release-notes/ release records, evidence and limitations
tools/production_loc.py pinned production source-line counter
The v0.1.6 crates, tools/layerfs-eval and containers/layerfs-fuse are in the
v0.1.6 release tag.
LayerFS is suitable for evaluation and integration work, but the preview boundary matters:
mmap is still not captured by a Commit;namespace-100000 Init target is
owner-waived (4.986 s against 2.7 s). Read the
release record,
acceptance and
waivers;Read the full limitations before using LayerFS with important data.
Start with the documentation index, or jump directly to a focused guide:
| Goal | Guide |
|---|---|
| Learn the concepts | Core concepts |
| Run the CLI and SDK | Quickstart |
| Find a CLI command | CLI reference |
| Integrate with Rust | Rust SDK reference |
| Configure container FUSE | Container runtime |
| Understand storage | Storage format |
| Review v0.1.6 changes | Numbered changelog |
| Review released evidence | 0.1.6 release record |
| Review completed 0.1.2 work | 0.1.2 checklist |
| Contribute changes | 0.1.x development guide |
The first-principles learning site is educational material and may describe future work. The versioned repository manual defines the current product contract.
| Stage | Focus | Status |
|---|---|---|
| 0.1.0 Developer Preview | One SQLite Store, immutable LayerStack history, Branches, Workspaces, public SDK/CLI, host materialization, container FUSE, monitoring, and benchmark evidence. | Released as source under v0.1.0. |
| 0.1.1 | Measure and harden existing-directory initialization through localized Commit, with focused FUSE and Docker proof. | Released as source under v0.1.1; see the release record. |
| 0.1.2 | Three SDK-only 1/10/100/500 MiB edit families, namespace and Store refresh, and universal regular-file editing. | Released as source under v0.1.2; see the release record. |
| 0.1.3 | Shared live Workspaces, optimized Commit and reads, and the 198-case/226-proof checkpoint. | Released as source under v0.1.3; see the release record. |
| 0.1.4 | Packed storage and bounded Init/Commit improvements; measured tradeoffs accepted. | Closed; release qualified; release record and limitations. |
| 0.1.5 | Ordinary schema-10 storage, bounded pending edits, coalesced pack rows and the removal of explicit compaction; full campaign qualification with published regressions. | Released as source under v0.1.5; see the release record, acceptance and limitations. |
| 0.1.6 | Sandbox-local Workspace state: the sandbox owner holds the live namespace and file data, the host keeps canonical construction and publication, and Commit transfers mutable state with no pause fence and one construction worker. | Released as source under v0.1.6; see the release record, acceptance and limitations. |
| 0.2.0 | Establish a portable projection foundation, including capability-detected reflink/clonefile paths and a future OverlayFS projection. | Planned; requires a new compatibility contract. |
| Later | Add platform/runtime expansion and verified Store export, import, and synchronization. | Research; no cross-host synchronization is part of 0.1.0. |
See the roadmap checklist and roadmap architecture notes for acceptance gates, ownership boundaries, and sequencing. Use the Rust SDK reference to integrate the current public SDK.
Bug reports, reproducible performance evidence, documentation corrections, and focused pull requests are welcome. Before opening a change, review the 0.1.x development guide and run the repository’s relevant verification commands.
LayerFS is licensed under the MIT License.
340 followers · starred Sep 2026
490 followers · starred Sep 2026
6,863 followers · starred Aug 2026
688 followers · starred Oct 2026