> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browserbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Box integration

> Send files from the web to Box, extract structured data with Box AI, and route documents for review.

Browserbase and Box connect browser agents to document workflows. Browserbase runs browsers that work where APIs can't, while Box stores files and extracts the information your agent needs.

The example integration uses Stagehand to download a safety data sheet (SDS) and sample pesticide label from the web. It uploads both PDFs to Box, extracts compliance fields, and decides whether the packet needs human review.

## What the integration does

<CardGroup cols={2}>
  <Card title="Download web files" icon="download">
    Stagehand finds and downloads PDF and image files in a Browserbase session.
  </Card>

  <Card title="Store documents in Box" icon="box-archive">
    The workflow uploads each file to a folder owned by a Box service account.
  </Card>

  <Card title="Extract structured data" icon="table-list">
    Box AI extracts fields, confidence scores, and source references. Structured extraction can apply OCR to images and scanned PDFs.
  </Card>

  <Card title="Route exceptions" icon="code-branch">
    A deterministic check compares the extracted fields and marks each file as `APPROVED` or `NEEDS_REVIEW`.
  </Card>
</CardGroup>

## How it works

1. Stagehand opens the manufacturer and government source pages in a Browserbase browser.
2. The browser downloads the SDS and label PDFs to Browserbase.
3. The workflow retrieves the original file bytes through the Browserbase Downloads API.
4. Box stores both files and answers a cited safety question about the SDS.
5. Box AI extracts structured fields from each file, including text embedded in the label artwork.
6. The workflow compares the EPA registration numbers and checks the SDS revision date.
7. Box metadata records the extracted values, Browserbase session ID, source URL, document role, and compliance status.

The default sources intentionally produce a packet that needs review. You can replace the source URLs and link names to process your own SDS and label pair.

<Note>
  Box AI processes the SDS and label separately. The workflow compares their structured results in application code because Box AI doesn't process a mixed text-and-image packet as one request.
</Note>

## What you'll need

* A [Browserbase API key](https://www.browserbase.com/settings)
* A Box Server app that uses Client Credentials Grant
* A Box plan with access to the Box AI API
* A Box folder shared with the app's service account
* Node.js 18 or newer and pnpm

## Get started

<CardGroup cols={2}>
  <Card title="Follow the quickstart" icon="rocket" href="/integrations/box/quickstart">
    Configure Browserbase and Box, then run the compliance intake.
  </Card>

  <Card title="View the example" icon="github" href="https://github.com/browserbase/integrations/tree/main/examples/integrations/box">
    Review the complete Stagehand and Box implementation.
  </Card>
</CardGroup>
