@desplega.ai/agent-fs

中文文档
0.18.25发布于 2026/11/12MITES Module构建来源已验证近 30 天下载 9817

Agent-first filesystem backed by S3

原始使用文档
文档目录13 节
  1. Key Features
  2. Quick Start
  3. Install
  4. Usage
  5. Architecture
  6. FUSE mount (Linux)
  7. Documentation
  8. Development
  9. Releasing
  10. Deploy to Fly.io
  11. Live Viewer
  12. Contributing
  13. License

GitHub Stars MIT License PRs Welcome Discord

A persistent, searchable filesystem for AI agents.
Built by desplega.sh — by builders, for builders.


Agent FS gives AI agents a structured filesystem with built-in semantic search, versioning, and identity management. It runs as a CLI and an HTTP server with integrated MCP support — so any AI coding assistant can use it as a long-term memory and file store.

agent-fs was built to power the shared filesystem in agent-swarm — a multi-agent coordination framework. While it was designed for swarm agents to share files, search content, and collaborate, it works as a standalone filesystem for any AI agent.

Key Features

  • Semantic search: Index and search files using vector embeddings (OpenAI, Google GenAI, OpenRouter, Cheaper Inference, or local). Local runs nomic-embed-text-v1.5 on llama.cpp or EmbeddingGemma 2 on transformers.js.
  • SQL queries — Run sandboxed DuckDB SQL over stored documents (CSV, TSV, Parquet, Excel, JSON, NDJSON, SQLite, DuckDB) — see docs/sql.md
  • Structured storage — SQLite-backed file operations with metadata and versioning
  • S3-compatible sync — Sync agent workspaces to any S3-compatible object store
  • Identity management — Persistent agent identity files that evolve over time
  • MCP integration — Expose filesystem operations as MCP tools for Claude Code, Codex, and other assistants
  • HTTP API — RESTful server powered by Hono for programmatic access
  • CLI — Single binary (agent-fs) for local use and scripting

Quick Start

Install

Requires Bun >= 1.4.0.

bun add -g @desplega.ai/agent-fs

Or build from source:

git clone https://github.com/desplega-ai/agent-fs.git
cd agent-fs
bun install
bun run build

Usage

# Show available commands
agent-fs --help

Architecture

Agent FS is a Bun monorepo with four packages:

PackageDescription
@desplega.ai/agent-fs-coreCore library — storage engine, semantic search, identity, S3 sync
@desplega.ai/agent-fsCLI binary (agent-fs)
@desplega.ai/agent-fs-mcpMCP stdio proxy + tool registration for the HTTP server
@desplega.ai/agent-fs-serverHTTP server — RESTful API powered by Hono

FUSE mount (Linux)

agent-fs can expose your drives as a Linux FUSE filesystem so agents can use plain shell verbs (cat, grep, mv, rm) against agent-fs content.

# Linux only — the FUSE helper sub-package auto-installs via optionalDependencies.
# Use Bun's installer; stock Ubuntu/Debian Node (18.x) chokes on a dep's
# postinstall and aborts the global install.
bun install -g @desplega.ai/agent-fs
agent-fs daemon start
agent-fs mount /mnt/agent-fs

Requirements

  • Linux x86_64 or aarch64. macOS and Windows are not supported (FUSE is a Linux kernel feature here).
  • /dev/fuse must be accessible. In Docker, run with --cap-add SYS_ADMIN --device /dev/fuse.
  • Sandboxes that use gVisor (GKE Sandbox, Cloud Run gen1), GitHub Codespaces, Modal sandboxes, or Fly.io Machines cannot mount FUSE — fall back to the CLI/MCP path.

Local-dev escape hatch (AGENT_FS_FUSE_BIN)

If you're building the helper from source (e.g. macOS dev host or a custom Linux build), point the CLI at your local binary:

cd packages/fuse-helper && cargo build --release
export AGENT_FS_FUSE_BIN="$PWD/target/release/agent-fs-fuse"
agent-fs mount /tmp/m

AGENT_FS_FUSE_BIN takes precedence over the auto-resolved sub-package binary.

Remote mount (--remote)

When your agents run inside a sandbox that can't host a local daemon (Sprite, E2B, ephemeral CI runners), point the mount at a remote agent-fs HTTP API instead of a local Unix socket:

