AI agent browser guide
Give each AI agent a persistent, reusable browser identity.
Agents that log in fresh every run fight captchas and lose state. A persistent profile is the agent's memory: logins, cookies, and site state survive between runs.
Direct answer
Create one AliasMode profile per agent identity, log in once, and start the profile through the Local API at 127.0.0.1:50400 whenever the agent runs, connecting over CDP.
What you will accomplish
Before you start
- AliasMode installed on Windows (drive it remotely from macOS/Linux via Remote MCP or the Local API on a reachable host)
- A Playwright or Puppeteer project in your agent stack
- One AliasMode profile per agent, with a named login per site it works on
- Local API reachable at 127.0.0.1:50400 on the host
Step-by-step
Create one profile per agent
Name profiles after agents, not tasks: agent·researcher, agent·poster. Tasks change weekly; the identity should not. Keep the generated fingerprint seed fixed.
Seed the logins once
Launch the profile by hand, log into the sites the agent needs, and close it. From now on the agent inherits those sessions on every run.
List profiles from the API
Have your agent tooling discover profile IDs instead of hardcoding them.
curl 'http://127.0.0.1:50400/api/v1/user/list'Start the profile for a run
Start the browser for the run and read the CDP endpoint from the response.
const res = await fetch('http://127.0.0.1:50400/api/v1/browser/start?user_id=' + profileId); const { data } = await res.json(); const cdp = data.ws.puppeteer; // chromium.connectOverCDP(cdp)Connect the agent over CDP
Connect Playwright or Puppeteer to the running profile. Everything the agent does lands in the same persistent session.
const browser = await chromium.connectOverCDP(cdp); const context = browser.contexts()[0]; // agent drives page work inside the logged-in profileStop the browser cleanly
End every run by stopping the profile so state syncs and the next run starts from a clean launch, not a zombie browser.
await browser.close(); await fetch('http://127.0.0.1:50400/api/v1/browser/stop?user_id=' + profileId);Assign one agent per profile
Two agents sharing one profile fight over the same sessions and cookies. One identity per agent keeps runs deterministic and logs attributable.
Handle re-auth gracefully
When a site invalidates the session, the agent should detect the login page, stop, and alert a human — seeding logins stays a supervised step.
The AliasMode workflow
Profiles as agent identities
One profile per agent, grouped by project, with tags for the sites each agent may touch.
Local API as the control plane
Start, stop, and list profiles over HTTP on the loopback — the AdsPower-shaped API your orchestration already expects.
MCP for agent clients
Claude Code, Codex, OpenClaw, and Hermes drive AliasMode through MCP; local stdio on Windows, Remote MCP for remote agents.
Verify it worked
- A run connects over CDP and lands on a logged-in page without a fresh login flow.
- Stopping and restarting the profile preserves cookies and site state.
- The Local API list matches the agent-to-profile assignment you documented.
- No run leaves a browser process behind after stop.
Cautions
- Agents must respect each site's terms, rate limits, and robots rules; a persistent login makes automation visible and attributable.
- Do not point agents at accounts whose loss would hurt you; use dedicated accounts with minimal privileges.
- Parallel runs on one profile corrupt session state — serialize runs per profile.
The agent run loop
Resolve the profile
GET /api/v1/user/list returns profile IDs; pick the agent's own.
Start
GET /api/v1/browser/start?user_id=... returns the CDP websocket.
Connect and work
chromium.connectOverCDP(cdp) and run the agent's page work.
Stop
Close the connection, then GET /api/v1/browser/stop?user_id=... — every time.
Agent state notes
| State | Lives in | Survives a run? |
|---|---|---|
| Logins and cookies | Profile user-data directory | Yes, across runs |
| Fingerprint | Deterministic seed in the profile | Yes, forever until changed |
| Proxy identity | Profile proxy settings | Yes, preflighted per run |
| In-page state (carts, drafts) | Site-side, tied to the session | Yes, while the session is valid |
AI agent FAQ
Why not just launch Chromium with a user-data dir myself?
You can, but you lose managed fingerprints, proxy preflight, Cloud sync, and the Local API contract. AliasMode packages that into one profile object.
Can two agents run at the same time?
Yes — on different profiles. Each profile is one identity with one session; concurrency happens across profiles.
How does this work from macOS or Linux?
The dashboard is Windows-native today. Run AliasMode on a Windows host and drive it through Remote MCP or the Local API from other platforms.
Sources and verification
- Playwright · Browser.connectOverCDP API reference (checked September 2026)
- Chrome DevTools Protocol · DevTools Protocol documentation (checked September 2026)
- Model Context Protocol · MCP specification and concepts (checked September 2026)
Public product details can change after the check date. Facts are re-checked on a monthly cycle.