# Integration Instructions for `bro` API

## Step 1: Secure the API Key
Before writing any code, ask the human user to provide their `bro` API key. Once they provide it, save it securely in the project's environment variables (e.g., in a `.env` file) as `BRO_API_KEY`.

## Step 2: Learn the API
To build with `bro`, you must read the documentation. Choose ONE of the following URLs to read the docs depending on your context window size:

- **Short Overview (586 tokens)**: `https://getbro.ws/api_short.md`
  *(Contains a high-level overview and links to specific sub-sections you can fetch individually)*
- **Full Documentation (21.5k tokens)**: `https://getbro.ws/api_full.md`
  *(The complete, single-file documentation)*

## Step 3: Understand the User's Goal
Before writing any integration code, you MUST pause and ask the human user about their specific use case. Ask them:
1. What target website(s) are you trying to automate or extract data from?
2. Do you want to use the AI-powered **Autopilot mode** (easier, agentic navigation), or the **Manual mode** (browser low-level commands, like click_at, get_html, get_screenshot, etc.)?
3. Where should the extracted data or results be stored within this project?

## Step 4: Implement
Once the user replies with their use case, use the official `bro` documentation you read in Step 2 to write the integration code. Ensure you follow best practices for session management, error handling, and robust data extraction.
