[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73312":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},73312,"agentfs","tursodatabase\u002Fagentfs","tursodatabase","The filesystem for agents.","https:\u002F\u002Fwww.agentfs.ai",null,"Rust",3180,172,13,56,0,5,26,82,15,86.91,false,"main",true,[26,27,28,29],"agents","filesystem","sqlite","turso","2026-06-12 04:01:09","\u003Cp align=\"center\">\n  \u003Ch1 align=\"center\">AgentFS\u003C\u002Fh1>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  The filesystem for agents.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca title=\"Build Status\" target=\"_blank\" href=\"https:\u002F\u002Fgithub.com\u002Ftursodatabase\u002Fagentfs\u002Factions\u002Fworkflows\u002Frust.yml\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Ftursodatabase\u002Fagentfs\u002Frust.yml?style=flat-square\">\u003C\u002Fa>\n  \u003Ca title=\"Rust\" target=\"_blank\" href=\"https:\u002F\u002Fcrates.io\u002Fcrates\u002Fagentfs-sdk\">\u003Cimg alt=\"Crate\" src=\"https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fagentfs-sdk\">\u003C\u002Fa>\n  \u003Ca title=\"JavaScript\" target=\"_blank\" href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fagentfs-sdk\">\u003Cimg alt=\"NPM\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fagentfs-sdk\">\u003C\u002Fa>\n  \u003Ca title=\"Python\" target=\"_blank\" href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fagentfs-sdk\u002F\">\u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fagentfs-sdk\">\u003C\u002Fa>\n  \u003Ca title=\"MIT\" target=\"_blank\" href=\"https:\u002F\u002Fgithub.com\u002Ftursodatabase\u002Fagentfs\u002Fblob\u002Fmain\u002FLICENSE.md\">\u003Cimg src=\"http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-orange.svg?style=flat-square\">\u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Ca title=\"Users's Discord\" target=\"_blank\" href=\"https:\u002F\u002Ftur.so\u002Fdiscord\">\u003Cimg alt=\"Chat with other users of Turso (and Turso Cloud) on Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F933071162680958986?label=Discord&logo=Discord&style=social&label=Users\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n> **⚠️ Warning:** This software is in BETA. It may still contain bugs and unexpected behavior. Use caution with production data and ensure you have backups.\n\n## 🎯 What is AgentFS?\n\nAgentFS is a filesystem explicitly designed for AI agents. Just as traditional filesystems provide file and directory abstractions for applications, AgentFS provides the storage abstractions that AI agents need.\n\nThe AgentFS repository consists of the following:\n\n* **SDK** - [TypeScript](sdk\u002Ftypescript), [Python](sdk\u002Fpython), and [Rust](sdk\u002Frust) libraries for programmatic filesystem access.\n* **[CLI](MANUAL.md)** - Command-line interface for managing agent filesystems:\n  - Mount AgentFS on host filesystem with FUSE on Linux and NFS on macOS.\n  - Access AgentFS files with a command line tool.\n* **[AgentFS Specification](SPEC.md)** - SQLite-based agent filesystem specification.\n\n## 💡 Why AgentFS?\n\nAgentFS provides the following benefits for agent state management:\n\n* **Auditability**: Every file operation, tool call, and state change is recorded in a SQLite database file. Query your agent's complete history with SQL to debug issues, analyze behavior, or meet compliance requirements.\n* **Reproducibility**: Snapshot an agent's state at any point with cp agent.db snapshot.db. Restore it later to reproduce exact execution states, test what-if scenarios, or roll back mistakes.\n* **Portability**: The entire agent runtime—files, state, history —is stored in a single SQLite file. Move it between machines, check it into version control, or deploy it to any system where Turso runs.\n\nRead more about the motivation for AgentFS in the announcement [blog post](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs).\n\n## 🧑‍💻 Getting Started\n\n### Using the CLI\n\nInstall the AgentFS CLI:\n\n```bash\ncurl -fsSL https:\u002F\u002Fagentfs.ai\u002Finstall | bash\n```\n\nInitialize an agent filesystem:\n\n```bash\n$ agentfs init my-agent\nCreated agent filesystem: .agentfs\u002Fmy-agent.db\nAgent ID: my-agent\n```\n\nInspect the agent filesystem:\n\n```bash\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```\n\nYou can also use a database path directly:\n\n```bash\n$ agentfs fs .agentfs\u002Fmy-agent.db cat hello.txt\nhello from agent\n```\n\nView the agent's action timeline:\n\n```bash\n$ agentfs timeline my-agent\nID   TOOL                 STATUS       DURATION STARTED\n4    execute_code         pending            -- 2024-01-05 09:44:20\n3    api_call             error           300ms 2024-01-05 09:44:15\n2    read_file            success          50ms 2024-01-05 09:44:10\n1    web_search           success        1200ms 2024-01-05 09:43:45\n```\n\nYou can mount an agent filesystem using FUSE (Linux) or NFS (macOS):\n\n```bash\n$ agentfs mount my-agent .\u002Fmnt\n$ echo \"hello\" > .\u002Fmnt\u002Fhello.txt\n$ cat .\u002Fmnt\u002Fhello.txt\nhello\n```\n\nYou can also run a program in an experimental sandbox with the agent filesystem mounted at `\u002Fagent`:\n\n```bash\n$ agentfs run \u002Fbin\u002Fbash\nWelcome to AgentFS!\n\n$ echo \"hello from agent\" > \u002Fagent\u002Fhello.txt\n$ cat \u002Fagent\u002Fhello.txt\nhello from agent\n$ exit\n```\n\nRead the **[User Manual](MANUAL.md)** for complete documentation.\n\n### Using the SDK\n\nInstall the SDK in your project:\n\n```bash\nnpm install agentfs-sdk\n```\n\nUse it in your agent code:\n\n```typescript\nimport { AgentFS } from 'agentfs-sdk';\n\n\u002F\u002F Persistent storage with identifier\nconst agent = await AgentFS.open({ id: 'my-agent' });\n\u002F\u002F Creates: .agentfs\u002Fmy-agent.db\n\n\u002F\u002F Or use ephemeral in-memory database\nconst ephemeralAgent = await AgentFS.open();\n\n\u002F\u002F Key-value operations\nawait agent.kv.set('user:preferences', { theme: 'dark' });\nconst prefs = await agent.kv.get('user:preferences');\n\n\u002F\u002F Filesystem operations\nawait agent.fs.writeFile('\u002Foutput\u002Freport.pdf', pdfBuffer);\nconst files = await agent.fs.readdir('\u002Foutput');\n\n\u002F\u002F Tool call tracking\nawait agent.tools.record(\n  'web_search',\n  Date.now() \u002F 1000,\n  Date.now() \u002F 1000 + 1.5,\n  { query: 'AI' },\n  { results: [...] }\n);\n```\n\n### Examples\n\nThis source repository also contains examples that demonstrate how to integrate AgentFS with some popular AI frameworks:\n\n- **[Mastra](examples\u002Fmastra\u002Fresearch-assistant)** - Research assistant using the Mastra AI framework\n- **[Claude Agent SDK](examples\u002Fclaude-agent\u002Fresearch-assistant)** - Research assistant using Anthropic's Claude Agent SDK\n- **[OpenAI Agents](examples\u002Fopenai-agents\u002Fresearch-assistant)** - Research assistant using OpenAI Agents SDK\n- **[Firecracker](examples\u002Ffirecracker)** - Minimal Firecracker VM with AgentFS mounted via NFSv3\n- **[AI SDK + just-bash](examples\u002Fai-sdk-just-bash)** - Interactive AI agent using Vercel AI SDK with just-bash for command execution\n- **[Cloudflare Workers](examples\u002Fcloudflare)** - AI agent using AI SDK + just-bash on Cloudflare Workers with Durable Objects storage\n\nSee the **[examples](examples)** directory for more details.\n\n## 🔧 How AgentFS Works?\n\n\u003Cimg align=\"right\" width=\"40%\" src=\".github\u002Fassets\u002Fagentfs-arch.svg\">\n\nAgentFS is an agent filesystem accessible through an SDK that provides three essential interfaces for agent state management:\n\n* **Filesystem:** A POSIX-like filesystem for files and directories\n* **Key-Value:** A key-value store for agent state and context\n* **Toolcall:** A toolcall audit trail for debugging and analysis\n\nAt the heart of AgentFS is the [agent filesystem](SPEC.md), a complete SQLite-based storage system for agents implemented using [Turso](https:\u002F\u002Fgithub.com\u002Ftursodatabase\u002Fturso). Everything an agent does—every file it creates, every piece of state it stores, every tool it invokes—lives in a single SQLite database file.\n\n## 🤔 FAQ\n\n### How is AgentFS different from _X_?\n\n[Bubblewrap](https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap) provides filesystem isolation using Linux namespaces and overlays. While you could achieve similar isolation with a `bwrap` call that mounts `\u002F` read-only and uses `--tmp-overlay` on the working directory, the key difference is persistence and queryability: with AgentFS, the upper filesystem is stored in a single SQLite database file, which you can query, snapshot, and move to another machine. Read more about the motivation in the announcement [blog post](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs).\n\n[Docker Sandbox](https:\u002F\u002Fwww.docker.com\u002Fblog\u002Fdocker-sandboxes-a-new-approach-for-coding-agent-safety\u002F) and AgentFS are complementary rather than competing. AgentFS answers \"what happened and what's the state?\" while Docker Sandboxes answer \"how do I run this safely?\" You could use both together: run an agent inside a Docker Sandbox for security, while using AgentFS inside that sandbox for structured state management and audit trails.\n\n[Git worktrees](https:\u002F\u002Fgit-scm.com\u002Fdocs\u002Fgit-worktree) let you check out multiple branches of a repository into separate directories, allowing agents to work on independent copies of the source code—similar to AgentFS. But AgentFS solves the problem at a lower level. With git worktrees, nothing prevents an agent from modifying files outside its worktree: another agent's worktree, system files, or anything else on the filesystem. The isolation is purely conventional, not enforced. AgentFS provides filesystem-level copy-on-write isolation that's system-wide and cannot be bypassed—letting you safely run untrusted agents. And because it operates below git, it also handles untracked files, making it useful beyond just version-controlled source code.\n\n### Why implement AgentFS at the filesystem layer instead of using containers or VMs?\n\nThe filesystem layer gives us capabilities that block devices can't. First, because everything is stored in structured SQLite tables, you can query the filesystem, which is essential for auditability and debugging agent behavior. Second, SQLite's write-ahead log enables snapshotting and time-travel forking by capturing every filesystem change. Third, we can provide an SDK that works in environments such as serverless or the browser, where there's no way to mount a block device at all. Note that this approach works fine with containers and VMs too—you can use AgentFS via remote filesystem protocols like NFS or through mechanisms like virtio-fuse.\n\n## 📚 Learn More\n\n- **[User Manual](MANUAL.md)** - Complete guide to using the AgentFS CLI and SDK\n- **[Agent Filesystem Specification](SPEC.md)** - Technical specification of the agent filesystem SQLite schema\n- **[SDK Examples](examples\u002F)** - Working code examples using AgentFS\n- **[Turso database](https:\u002F\u002Fgithub.com\u002Ftursodatabase\u002Fturso)** - an in-process SQL database, compatible with SQLite.\n\n### Blog Posts\n\n- **[Introducing AgentFS](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs)** - The motivation behind AgentFS\n- **[AgentFS with FUSE](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs-fuse)** - Mounting agent filesystems using FUSE\n- **[AgentFS with Overlay Filesystem](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs-overlay)** - Sandboxing agents with copy-on-write overlays\n- **[AI Agents with Just Bash](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs-just-bash)** - Safe bash command execution for agents\n- **[AgentFS in the Browser](https:\u002F\u002Fturso.tech\u002Fblog\u002Fagentfs_browser)** - Running AgentFS in browsers with WebAssembly\n- **[Making Coding Agents Safe Using LlamaIndex](https:\u002F\u002Fwww.llamaindex.ai\u002Fblog\u002Fmaking-coding-agents-safe-using-llamaindex)** - Using AgentFS with LlamaIndex\n\n## 📝 License\n\nMIT\n","AgentFS 是一个专为AI代理设计的文件系统，旨在提供适合AI代理需求的存储抽象。该项目使用Rust语言开发，并通过SQLite实现数据持久化，支持包括TypeScript、Python和Rust在内的多种编程语言SDK，以及命令行工具来管理文件系统。其核心特性包括可审计性（所有操作记录于SQLite数据库中）、可再现性（可通过复制数据库文件来保存或恢复状态）及便携性（整个运行环境可以单一SQLite文件形式迁移）。适用于需要对AI代理的状态进行精细控制与管理的应用场景，如自动化流程、智能助手等，特别适合那些重视数据跟踪、调试便利性和跨平台部署能力的项目。",2,"2026-06-11 03:44:59","high_star"]