---
title: "The Missing Abstraction for AI Agents: The Agent Filesystem"
description: "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."
url: "https://swe.quest/articles/the-missing-abstraction-for-ai-agents-the-agent-filesystem-ef7d12c3499d3c42"
canonical: "https://turso.tech/blog/agentfs"
source: "Turso"
published: "2025-11-13"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["ai-agents","sqlite","observability","storage-systems"]
---

# The Missing Abstraction for AI Agents: The Agent Filesystem

A post on [Turso](https://swe.quest/sources/turso.md), published 2025-11-13, 8 min read, Announcement. Original: [https://turso.tech/blog/agentfs](https://turso.tech/blog/agentfs)

## Summary

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

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)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)

## Prerequisites

- AI agents ([easy posts on AI agents](https://swe.quest/tags/ai-agents.md?difficulty=easy))
- SQLite basics ([easy posts on SQLite](https://swe.quest/tags/sqlite.md?difficulty=easy))
- POSIX filesystem concepts ([easy posts on Storage systems](https://swe.quest/tags/storage-systems.md?difficulty=easy))

## Keywords

AgentFS, Turso, SQLite, Mastra, FUSE

## 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.
- [AgentFS in the Browser](https://swe.quest/articles/agentfs-in-the-browser-5b295716ac634197.md): Turso · 2025-12-22 · Medium · 5 min read · AI agents, SQLite, WebAssembly, Browsers, Local-first & sync
  AgentFS gives browser-based agents a virtual filesystem stored in a SQLite database, using Turso's WASM build of its Rust rewrite of SQLite.
- [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.
- [Building AI Agent Databases: A Complete Guide to Database-per-Agent Architecture](https://swe.quest/articles/building-ai-agent-databases-a-complete-guide-to-database-per-agent-architecture-e621ee857e5a5f4f.md): Turso · 2026-07-20 · Medium · 7 min read · Multi-tenancy, AI agents, SQLite, Local-first & sync, Vector search
  Giving each AI agent its own SQLite-style database, instead of sharing tables keyed by tenant\_id or using schema-per-tenant, makes isolation, debugging and cleanup trivial: deleting an agent is a single API call.

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)
