---
title: "AgentFS in the Browser"
description: "AgentFS gives browser-based agents a virtual filesystem stored in a SQLite database, using Turso's WASM build of its Rust rewrite of SQLite."
url: "https://swe.quest/articles/agentfs-in-the-browser-5b295716ac634197"
canonical: "https://turso.tech/blog/agentfs_browser"
source: "Turso"
published: "2025-12-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["ai-agents","sqlite","webassembly","browsers","local-first"]
---

# AgentFS in the Browser

A post on [Turso](https://swe.quest/sources/turso.md), published 2025-12-22, 5 min read, How-to. Original: [https://turso.tech/blog/agentfs\_browser](https://turso.tech/blog/agentfs_browser)

## Summary

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

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Local-first & sync](https://swe.quest/tags/local-first.md) (Architecture & design)

## Prerequisites

- JavaScript async/await ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- SQLite basics ([easy posts on SQLite](https://swe.quest/tags/sqlite.md?difficulty=easy))
- AI agent tool use ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

AgentFS, Turso, OPFS, isomorphic-git, Turso Cloud, SQLite

## Related posts

- [AgentFS with FUSE: SQLite-backed agent state as a POSIX filesystem](https://swe.quest/articles/agentfs-with-fuse-sqlite-backed-agent-state-as-a-posix-filesystem-5f39c709b604ee45.md): Turso · 2025-12-08 · Medium · 7 min read · AI agents, SQLite, Linux, Storage systems, Rust
  AgentFS adds an \`agentfs mount\` command that exposes its SQLite-backed agent filesystem as a real POSIX filesystem via Linux FUSE.
- [The Missing Abstraction for AI Agents: The Agent Filesystem](https://swe.quest/articles/the-missing-abstraction-for-ai-agents-the-agent-filesystem-ef7d12c3499d3c42.md): Turso · 2025-11-13 · Medium · 8 min read · AI agents, SQLite, Observability, Storage systems
  AgentFS 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.
- [Building AI agents with just bash and a filesystem in TypeScript](https://swe.quest/articles/building-ai-agents-with-just-bash-and-a-filesystem-in-typescript-0ae4e4a2ddfb7c37.md): Turso · 2026-01-02 · Medium · 3 min read · AI agents, Sandboxing & isolation, TypeScript, SQLite
  just-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.
- [AgentFS with copy-on-write overlay filesystem](https://swe.quest/articles/agentfs-with-copy-on-write-overlay-filesystem-c1809b9cbbc5773b.md): Turso · 2025-12-31 · Medium · 5 min read · Sandboxing & isolation, AI agents, Storage systems, Linux, SQLite
  AgentFS 0.4 adds \`agentfs run\`, which launches a coding agent in a sandbox where the working directory is a copy-on-write overlay.
- [How We Built the Turso Shell in the Browser](https://swe.quest/articles/how-we-built-the-turso-shell-in-the-browser-3b4c7642ce66be0b.md): Turso · 2025-10-14 · Medium · 9 min read · WebAssembly, SQLite, React, Frontend, Browsers
  Turso's SQLite-compatible database can run entirely in the browser via WebAssembly, persisting data to OPFS with no backend.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
