Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ It's a single Next.js service: `withEve()` in [`next.config.ts`](next.config.ts)

You'll be asked for a `BROWSER_USE_API_KEY` (from [browser-use.com](https://browser-use.com)) and a model credential (link the Vercel project for the AI Gateway, or set `AI_GATEWAY_API_KEY`).

> **Note:** the default model runs through the Vercel AI Gateway, which **requires paid credits** — without them you'll see _"Free tier users do not have access to this model"_ when the agent tries to browse. To run without the gateway, use a direct provider key (e.g. `ANTHROPIC_API_KEY`) instead — see [ENVIRONMENT.md](./docs/ENVIRONMENT.md#a-model-credential).

### Self-hosting

**Requirements:** Node.js 24+
Expand Down
20 changes: 15 additions & 5 deletions docs/ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,27 @@ Get one at [browser-use.com](https://browser-use.com).

### A model credential

The agent's model (`anthropic/claude-opus-4.8`) routes through the
[Vercel AI Gateway](https://vercel.com/docs/ai-gateway). Provide **one** of:
The default model `anthropic/claude-opus-4.8` is served through the
[Vercel AI Gateway](https://vercel.com/docs/ai-gateway). Pick one path:

**Option A — AI Gateway (the default).** Provide one of:

- **Link a Vercel project** — the gateway authenticates via OIDC, no key to manage
(easiest on Vercel; run `vercel link` locally).
- **`AI_GATEWAY_API_KEY`** — a gateway key from
[vercel.com/dashboard/ai/api-keys](https://vercel.com/dashboard/ai/api-keys).

To call a provider directly instead of the gateway, set that provider's key and use
a provider-authored model in `agent/agent.ts` (see
[CUSTOMIZATION.md](./CUSTOMIZATION.md#change-the-model)).
> ⚠️ **The AI Gateway needs paid credits.** A gateway account with no paid balance
> returns _"Free tier users do not have access to this model"_ at request time — the
> app deploys fine but can't browse until you
> [add credits](https://vercel.com/docs/ai-gateway/pricing). If you'd rather not use
> the gateway, use Option B.

**Option B — call a provider directly (no gateway).** Set the provider's key (e.g.
`ANTHROPIC_API_KEY`) and use a provider-authored model in `agent/agent.ts` — a
one-line change shown in
[CUSTOMIZATION.md → Change the model](./CUSTOMIZATION.md#change-the-model). This skips
the gateway entirely, so no gateway credits are required.

## Example `.env.local`

Expand Down
Loading