Tabrelay / Let an AI agent use your logged-in browser safely
How to let an AI agent use your logged-in browser safely
Your logged-in browser holds your email, code hosting, bank and social accounts. Handing it to an agent needs limits. This page lists the risks and how Tabrelay fences them in, including the parts it cannot.
Chrome or Chromium, Python 3.10+, macOS and Linux. Source on GitHub.
The risks of an agent in your real browser
- Too much reach. An agent that can drive any tab can act on any account you are logged in to.
- Mistakes. Agents click the wrong thing, post the wrong text or submit a form half-filled.
- Injection. Text on a web page can try to steer an agent that reads it.
- Open ports. A remote debugging port on your browser is open to every program that can reach it.
No tool removes all of these. The aim is to shrink the blast radius.
Guard rails in Tabrelay
A site allow-list the agent cannot change
The extension acts only on https pages whose host is on a list in its own storage. Only the extension's options page can edit it; nothing sent from the command line can widen it. It checks the tab's current URL on every command, refuses to open or navigate to other sites, and refuses a few DevTools commands that reach beyond the tab, such as the cookies of all sites. Keep the list as short as the task needs.
A local token
extension/token.json is a random secret created on first use with mode 600 and ignored by git. The server accepts jobs only with it, and the extension runs only jobs that carry it.
Localhost only
The server binds to 127.0.0.1:47833, refuses requests whose Host is not 127.0.0.1 or localhost (DNS rebinding) and requests with a web page Origin, so websites you visit cannot drive it. Never expose or forward that port.
Visible debugging
Chrome shows a "started debugging this browser" bar whenever the extension debugs a tab, and tabrelay detach removes it afterwards.
No telemetry
The extension talks only to 127.0.0.1:47833 and to the pages it drives.
What Tabrelay does not protect you from
- Any program running as you can read the token file. It is not a sandbox against software you already run.
- JavaScript in an allowed page can do whatever that page can do.
- The
debuggerpermission is powerful: on a tab it can read and change everything, including form fields and network traffic.
Habits that help
- Allow only the sites the task needs, and remove them afterwards.
- Use a separate Chrome profile for agent work and route to it with
TABRELAY_PROFILE. - Prefer
--drafton posting scripts: it fills everything and does not submit. Review, then run for real. - Use
--shots DIRto screenshot each step so you can see what happened. - Tell the agent in
CLAUDE.mdorAGENTS.mdto stay inside the allow-list and to close tabs when done. - Follow each site's terms and automation rules. Tabrelay is for your own browser and accounts, not spam or fake engagement.
Read the security section of the README and the disclaimer. Overview: browser automation for AI agents.
Frequently asked questions
Can the agent add sites to the allow-list?
No. The allow-list is stored in the extension and only its options page can change it. Nothing sent from the command line can widen it.
Is Tabrelay a sandbox?
No. It is a guard rail. Any program running as you can read the token, and JavaScript in an allowed page can do whatever that page can do.
How do I stop an agent from posting something by mistake?
Use --draft on the posting scripts so they fill everything without submitting, and review the screenshots from --shots first.
Can websites control Tabrelay?
The server only listens on 127.0.0.1, refuses foreign Host headers and requests with a web page Origin, and requires the token, so websites you visit cannot drive it.
Chrome or Chromium, Python 3.10+, macOS and Linux. Source on GitHub.