Skip to main content
Integrating Bright Data with Yutori gives you an autonomous web research agent powered by the Yutori n1 reasoning model and Bright Data’s Browser API - combining real Chromium browsing with residential IPs for undetectable, scalable web access. The 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

0

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
Yutori:
  • Log in to your Yutori dashboard.
  • Generate an API key from your account settings.
2

Install the n1-brightdata Package

Install the package from PyPI:
pip install n1-brightdata
Then install the Chromium browser used by Playwright:
playwright install chromium
3

Configure Your Credentials

Run the built-in interactive setup wizard:
n1-brightdata setup
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.
Or configure manually by creating ~/.n1-brightdata/credentials.json:
{
  "YUTORI_API_KEY": "your_yutori_api_key_here",
  "BRD_CDP_URL": "wss://brd-customer-XXXXXX-zone-scraping_browser:PASSWORD@brd.superproxy.io:9222"
}
You can also pass credentials directly as CLI flags or environment variables:
n1-brightdata "your task" \
  --yutori-api-key "your-key" \
  --brd-cdp-url "wss://..."
4

Run your research task

The n1-brightdata integration supports three usage patterns:
Run any web research task from your terminal in a single command.
# Ask any question — the agent browses the web to answer it
n1-brightdata "What is the current price of Bitcoin?"

Command Reference

n1-brightdata [TASK] [OPTIONS]
OptionTypeDefaultDescription
TASKstring(required)The research task for the agent to complete
--urlstringhttps://www.google.comStarting URL before the agent loop begins
--max-stepsinteger30Maximum number of browser actions (min: 1)
--screenshot-formatjpeg | pngjpegFormat of screenshots sent to the model
--jpeg-qualityinteger60JPEG quality when format is jpeg (1–100)
--screenshot-timeout-msinteger90000Screenshot timeout in milliseconds
--yutori-api-keystring(env)Yutori API key (overrides env / credentials file)
--brd-cdp-urlstring(env)Bright Data CDP WebSocket URL (overrides env / credentials file)
--env-filepath./.envCustom 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:
N1_SCREENSHOT_FORMAT=jpeg          # jpeg | png
N1_JPEG_QUALITY=60                 # 1–100
N1_SCREENSHOT_TIMEOUT_MS=90000     # screenshot timeout in milliseconds
N1_MAX_REQUEST_BYTES=9500000       # trim old screenshots if payload exceeds this
N1_KEEP_RECENT_SCREENSHOTS=6       # how many screenshots to keep in context
N1_ENABLE_SUFFICIENCY_CHECK=true   # stop early when the agent is confident
N1_STOP_CONFIDENCE_THRESHOLD=0.78  # confidence threshold for early stopping (0–1)

Configuration Precedence

CLI flags  >  Shell env vars  >  .env file  >  ~/.n1-brightdata/credentials.json

Programmatic API

The package also exposes a Python API for embedding the agent in your own code:
from n1_brightdata import AgentConfig, build_agent_config, run_agent
SymbolDescription
AgentConfigDataclass 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