# AgentFS

> 建構於 Turso 之上的 AI 代理專屬檔案系統
> Canonical HTML: https://tursodb.cn/zh-tw/docs/agentfs/introduction/
> Upstream Source (MIT): https://docs.turso.tech/agentfs/introduction
> Language: zh-TW

---
AgentFS 是專為 AI 代理打造的檔案系統。它提供寫時複製（Copy-on-Write）隔離機制，讓代理能夠安全地修改檔案，同時確保您的原始資料完好無損。
它同時提供兩種使用形式：一是可將既有程式包覆在沙箱工作階段中執行的 CLI 工具，二是讓您以檔案系統抽象建置自訂代理的 SDK。

## 核心功能

* **寫時複製隔離（Copy-on-Write Isolation）** — 在沙箱環境中執行 AI 代理，所有變更皆與您的原始碼目錄樹完全隔離
* **單一檔案儲存** — 所有資料皆儲存於單一個可攜式 SQLite 資料庫檔案中，方便分享與建立快照
* **內建稽核追蹤** — 每一項檔案操作皆會完整記錄並可隨時透過查詢檢視
* **雲端同步** — 可選擇性地將代理狀態同步至 Turso Cloud

## 快速上手

```bash
# Install
curl -fsSL https://agentfs.ai/install | bash

# Run a shell in an isolated environment
cd /path/to/project
agentfs run bash

# Any changes are isolated - your original files are safe
```

## 下一步

<div class="doc-cards">
<a class="doc-card" href="/zh-tw/docs/agentfs/installation/"><div class="doc-card-title"><span>安裝指南</span><span class="doc-card-arrow" aria-hidden="true">→</span></div><p class="doc-card-desc">安裝 AgentFS CLI</p></a>
<a class="doc-card" href="/zh-tw/docs/agentfs/guides/sandbox/"><div class="doc-card-title"><span>代理式寫程式（Agentic Coding）</span><span class="doc-card-arrow" aria-hidden="true">→</span></div><p class="doc-card-desc">安全地執行 AI 寫程式代理</p></a>
<a class="doc-card" href="https://docs.turso.tech/agentfs/sdk" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>AgentFS SDK</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div><p class="doc-card-desc">使用 AgentFS SDK 建置自訂代理</p></a>
</div>


<div class="doc-callout doc-callout-warning"><div class="doc-callout-title">警告</div><div class="doc-callout-body">

本軟體目前處於 BETA 階段，仍可能包含臭蟲或未預期的行為。處理正式環境資料時請務必審慎操作並確保已做好備份。

</div></div>
