n1-brightdata Python package is the official CLI and library for this integration, including support for:
- Autonomous web research - Give the agent a task in plain language. It browses the web, interacts with pages, and returns a synthesized answer.
- Bright Data Browser API - A real Chromium browser routed through Bright Data’s residential proxy network, bypassing bot detection, CAPTCHAs, and geo-restrictions automatically.
- Yutori n1 model - An advanced reasoning model that decides what browser actions to take (click, scroll, type, navigate) at each step until it has enough information to answer.
How to use n1-brightdata
Obtain Your Credentials
You need credentials from two services:Bright Data:
- Log in to your Bright Data dashboard.
- Create or open a Browser API zone.
- Copy the CDP WebSocket URL - it looks like:
wss://brd-customer-XXXXXX-zone-scraping_browser:PASSWORD@brd.superproxy.io:9222
- Log in to your Yutori dashboard.
- Generate an API key from your account settings.
Install the n1-brightdata Package
Install the package from PyPI:Then install the Chromium browser used by Playwright:
Configure Your Credentials
Run the built-in interactive setup wizard:This walks you through entering your Bright Data CDP URL and Yutori API key, saves them securely to
~/.n1-brightdata/credentials.json, installs Playwright, and optionally tests your connections.Command Reference
| Option | Type | Default | Description |
|---|---|---|---|
TASK | string | (required) | The research task for the agent to complete |
--url | string | https://www.google.com | Starting URL before the agent loop begins |
--max-steps | integer | 30 | Maximum number of browser actions (min: 1) |
--screenshot-format | jpeg | png | jpeg | Format of screenshots sent to the model |
--jpeg-quality | integer | 60 | JPEG quality when format is jpeg (1–100) |
--screenshot-timeout-ms | integer | 90000 | Screenshot timeout in milliseconds |
--yutori-api-key | string | (env) | Yutori API key (overrides env / credentials file) |
--brd-cdp-url | string | (env) | Bright Data CDP WebSocket URL (overrides env / credentials file) |
--env-file | path | ./.env | Custom path to a .env file |
Optional Tuning
Place these in a.env file in your project directory (or export them as shell variables) to tune agent behavior without touching your credentials:
Configuration Precedence
Programmatic API
The package also exposes a Python API for embedding the agent in your own code:| Symbol | Description |
|---|---|
AgentConfig | Dataclass holding all configuration (credentials + tuning) |
build_agent_config() | Load config from credentials file, env vars, and .env |
run_agent(task, start_url, config, max_steps) | Run the agentic loop and print the result |