What the agent can do with files
- Read and write files in its sandboxed workspace during a run.
- Process downloaded content such as PDFs and spreadsheets.
- Produce output files like CSVs or spreadsheets from data it gathers.
- Extract small inline tables directly from a page when the data is compact.
Retrieving files the agent downloads
When the agent downloads a file during a run, Browserbase stores it against the run’s browser session. Retrieve it with the Downloads API using thesessionId from the run.
First, get the run’s sessionId from Get a run. Then list the downloads for that session with List downloads:
- cURL
- Node.js
- Python
filename, mimeType, or size. See the Downloads guide for the full workflow.
Use cases
Files unlock the document-heavy tasks that scripts struggle with:- Document fetching: SOC2 reports, authorization forms, and transaction documents from vendor and provider sites.
- Government and real estate records: tax documents and property records that download as PDFs.
- Data export: gather records across pages, then write a single spreadsheet as output.
Limitations
The file workflow is still growing. Plan around these limits:Next steps
Downloads API
Retrieve files an agent downloads during a run
How it works
The execution loop, built-in tools, and run lifecycle
Integrating agents
Trigger runs and track them from your application
List downloads
API reference for listing a session’s downloads