Get the file first

  1. After a page starts a download, query the artifact list for the current run.
  2. Wait within a bound until the matching item is ready, then request content using its id.
  3. Save the bytes in the Agent's environment and verify length and SHA-256.
  4. End the run after retrieval. Old artifacts cannot be fetched once the run has ended or expired.

Do not treat remote Playwright Download.path() as a local file path. The setup reference has the full fields and limits.

Then end the run

For a run your current Agent created, request an end on both success and failure paths. Confirm released before saying the browser is closed. Check final save_status for saved state and billing.status for settlement; report them separately. If another process owns the run, follow the agreed ownership boundary.

HTTP path outline · consult the live contract for auth and error handling
GET    /openapi/v1/browser/sessions/{id}/downloads
GET    /openapi/v1/browser/sessions/{id}/downloads/{download_id}/content
DELETE /openapi/v1/browser/sessions/{id}
GET    /openapi/v1/browser/sessions/{id}

Disconnecting a CDP client, closing a human-action page, or leaving this website does not end the cloud browser run.