skip to content
FILESYSTEM.md

Virtual Filesystem for Agents

Last updated:

View Markdown source

Builder procedure

Core idea

Expose a single namespace of paths. Agents should not need to know whether a path is a local file, a synthesized JSON view, or a remote object.

Minimal API (MUST-level capabilities)

Implement at least:

stat(path) -> { type: file|dir|missing, size?, mtime? }
list(path) -> entries[]
read(path) -> bytes|text
write(path, bytes|text, { mode: create|overwrite|append })
mkdir(path)
remove(path) # optional; prefer policy-gated

Optional but valuable:

grep(root, pattern) -> matches[]
watch(path) -> events # for long-running agents

Path rules (SHOULD)

Virtual files (MAY)

A path need not map 1:1 to disk:

Logical pathPossible backing
/memories/users/ada.jsonSQL row rendered as JSON
/docs/policy.mdObject store / DMS download
/workspace/out.mdLocal sandbox file
/proc/session.jsonLive runtime state

The agent still uses read / write. The backend performs translation.

Consistency model (SHOULD document)

Tell agents (in FILESYSTEM.md / TOOLS.md) what to expect:

Checklist

Human notes

Virtual FS is the hinge between agent cognition (paths) and storage reality (DB/S3/disk). Prefer a small, boring API over a clever one. See also Composite backend and Infrastructure mounts.