Skip to main content
Dari Agent supports two file flows: uploaded files that become inputs to messages, and workspace files that an agent creates or modifies while running in its sandbox.

Upload Input Files

Upload files to the Platform API, then reference the returned file_id from a message part.
curl -X POST https://api.dari.dev/v1/files \
  -H "Authorization: Bearer $DARI_API_KEY" \
  -F "file=@requirements.md"
See Upload File for the full request and response shape.

Download Session Workspace Files

Every session has a /workspace directory inside its sandbox. After the agent runs, download the workspace as a zip file:
curl https://api.dari.dev/v1/sessions/sess_123/workspace.zip \
  -H "Authorization: Bearer $DARI_API_KEY" \
  -o workspace-sess_123.zip
See Download Session Workspace for path filtering and response details.

Connect Persistent Storage

For approved Google Cloud Storage-backed workspaces, configure a storage binding and reference it from sandbox.storage_binding. See Storage for setup.