SWIRLS_
Memory

Disks

A shared remote file system for workflows and agents. Top-level disk blocks declare the mount; disk nodes run commands on it.

What it is. A file system: arbitrary blob storage for unstructured data, mounted into your workflows. Disks are Archil-backed remote volumes with S3-compatible object storage underneath.

Use it when workflows and agents need shared state on disk, you want to control the contents of a file system from a workflow, or an agent needs a workspace. Agents are very good at navigating file systems, which makes a disk the natural shared memory between an agent and the workflows around it.

Works with type: disk nodes (which run shell commands on the mount), agents (sandboxes can work against disk contents), and a secret block carrying the runtime API key.

disk

A top-level disk <name> { } block declares the mount. There is no type: field; the keyword identifies the block.

FieldRequiredNotes
idYesQuoted string. Archil disk identifier matching dsk- plus 16 hex characters.
secretsYesBare identifier naming a secret block that declares ARCHIL_API_KEY in its vars.
labelNoDisplay string. Defaults to the disk's name.
regionNoQuoted string, e.g. "aws-us-east-1".
secret disk_creds {
  vars: [ARCHIL_API_KEY]
}

disk proj {
  label: "Project disk"
  id: "dsk-0123456789abcdef"
  region: "aws-us-east-1"
  secrets: disk_creds
}

Using it from a workflow

A type: disk node binds to the block by bare identifier and runs one shell command on the mount:

workflow backup {
  label: "Backup logs"
  root {
    type: disk
    label: "Tar logs"
    disk: proj
    command: @ts {
      const date = new Date().toISOString().slice(0, 10)
      return "tar czf /mnt/proj/backups/logs-" + date + ".tar.gz /mnt/proj/logs"
    }
  }
}

disk and command are both required on a disk node. The command is a string literal or a @ts block returning the shell command.

Validation

  • id: is required and must match the dsk- + 16 hex pattern.
  • secrets: is required, the referenced secret block must exist, and it must declare ARCHIL_API_KEY.
  • Disk names must be identifiers; duplicates error.

Choosing between memory primitives

  • Streams: structured workflow output you want to query and reuse. Swirls-managed.
  • Disks: unstructured files and shared working space. You control the layout.
  • Postgres: the relational database you already have.

Further reading

On this page