Skip to Content
MissionsFolders

Folders

Folders are filesystem locations that agents can read from and write to. Squadron gives you three kinds, each suited to a different use case:

KindUse it forLifetime
SharedReference data or output that many missions touchPersists
MissionA mission’s own long-lived state — archives, accumulated outputPersists
RunScratch space for the work happening right nowOne per run

Agents reach folders through the file_list, file_read, file_create, file_delete, file_search, and file_grep tools, naming the folder on each call.

A mission can use any number of shared folders, plus one of each mission-scoped kind. The names mission and run are reserved.

Shared Folders

Declared at the top level so multiple missions can share the same data:

shared_folder "research" { path = "./data/research" description = "Shared research documents" editable = true } shared_folder "reference" { path = "./data/reference" # no editable flag → read-only }
AttributeTypeDescription
pathstringDirectory path (created if missing)
descriptionstringHuman-readable description shown to agents
labelstringOptional label (falls back to description)
editableboolIf true, agents may write. Default false (read-only)

Missions opt in by listing them, then refer to them by name in tool calls:

mission "analyze" { folders = [shared_folders.research, shared_folders.reference] # agents call e.g. file_read with folder = "research" }

The Mission Folder

The mission’s own dedicated folder. Use it for things you want to keep around: a running log, an archive of finished reports, accumulated state across runs.

mission "analyze" { folder { path = "./analyses" description = "Cumulative analysis output across every run" } }

Agents reach it under the name mission:

{ "folder": "mission", "path": "2026-04-23/report.md", "content": "..." }
AttributeTypeDescription
pathstringDirectory path (created if missing)
descriptionstringShown to agents alongside the folder name

The Run Folder

A clean workspace for one mission run. Each invocation gets its own subdirectory, isolated from previous and concurrent runs — perfect for intermediate files, working drafts, or anything you don’t want bleeding into the next run.

mission "analyze" { run_folder { description = "Scratch space for this run" } }

By default, run folders are deleted 7 days after the run started. Set cleanup to override the window, or cleanup = 0 to keep folders forever.

Agents reach it under the name run:

{ "folder": "run", "path": "notes.txt", "content": "..." }
AttributeTypeDescription
basestringWhere run folders live. Defaults to .squadron/runs — change it if you want them somewhere else
descriptionstringShown to agents alongside the folder name
cleanupintegerDelete the folder this many days after the run started. Defaults to 7; set 0 to keep forever

Run folders stick around after the mission ends — useful for inspecting what an agent produced, and required for squadron mission --resume <id> to find its workspace. cleanup is just a max age; nothing is deleted while a run is in flight.

Tool Reference

All six folder tools take a required folder parameter:

ToolPurpose
file_listList files and directories, with optional recursion and pagination
file_readRead a file (optionally capped by lines or bytes)
file_createCreate, overwrite, or append to a file
file_deleteDelete a file (directories are not allowed)
file_searchRecursively search for files by filename regex
file_grepSearch file contents by regex

Paths are always relative to the folder root. Absolute paths and .. escapes are rejected.

Full Example

shared_folder "reference" { path = "./data/reference" description = "Reference materials shared across missions" } mission "research" { commander { model = models.anthropic.claude_sonnet_4 } agents = [agents.researcher] folders = [shared_folders.reference] folder { path = "./research_archive" description = "Finished reports, one per run" } run_folder { description = "Working files for the in-flight run" cleanup = 14 # override the 7-day default } task "gather" { objective = "Gather sources from the reference folder and save notes to the run folder" } task "publish" { depends_on = [tasks.gather] objective = "Write the final report into the mission folder" } }
Last updated on