agent-fs mount /mnt/agent-fs --remote \
  --api-url https://my-agent-fs.example.com \
  --api-key "$AGENT_FS_API_KEY"

The helper talks to the remote API directly — no local daemon, no S3 credentials in the sandbox. End-to-end coverage for this topology lives at scripts/e2e-remote-mount.ts:

# Spins up MinIO, a host-side daemon, and a Docker container with fuse3.
# Mounts via --remote against the daemon's HTTP API and exercises ~8 ops.
# Requires Docker Desktop / OrbStack on Mac.
bun run scripts/e2e-remote-mount.ts

macOS testing harness

macOS can build the helper but not mount it. Use the Docker harness to test mount behaviour from a Mac host:

bash packages/fuse-helper/docker/run-mount-test.sh

Per-environment guides

See docs/mounting/ for the general overview plus step-by-step guides for Sprite, E2B, and Hetzner Cloud. Existing FUSE references — fuse-mount.md, fuse-compat.md, fuse-troubleshooting.md — cover mount semantics, sandbox compatibility, and the full error catalogue.

Documentation

Development

bun install          # Install dependencies
bun run typecheck    # Type checking
bun run test         # Run tests
bun run build        # Bundle CLI for npm

See CONTRIBUTING.md for the full development guide.

Releasing

Releases are automatic — a version change landing on main tags and publishes.

./scripts/release.sh 0.13.0

See RELEASING.md for the full process, version-sync rules, and recovery steps.

Deploy to Fly.io

Deploy a persistent agent-fs instance to Fly.io with Tigris S3 storage:

git clone https://github.com/desplega-ai/agent-fs && cd agent-fs
bun run scripts/fly-deploy.ts

See DEPLOYMENT.md for Docker, BYOK storage, and manual setup options.

Live Viewer

live.agent-fs.dev — A stateless browser UI (local storage only) for inspecting any agent-fs deployment. Point it at your server URL to browse files and search content — nothing is stored server-side.

Search covers the selected drive. Files matches filename patterns across all directories. Full-text treats input as literal terms, so ai-tinkerers needs no query-language quoting in the UI. Hybrid combines keywords and meaning. Semantic requires an embedding provider. The UI distinguishes request errors, provider hints, and successful searches with no matches. An open file outside the results carries a separate label.

The CLI and MCP fts operation retain raw FTS5 syntax. Use agent-fs fts '"ai-tinkerers"' for a punctuation-bearing term.

Contributing

We welcome contributions! Whether it's bug reports, feature requests, docs improvements, or code — all are welcome.

  1. Fork the repo
  2. Create a branch (git checkout -b my-feature)
  3. Make your changes
  4. Open a PR

Join our Discord if you have questions or want to discuss ideas.

License

MIT — 2025-2026 desplega.ai

版本与发布记录

@desplega.ai/agent-fs 共发布 83 个版本,首次发布于 2026/03/17;过去 12 个月发布了 83 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.18.25latest2026/11/12今天
0.18.242026/11/102 天前
0.18.232026/11/084 天前
0.18.222026/11/066 天前
0.18.212026/11/066 天前
0.18.202026/11/056 天前

关于 @desplega.ai/agent-fs 的常见问题

@desplega.ai/agent-fs 是什么?

Agent-first filesystem backed by S3

如何安装 @desplega.ai/agent-fs?

在项目目录运行 npm install @desplega.ai/agent-fs,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agent-fs,可以用 npx agent-fs 直接运行。

@desplega.ai/agent-fs 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/desplega.ai__agent-fs 是否存在。

@desplega.ai/agent-fs 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@desplega.ai/agent-fs 可以商用吗?

@desplega.ai/agent-fs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@desplega.ai/agent-fs 的下载量有多少?

根据 npm 官方下载统计,@desplega.ai/agent-fs 在 2026/10/12 – 2026/11/10 这 30 天内被下载 9,817 次,日均约 327 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@desplega.ai/agent-fs 还在维护吗?

最新版本 0.18.25 发布于 2026/11/12(今天);至今共发布 83 个版本,其中过去 12 个月发布了 83 个;首次发布于 2026/03/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。