AgentFS with FUSE: SQLite-backed agent state as a POSIX filesystem
AgentFS 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.
Related posts
- 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.
- 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.
- AgentFS with copy-on-write overlay filesystem
Turso mediumAdeptAgentFS 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.
- Building AI agents with just bash and a filesystem in TypeScript
Turso mediumAdeptjust-bash, a from-scratch TypeScript reimplementation of bash and common commands like grep, sed, awk and jq, gives AI agents a familiar shell tool without a real shell or host filesystem access. Its pluggable filesystem interface connects to AgentFS, which stores every file in an SQLite database via Turso (or Cloudflare's managed SQLite in Durable Objects), so all changes are captured and the agent cannot escape the sandbox. Code examples show wiring it into the Vercel AI SDK. It sits between direct AgentFS SDK calls and mounting AgentFS on the host: deployable anywhere JavaScript runs, but limited to the commands just-bash implements.
- chDB Durable Layer for agent memory
ClickHouse mediumAdept
chDB Durable Layer wraps the embedded chDB (ClickHouse) OLAP engine so a local MergeTree working copy can be published to object storage you own (S3, GCS, Azure) and recovered on another host. Writes stay local until an explicit flush(), checkpoint() folds the statement WAL into a new base snapshot, and a head.json record updated with conditional writes provides a single-writer lease with fencing. It targets agent memory, keeping recall as an in-process query (local was 58x faster than remote in their benchmark) while making state survive ephemeral sandboxes and CI. Recommended practices include append-only versioned memory tables, ZSTD-compressed cold evidence with blobs stored outside the table, flushing at task boundaries, and moving to a server database when multiple writers are needed.