GuidesA logged-in browser for your agent
DocsGuidesHow to give an AI agent a real, logged-in browser

How to give an AI agent a real, logged-in browser

co browser keeps one real Chrome open between commands. Log in by hand once, 2FA included, and every later command or co browser do task runs in that session. No Playwright script.

Use co browser. It keeps one real browser open between commands, using your system Chrome by default with a persistent profile. You log in to a site by hand once, including 2FA, and every later command runs in that logged-in session: co browser go_to, co browser get_text, co browser take_screenshot, or co browser do "…" to hand a whole task to an AI agent. You don't write a Playwright script.

1. Open a page

The first command starts the browser. It is visible by default; add --headless for scripts.

pip install connectonion
co browser go_to https://example.com

2. Log in by hand

Type the password and the 2FA code yourself in the window. The profile persists, so the login stays valid for later commands.

3. Read and act

co browser help lists more than forty functions: clicking, typing, extracting, screenshots, uploads, network and cookies.

co browser get_text
co browser click "the Export button"
co browser take_screenshot page.png

4. Hand over a whole task

do puts ConnectOnion's browser agent on the same live browser. It is billed to your OpenOnion account.

co browser do "export every overdue row to arrears.csv"

5. Share it between agents

Each agent opens its own tab and passes -t to every command, so several agents can use one browser without clashing.

co browser tab open research --who claude --for "pricing research"
co browser -t research go_to https://example.com
co browser tab ls

FAQ

Which browser does it use?

Your system Chrome by default, through Patchright, at no cost. A paid engine is optional with --engine wtf.

Does the login survive between commands?

Yes. A daemon owns the browser and its profile is persistent, so cookies and logins carry over to later commands.

Can Claude Code or Codex drive it?

Yes. co skills link links the co-browser skill into both, and they run co browser from their shell.

Can I export the login?

Yes. co browser save_state <path> writes a portable Playwright storage_state JSON, and co browser cookies save saves the current site's cookies.

Updated 2026-09-26. Commands checked against ConnectOnion 1.8.8.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.