agentfs command-line tool.
For the latest reference, see MANUAL.md in the repository.
Installation
Commands
agentfs init
Initialize a new agent filesystem.ID- Agent identifier (default:agent-{timestamp})
| Option | Description |
|---|---|
--force | Overwrite existing agent filesystem |
--base <PATH> | Base directory for overlay filesystem |
--sync-remote-url <URL> | Remote Turso database URL |
agentfs run
Execute a program in a sandboxed environment.| Option | Description |
|---|---|
--session <ID> | Named session for persistence |
--allow <PATH> | Allow write access to directory |
--no-default-allows | Disable default allowed directories |
--experimental-sandbox | Use ptrace sandbox (Linux) |
--strace | Show intercepted syscalls |
agentfs mount
Mount an agent filesystem or list mounts.| Option | Description |
|---|---|
-a, --auto-unmount | Automatically unmount on exit |
--allow-root | Allow root user access |
-f, --foreground | Run in foreground |
--uid <UID> | User ID for files |
--gid <GID> | Group ID for files |
- Linux:
fusermount -u <MOUNT_POINT> - macOS:
umount <MOUNT_POINT>
agentfs serve mcp
Start an MCP (Model Context Protocol) server.| Option | Description |
|---|---|
--tools <TOOLS> | Comma-separated list of tools |
| Category | Tools |
|---|---|
| Filesystem | read_file, write_file, readdir, mkdir, remove, rename, stat, access |
| Key-Value | kv_get, kv_set, kv_delete, kv_list |
agentfs serve nfs
Start an NFS server.| Option | Description |
|---|---|
--bind <IP> | IP to bind (default: 127.0.0.1) |
--port <PORT> | Port (default: 11111) |
agentfs sync
Synchronize with a remote Turso database.| Command | Description |
|---|---|
pull | Pull remote changes |
push | Push local changes |
stats | View sync statistics |
checkpoint | Create checkpoint |
agentfs fs
Filesystem operations on agent databases.agentfs fs ls
f <name> for files, d <name> for directories.
agentfs fs cat
agentfs fs write
agentfs diff
Show filesystem changes in overlay mode.agentfs timeline
Display agent action timeline.| Option | Description |
|---|---|
--limit <N> | Limit entries (default: 100) |
--filter <TOOL> | Filter by tool name |
--status <STATUS> | Filter: pending, success, error |
--format <FORMAT> | Output: table, json |
agentfs completions
Manage shell completions.bash, zsh, fish, powershell
Environment Variables
Variables set inside the sandbox:| Variable | Description |
|---|---|
AGENTFS | Set to 1 inside sandbox |
AGENTFS_SANDBOX | Sandbox type |
AGENTFS_SESSION | Session ID |
Files
| Path | Description |
|---|---|
.agentfs/<ID>.db | Agent filesystem database |
~/.config/agentfs/ | Configuration directory |