|
| 1 | +--- |
| 2 | +title: Agent filesystem |
| 3 | +description: The experimental Coven Agent File System foundation, its present boundary, and its public roadmap. |
| 4 | +--- |
| 5 | + |
| 6 | +Coven is exploring an **Agent File System (AFS)**: a local SQLite-backed |
| 7 | +filesystem foundation for agent work that stores file state without making the |
| 8 | +project directory itself the working store. The future design adds session-linked |
| 9 | +change history and provenance; that integration is not implemented today. |
| 10 | + |
| 11 | +This is experimental engineering infrastructure, not a supported user-facing |
| 12 | +workflow yet. There is no `coven afs` command, AFS daemon API, mount point, or |
| 13 | +sandboxed execution mode to configure today. |
| 14 | + |
| 15 | +## What is shipped |
| 16 | + |
| 17 | +The `coven-afs` Rust crate is merged in the public Coven repository. It |
| 18 | +implements an [AgentFS SPEC v0.4](https://github.com/tursodatabase/agentfs/blob/main/SPEC.md)-compatible |
| 19 | +SQLite storage layer with: |
| 20 | + |
| 21 | +- POSIX-like files, directories, hard links, and symbolic links; |
| 22 | +- chunked file data and filesystem consistency checks; |
| 23 | +- a writable copy-on-write delta over a read-only base; |
| 24 | +- whiteouts for deletions and full-file copy-up for modified base files; |
| 25 | +- a JSON key-value store and insert-only tool-call audit records. |
| 26 | + |
| 27 | +The storage engine is tested as a crate. It is not yet connected to the Coven |
| 28 | +daemon, its session lifecycle, or the public local API. It does not replace the |
| 29 | +project-root guard, existing worktree workflow, or the safety guidance in |
| 30 | +[Security posture](/docs/daemon/security). |
| 31 | + |
| 32 | +## What it is for |
| 33 | + |
| 34 | +The intended direction is a private delta per agent session over an immutable |
| 35 | +project snapshot. That would make a session's changes inspectable and |
| 36 | +discardable without mutating the base snapshot. A future explicit |
| 37 | +materialization step would apply reviewed changes to an ordinary Git branch, |
| 38 | +preserving Coven's existing PR workflow. |
| 39 | + |
| 40 | +The storage implementation follows the upstream specification. The future |
| 41 | +design reserves separate additive tables for Coven-specific provenance, but no |
| 42 | +such tables are implemented yet. This keeps the filesystem interoperable at the |
| 43 | +storage layer without treating any upstream tool or format as a runtime |
| 44 | +dependency. |
| 45 | + |
| 46 | +## Important boundaries |
| 47 | + |
| 48 | +Do not rely on AFS for security isolation today: |
| 49 | + |
| 50 | +- **No mount is shipped.** The merged crate is a storage engine only. |
| 51 | +- **No sandbox is shipped.** A mount alone would not prevent a process from |
| 52 | + writing to an absolute path outside that mount. |
| 53 | +- **No network listener is shipped.** Coven's existing daemon remains |
| 54 | + same-user local IPC; AFS does not add a TCP endpoint. |
| 55 | +- **No session API is shipped.** Session creation, diff, timeline, commit, and |
| 56 | + discard operations are design work, not public routes or commands. |
| 57 | + |
| 58 | +Use the current [project-root guidance](/docs/harnesses/project-roots) and |
| 59 | +explicit Git/worktree review flow for production work. |
| 60 | + |
| 61 | +## Roadmap |
| 62 | + |
| 63 | +The roadmap is capability-based rather than date-based. Each workstream has |
| 64 | +explicit safety and operational gates before it becomes a supported feature. |
| 65 | + |
| 66 | +| Phase | Status | Scope and gate | |
| 67 | +| --- | --- | --- | |
| 68 | +| Storage foundation | Shipped experimental | `coven-afs` provides the SPEC-compatible schema, filesystem operations, and copy-on-write overlay. | |
| 69 | +| Mount and performance spike | Planned experimental work | Evaluate localhost NFS on macOS and FUSE on Linux; measure a repository checkout and `pnpm install`-scale writes against the bare filesystem. This determines whether mounts are viable. | |
| 70 | +| Mount safety decision | Planned after benchmark | Resolve loopback access control, default-off behavior, copy-up limits, base-ingest filters, and platform-specific recovery before enabling any mount by default. | |
| 71 | +| Daemon session integration | Planned | Add an additive local API for creating, inspecting, diffing, committing, and discarding AFS sessions. SDK-only operation remains viable if no mount backend is available. | |
| 72 | +| Provenance and review | Planned | Connect file operations to Coven sessions and tool calls, then expose explicit diff, timeline, and materialization views to local clients. | |
| 73 | +| Broader platform support | Later | Evaluate a Windows-native path separately; no Windows mount backend is promised. | |
| 74 | + |
| 75 | +The mount and benchmark work is planned experimental work, not a release |
| 76 | +commitment. Mount viability gates mount availability and defaults; it does not |
| 77 | +block future SDK or daemon integration. The daemon API, provenance views, and |
| 78 | +Git materialization are technical designs only until they are implemented, |
| 79 | +tested, and documented as supported features. |
| 80 | + |
| 81 | +## Follow progress |
| 82 | + |
| 83 | +- [Coven architecture](/docs/guide/architecture) explains the current daemon |
| 84 | + authority boundary. |
| 85 | +- [Security posture](/docs/daemon/security) describes the current local-access |
| 86 | + model. |
| 87 | +- The [Coven repository](https://github.com/OpenCoven/coven) contains the |
| 88 | + experimental storage crate and its engineering design. |
0 commit comments