/home/agent.
Directory layout
Each execution mounts a filesystem under/home/agent. Four directories are yours to work with.
The rule of thumb:
shared/ holds the files the workflow was built with and reads at run time. Put a run’s scratch work in workspace/; browser downloads land in downloads/.
What persists
shared/ holds the files the workflow was built with. Asteroid restores them into the sandbox before the execution starts, so the node scripts and the data they read are always present.
A running execution’s own writes are not durable. Nothing written to the sandbox during a run carries into the next run. Keep per-run state in workspace/. Files in downloads/ still sync to the execution’s Files area for that run, but a new execution starts with workspace/, downloads/ and uploads/ empty, and shared/ holding the workflow’s files again.
Durable shared/ content comes from how the workflow is built. Astro writes scripts and reference files there when it builds or edits the workflow, and those persist for every later run. Use shared/ for:
- Reference data a script reads — a field map, a bundled library, a lookup table.
- The node scripts themselves — each lives under
shared/<node-slug>/. - Site-specific gotchas captured at build time — a portal that needs a particular click order.
File types the workflow can read
- Images (PNG, JPEG)
- PDFs
- Text files (TXT, MD)
- CSVs
Getting files in
There are two paths, and the difference is timing.Before the execution starts
Stage the files first, then pass them to the execute call.POST /temp-files/{organizationId}returns atempFilesarray. Each entry has anidand aname.- Pass that array as
tempFilesonPOST /agents/{agentId}/execute. - The execution starts with the files attached to its context.
While the execution is going
Upload straight to the running execution instead. The files appear in the execution context and the workflow is notified.Getting files out
Files the workflow downloads land in/home/agent/downloads, and sync like every other workflow directory. They appear in the Files area of the execution and in the file listings.
Two endpoints list the files on an execution:
Each entry carries a
downloadUrl. Call it with your API key and the server redirects you to the contents.
Uploading files to a website
The workflow uses the Upload File tool to put a file into a web form. It accepts a local file, or a file it downloaded earlier, addressed asdownloads/filename.
Call a workflow
Stage files and read them back
Environments
Where the sandbox comes from

