Skip to main content
When the agent downloads files during a task (e.g., exporting a report, saving an image), they’re stored as output files. Retrieve them after the task completes using presigned URLs.
import httpx
from browser_use_sdk import AsyncBrowserUse

client = AsyncBrowserUse()
result = await client.run("Download the latest PDF report from example.com/reports")

task = await client.tasks.get(result.id)
for file in task.output_files:
    output = await client.files.task_output(result.id, str(file.id))
    async with httpx.AsyncClient() as http:
        resp = await http.get(output.download_url)
    with open(file.file_name, "wb") as f:
        f.write(resp.content)
    print(f"Saved {file.file_name}")
Presigned URLs expire after a short time. Download files promptly after the task finishes.