Skip to content
中文

Drive the user's own browser

An agent can drive a user’s own Chrome or Edge instead of the cloud browser: pages load from the user’s own network and sign-ins, and the platform neither stores nor injects any login state. The browser belongs to the organization, not to one person; whoever paired it is only recorded.

Install the extension first, then follow the steps below. Once a browser is paired and BYOB is open for the organization, every member, agent and application of the organization can use it; there is no extra permission step.

Pair, choose

  1. Pair. Create a pairing code (POST /browser/v1/byob/pairings): an 8-character code, single use, valid for 10 minutes. The user enters it in the extension and clicks Allow, or does it in Console under Browser › My browsers › Add browser without writing any API call. An organization without BYOB gets 501 PROVIDER_UNSUPPORTED. Then list the paired browsers to read the byb_… id.
  2. Choose it in the agent configuration. Set browser: { "byob": "byb_…" } on the agent (absent means the cloud browser; null clears it). In Console, pick it on the agent’s browser settings page. From then on praxis.browser.connect() in that agent’s sessions drives this browser. Its signature and return value do not change, connect({ context: false }) changes nothing, and no cloud sign-in state is created or mounted. A hosted agent’s session environment carries PRAXIS_BROWSER_SOURCE=byb_…, which connect() reads. Each agent has one session, so one tab group, per browser.
  3. Or open a session yourself. POST /browser/v1/sessions accepts source: { "type": "byob", "browser": "byb_…" } (the short form { "byob": "byb_…" } also works); the session answers source as { "type": "byob", "kind": "byob", "browser": "byb_…" }. See Choosing the backend.
// Inside an agent session whose configuration points at byb_…: same code as the cloud browser.
console.log(process.env.PRAXIS_BROWSER_SOURCE); // byb_…
const browser = await praxis.browser.connect();
const page = await browser.contexts()[0].newPage();
await page.goto("https://example.com");

The browser object has the same shape from list, read, update and disconnect (update can change only name, 1–80 characters): id, name, browser (chrome or edge), version, os, extension_id, online, last_seen_at, created_by, created_at, revoked_at. Disconnect with POST /browser/v1/byob/browsers/{browser_id}/disconnect; once revoked_at is set it cannot be undone, only paired again.

What an agent can and cannot do

  • The agent works in its own “Praxis 智能体” tab group and sees only tabs in that group; the user’s other tabs are never listed or touched. Chrome shows its “is being debugged” bar on purpose, so the user can always see the agent and press Stop in the extension.
  • Every CDP command passes a fixed rule table first. A refused command answers CDP error -32000 with the message refused by BYOB policy: <rule> and is written to the audit center. Rules: browser-wide (closing the browser, changing permissions, creating browser contexts), cookies-jar and site-data (reading all cookies, clearing site data), download-to-disk (writing to the user’s disk), local-files (choosing local files in a file input), faking (overriding User-Agent, geolocation, timezone, locale), target-outside-emulation (touching tabs outside the group), navigation-scheme (anything but http(s), such as chrome:// or file://), cookies-scope (reading cookies must name urls), domain-not-allowed (a CDP domain outside the table).
  • While a person has taken over, Input.* commands answer refused by BYOB policy: handoff; the user does the typing.
  • Every session on a user’s own browser is visible to the whole organization, whoever creates it; visibility: "private" on create is overridden to organization, not refused. Any member can see it in the sessions list, watch it and take control.
  • A BYOB session has screencast frames only, with no cloud live-view page.
  • It is free: a BYOB session is not billed and does not use the cloud browser concurrency quota.
  • After a drop there is a 2-minute reconnect grace. When a session ends, the agent’s own tabs close and tabs the user lent stay.

Error codes

CodeStatusMeaningWhat to do
BROWSER_OFFLINE503, retryableThe browser is closed, the extension is not connected, or the user pressed Stop; last_seen_at is when it was last onlineRetry shortly; if it still fails, tell the user to open the browser
BROWSER_REVOKED410The organization disconnected the browserPair it again and update the id in the agent configuration
BROWSER_NOT_FOUND404The id does not exist or belongs to another organizationCheck the id in the agent configuration
PAIRING_NOT_FOUND404The pairing code is unknown, expired or used (one answer for all three)Create a new pairing code
PROVIDER_UNSUPPORTED501BYOB is not open for the organizationAsk the platform to open it

In the SDK, connect() throws the three BROWSER_* codes unchanged with retryable on the error; BROWSER_OFFLINE also carries last_seen_at.

Next steps