{"name":"AgentFS: The Filesystem Designed for AI Agents and Their State Management","description":"AgentFS is an innovative filesystem specifically engineered for AI agents, providing robust storage abstractions. It leverages SQLite to offer auditability, reproducibility, and portability for agent states, tool calls, and file operations. This solution simplifies debugging, analysis, and deployment of AI agents by encapsulating their entire runtime into a single, queryable database file.","github":"https://github.com/tursodatabase/agentfs","url":"https://osrepos.com/repo/tursodatabase-agentfs","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/tursodatabase-agentfs","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/tursodatabase-agentfs.md","json":"https://osrepos.com/repo/tursodatabase-agentfs.json","topics":["agents","filesystem","sqlite","turso","Rust","AI","Database","Open Source"],"keywords":["agents","filesystem","sqlite","turso","Rust","AI","Database","Open Source"],"stars":null,"summary":"AgentFS is an innovative filesystem specifically engineered for AI agents, providing robust storage abstractions. It leverages SQLite to offer auditability, reproducibility, and portability for agent states, tool calls, and file operations. This solution simplifies debugging, analysis, and deployment of AI agents by encapsulating their entire runtime into a single, queryable database file.","content":"## Introduction\nAgentFS is a specialized filesystem designed explicitly for AI agents, offering the necessary storage abstractions for their operations. It comprises an SDK for programmatic access in TypeScript, Python, and Rust, a CLI for managing agent filesystems, and a SQLite-based specification. This project aims to provide a structured and auditable environment for agent state management.\n\n## Why Use and Benefits\nAgentFS offers significant advantages for managing agent state:\n*   **Auditability**: Every file operation, tool call, and state change is recorded in a SQLite database, allowing you to query your agent's complete history for debugging, analysis, or compliance.\n*   **Reproducibility**: You can snapshot an agent's state at any point and restore it later to reproduce exact execution states, test scenarios, or roll back mistakes.\n*   **Portability**: The entire agent runtime, including files, state, and history, is stored in a single SQLite file, making it easy to move between machines, check into version control, or deploy.\n\nAgentFS differs from other solutions by operating at the filesystem layer, providing unique capabilities. Unlike Bubblewrap, it offers persistence and queryability of the upper filesystem. It complements Docker Sandboxes by focusing on structured state management and audit trails within a secure environment. Compared to Git worktrees, AgentFS provides system-wide, enforced copy-on-write isolation, handling untracked files and ensuring safety for untrusted agents. The choice of the filesystem layer, backed by SQLite and Turso, enables queryable data, snapshotting, time-travel forking, and SDK support in diverse environments like serverless or browsers.\n\n## Installation\n\n### Using the CLI\nInstall the AgentFS CLI with a simple curl command:\nbash\ncurl -fsSL https://agentfs.ai/install | bash\n\nInitialize an agent filesystem:\nbash\n$ agentfs init my-agent\nCreated agent filesystem: .agentfs/my-agent.db\nAgent ID: my-agent\n\nInspect and interact with the filesystem:\nbash\n$ agentfs fs my-agent ls\nUsing agent: my-agent\nf hello.txt\n\n$ agentfs fs my-agent cat hello.txt\nhello from agent\n\nYou can also mount an agent filesystem using FUSE (Linux) or NFS (macOS):\nbash\n$ agentfs mount my-agent ./mnt\n\n\n### Using the SDK\nInstall the SDK in your project (e.g., for TypeScript):\nbash\nnpm install agentfs-sdk\n\nThen, use it in your agent code:\ntypescript\nimport { AgentFS } from 'agentfs-sdk';\n\n// Persistent storage with identifier\nconst agent = await AgentFS.open({ id: 'my-agent' });\n\n// Key-value operations\nawait agent.kv.set('user:preferences', { theme: 'dark' });\n\n// Filesystem operations\nawait agent.fs.writeFile('/output/report.pdf', pdfBuffer);\n\n// Tool call tracking\nawait agent.tools.record(\n  'web_search',\n  Date.now() / 1000,\n  Date.now() / 1000 + 1.5,\n  { query: 'AI' },\n  { results: [...] }\n);\n\n\n## Examples\nThe AgentFS repository includes various examples demonstrating integration with popular AI frameworks. These include research assistants built with Mastra, Anthropic's Claude Agent SDK, and OpenAI Agents. Other examples showcase usage with Firecracker VMs, Vercel AI SDK, and Cloudflare Workers. You can explore these in the [examples directory](https://github.com/tursodatabase/agentfs/tree/main/examples).\n\n## Links\n*   **User Manual**: A comprehensive guide to the AgentFS CLI and SDK. [MANUAL.md](https://github.com/tursodatabase/agentfs/blob/main/MANUAL.md)\n*   **Agent Filesystem Specification**: Technical details of the SQLite schema. [SPEC.md](https://github.com/tursodatabase/agentfs/blob/main/SPEC.md)\n*   **SDK Examples**: Working code examples for various integrations. [examples/](https://github.com/tursodatabase/agentfs/tree/main/examples)\n*   **Turso Database**: The underlying in-process SQL database compatible with SQLite. [https://github.com/tursodatabase/turso](https://github.com/tursodatabase/turso)\n*   **Introducing AgentFS**: Learn about the motivation behind AgentFS. [https://turso.tech/blog/agentfs](https://turso.tech/blog/agentfs)\n*   **AgentFS with FUSE**: Details on mounting agent filesystems. [https://turso.tech/blog/agentfs-fuse](https://turso.tech/blog/agentfs-fuse)\n*   **AgentFS in the Browser**: Running AgentFS with WebAssembly. [https://turso.tech/blog/agentfs_browser](https://turso.tech/blog/agentfs_browser)","metrics":{"detailViews":2,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-05T20:29:51.000Z"}}