browser-ai-bridge: a local bridge to the AI chat tools
A small local service that lets my own tools talk to ChatGPT, Gemini and other assistants through their ordinary web interfaces.
A lot of my work involves getting structured, useful output from AI assistants in bulk. The obvious way to do that is to call the hosted APIs — but at the volume I work at, that gets expensive quickly.
browser-ai-bridge is the small piece of plumbing that solves it. It is a local service that drives the ordinary web interfaces of ChatGPT, Gemini and other assistants through a real Chrome browser, and exposes a simple HTTP API to whatever tool needs them.
How it works
The bridge keeps a pool of warm browser tabs, each already signed in. A request comes in, the bridge types the prompt into a tab, waits for the answer to finish rendering, reads it back and returns it. Sessions are reused so there is no cold-start cost on every call.
Browser automation is fragile by nature — a page layout changes and a step breaks — so the bridge is built to expect failure. It retries, it has a fallback path when a response comes back malformed, and it can re-derive a broken selector by inspecting the page rather than giving up.
Why it is useful
It means the tools I build don't care which assistant is behind them. The same code can talk to one model or several, and switching providers is a config change rather than a rewrite. It is not glamorous, but it is the quiet workhorse a lot of the rest depends on.