The filesystem block declares the virtual filesystem the agent's components see.
The filesystem block declares what the agent's virtual filesystem contains. It is optional. When
it is omitted, the agent has a single in-memory filesystem mounted at /, which is the same as
writing:
filesystem {
mounts = [
{
path = "/"
backend = { kind = "memory" }
}
]
}| Field | Type | Required | runtime() | Default | Description |
|---|---|---|---|---|---|
mounts | list of mount objects | no | no | A single in-memory mount at / | The mounts making up the virtual filesystem. |
Each mount has two fields:
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Where the backend is mounted in the virtual filesystem. |
backend | backend object | yes | What serves that path. |
Later entries win. If two mounts target the same path, the later one replaces the earlier one.
Every backend object has a kind field written in snake case.
A memory backend starts empty and exists only for the lifetime of the process.
filesystem {
mounts = [
{
path = "/"
backend = { kind = "memory" }
}
]
}This backend has no additional fields.
A host backend exposes a real host directory inside the virtual filesystem.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
root | string | yes | The host directory this mount exposes. | |
follow_symlinks | boolean | no | false | Whether a symbolic link inside the mount may resolve outside its root. |
filesystem {
mounts = [
{
path = "/workspace"
backend = {
kind = "host"
root = "./workspace"
}
}
]
}Nothing above root is reachable.
A read_only backend wraps another backend and refuses every write through it.
| Field | Type | Required | Description |
|---|---|---|---|
inner | backend object | yes | The backend to expose as read only. |
filesystem {
mounts = [
{
path = "/reference"
backend = {
kind = "read_only"
inner = {
kind = "host"
root = "./reference"
}
}
}
]
}An overlay backend reads from an upper backend first and falls through to a lower backend. Writes
go to the upper backend.
| Field | Type | Required | Description |
|---|---|---|---|
upper | backend object | yes | The writable layer checked first. |
lower | backend object | yes | The fallback layer checked second. |
filesystem {
mounts = [
{
path = "/workspace"
backend = {
kind = "overlay"
upper = { kind = "memory" }
lower = {
kind = "read_only"
inner = {
kind = "host"
root = "./workspace"
}
}
}
}
]
}read_only and overlay both nest backends rather than paths, so any composition is expressible.
Three sources compose into the final filesystem view, and a later registration at the same path wins:
mounts.The topology is otherwise fixed when the agent is compiled. Operator binds are the runtime-adjustable part.
| Variable | Meaning |
|---|---|
AGENT__FILESYSTEM__BINDS__<n>__PATH | Where the bind appears in the virtual filesystem. |
AGENT__FILESYSTEM__BINDS__<n>__ROOT | The host directory it exposes. |
AGENT__FILESYSTEM__BINDS__<n>__READONLY | Whether writes through it are refused. |
AGENT__FILESYSTEM__BINDS__<n>__FOLLOW_SYMLINKS | Whether a symbolic link may resolve outside the root. |
See agentc:fs for what component code sees and Give your agent a filesystem for the step-by-step recipe.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0Search the agentc documentation