AgentFS with copy-on-write overlay filesystem
AgentFS 0.4 adds `agentfs run`, which launches a coding agent in a sandbox where the working directory is a copy-on-write overlay. The host filesystem is the read-only base layer and a SQLite database is the writable delta layer, so agent edits and deletions (tracked through a whiteout table) never touch the host checkout, and other shells can join the same session by ID. On Linux the overlay is a FUSE filesystem combined with user and mount namespaces that remount everything read-only except allowed paths. On macOS it is served by a localhost NFS server, avoiding the need for macFUSE, and confined with a generated sandbox-exec profile.
Related posts
- AgentFS with FUSE: SQLite-backed agent state as a POSIX filesystem
Turso mediumAdeptAgentFS adds an `agentfs mount` command that exposes its SQLite-backed agent filesystem as a real POSIX filesystem via Linux FUSE. Agents and shell tools like git, grep and diff can then work on agent state with no SDK integration. The implementation uses the Rust fuser crate and enables kernel writeback caching, so writes and cached reads hit the page cache and run near native speed. Non-cached reads and fsync() pay the kernel-crossing overhead. Each write is coordinated with a database transaction, and the whole filesystem stays in one portable, queryable SQLite file that can be inspected with sqlite3 or snapshotted by copying it.
- AgentFS in the Browser
Turso mediumAdeptAgentFS gives browser-based agents a virtual filesystem stored in a SQLite database, using Turso's WASM build of its Rust rewrite of SQLite. It runs in-memory for ephemeral workspaces or persists to the browser's Origin Private File System (OPFS), and the same API works with Turso Cloud sync, which pushes changes and bootstraps data on demand based on the queries you run. Alongside file operations it offers key-value state and tool-call tracking, and filesystem state can be queried directly with SQL. A short adapter lets isomorphic-git run on AgentFS, so a repository can be cloned and inspected entirely in the browser.
- The Missing Abstraction for AI Agents: The Agent Filesystem
Turso mediumAdeptAgentFS is an SDK that stores all of an AI agent's state in a single SQLite (Turso) database file: a POSIX-like virtual filesystem, a key-value store, and an append-only tool call audit log. The filesystem side uses separate inode and dentry tables, mirroring kernel design. Key-value entries are JSON-serialized values in a single table, and tool call rows are never mutated, which keeps the history auditable. Keeping everything in one file makes agent runs snapshottable by copying it, debuggable with SQL, and portable across sandboxes. TypeScript and Rust SDKs are available, along with a Mastra-based research assistant example and later FUSE support for mounting the filesystem on Linux.
- Sandboxing
Zed mediumAdeptZed's agent panel now sandboxes the terminal and fetch tools by default (from 1.14) using OS-enforced restrictions: Seatbelt on macOS, Bubblewrap namespaces on Linux, and WSL on Windows. Default rules block writes outside project directories, writes to .git (which could plant hooks that run unsandboxed), and network access, and agents must request escalation with a stated reason. Instruction-following and command-matching rules like banning `git .*` are trivially bypassed via shells, env vars or other interpreters, and a symlink-swap TOCTOU race between user approval and bwrap bind mounting could grant write access to arbitrary readable directories, which Zed detects and fails closed on. The sandbox is one defense layer and does not cover the edit tool, ACP agents, LSP/MCP servers, build.rs, proc macros or git hooks run outside it.
- Building Agents that Don't Break Themselves
Fly.io mediumAdeptSeparate where an agent lives from where it executes code: keep the agent loop on a durable host and send every shell command to a disposable Sprite sandbox. SpriteDoc, an internal multi-user troubleshooting agent built on Pi, creates one Sprite per session on first filesystem use and tears it down when idle. It injects each user's flyctl token only for the duration of a single command, so no credential ever rests in the sandbox. Kyle's Hermes Agent backend instead keeps one persistent Sprite per task and skips dangerous-command approval prompts because the sandbox is the security boundary. Copy-on-write checkpoints let an agent that deletes its own work and toolchain be restored in about nine seconds.