-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ai browser agent local llm
A local model changes exactly one thing about this browser: where the model runs. AIHawk's own interface only ever calls OpenRouter, there is no local-model flag. To actually drive this browser with a model on your own machine, you attach it to an assistant or client that already runs one, over the same MCP connection Claude Code uses.
uvx aihawk ui --openrouter-key ... reaches OpenRouter and nowhere else. That is not
a default that can be pointed elsewhere with a flag: src/aihawk/llm.py hardcodes the
OpenRouter base URL, and the ui command refuses to start at all without a key. If
you came here hoping for --ollama, it does not exist in the current source.
The library underneath has the opposite property: invisible_playwright, the plain
Python package this interface talks to over MCP, carries no model at all. Local, in
the sense that the weights never leave your machine, is not a setting on AIHawk's own
interface. It is a different door: an assistant or client that already runs a model
locally, most commonly through something like Ollama's own API, attaching this same
browser to it exactly the way any other MCP client would. Ollama has served tool
calls since 2024, exposing them through a tools parameter on its chat API and
answering with a tool_calls response, and its OpenAI-compatible endpoint accepts
the same shape, which is what makes this route possible at all. Which desktop
clients wire a local model to MCP changes fast enough that naming one here would
age badly; check your client's own documentation for MCP support before planning
around it.
The attachment mechanics do not change based on where the model lives. The Claude Code walkthrough documents the exact shape, even though Claude Code's own model is hosted rather than local:
claude mcp add --scope user stealth -- uvx invisible-playwright-mcpOne command, once, and the browser's tools show up in that client from then on. A
client built around a local model takes the equivalent command or config screen for
adding an MCP server; the package on the other end, invisible-playwright-mcp, the
tool names it exposes, and the roughly quarter-gigabyte engine it downloads on first
use are identical regardless of what is asking. The server has no idea whether the
model calling it runs on your GPU or on someone else's, and that is by design: it
only ever sees tool calls.
Which model to use with AIHawk lays out what this task actually exercises: well-formed tool calls on every turn, instructions followed closely enough to know when a task is actually done, and long, messy context made mostly of extracted page text. Every word of that applies to a local model, and two of the three get harder at smaller scale.
Context length is the first one to clear. A structural read of an ordinary page is thousands of characters on its own, and in a resent-transcript loop that one read is paid again on every later turn, so a model that runs out of room partway through a task cannot finish it regardless of how well it reasons. Read the context window of the exact model tag you are pulling, not the family's headline number, and compare it against a real page read rather than a hello-world prompt. The second is patience across turns: a real task rarely finishes in one or two calls, and local inference on ordinary hardware is commonly slower per turn than a well-provisioned hosted API, so the wait compounds turn over turn more than it would against a fast one.
Be honest about the failure mode before it costs an afternoon of debugging the wrong thing. After enough turns of a growing, resent transcript, a smaller model tends to repeat a click it already tried, lose a constraint from the original instruction, or declare the task finished with steps still undone. These are the same model-side symptoms the diagnostic page lists for any model; a smaller local one just hits them sooner and more often, because the same growing context that eventually strains a frontier model strains a smaller one several turns earlier. That is not a defect in the browser: the page loaded, the tool call worked, the model simply lost the thread of its own multi-step task.
Even a local model that stumbles on turn eighteen already delivered its real benefit on turn one: the page content it read went to a process on your own machine and nowhere past it. The OpenRouter route sends that same text to whichever provider ends up serving the model you picked, simply by routing a request to a hosted API. For a page you would not want logged on a third party's servers, an internal dashboard, an account page, anything sensitive, a local model is the one route where that stays true regardless of how capable the model turns out to be. That is a reason to accept a weaker model on purpose, not to expect a strong one.
The model-free replay described on
browser problem or model problem? fits a local
setup well, because it shares the same premise: nothing sent anywhere, nothing spent.
Run the failing step against the invisible_playwright library directly, no model
attached. If the failure reproduces, no model change, local or hosted, will fix it. If
the replay goes through cleanly, the local model is the variable, and the next move is
a larger local model, or one hosted run on the same task and seed, before concluding
the whole local approach is the wrong fit.
Can I use a local model with AIHawk's own interface? No. uvx aihawk ui only
ever calls OpenRouter, hardcoded in the source. A local model means attaching this
browser to a different client over MCP instead.
What does a local model actually buy me for browser agent work? Mostly privacy: page content stays on your machine instead of reaching whichever provider serves a hosted model. Capability is usually the trade, not the goal.
Why does a local model seem to forget the task partway through? The transcript grows every turn, and a smaller model's grip on an early instruction or tool result tends to loosen sooner than a larger one's. The same demand hits every model; a smaller one just fails sooner.
Do I need Ollama specifically? Not by requirement. Any client that speaks MCP for tools and already has a local model sorted, however it serves that model, attaches this browser the same way. Which clients currently do that changes too fast to name reliably here.
How do I know if a bad run is the local model or the browser? Replay the failing step with no model against the library: if it reproduces, the browser side is at fault regardless of any model; if not, the model was the variable.
See also: running an agent unattended on a schedule for the other half of the running question, Which model to use with AIHawk, Browser problem or model problem?, and Running AIHawk's browser from Claude Code.
Retrieved 2026-09-05.
-
feder-cr/AIHawk, this repository's README,
src/aihawk/llm.py(the hardcoded OpenRouter base URL and default model) andsrc/aihawk/cli.py(theuicommand's key requirement and its own note that driving the browser without a model at all is theinvisible_playwrightlibrary's job).
From the AIHawk wiki. This interface has never had a local-model flag to remove; the local route has always run through a different client entirely, and that is worth saying plainly before anyone goes looking for a setting that isn't there.
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- AIHawk, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Getting an AI agent to fill out forms
- Which model to use with AIHawk
- Browser problem or model problem?
- Running AIHawk's browser from Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- Running AIHawk's browser from Claude Desktop
- Running AIHawk's browser from Cursor
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- Running AIHawk's browser from Cline
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent