← Blog

BLOG

Browser User: Identity, Sessions, and Automation

Learn what a browser user means in web automation, how sessions and profiles differ, and how to run isolated browser workflows.

10 min readRemote Browser
An ivory computer vault and separate browser terminals in a terracotta courtyard
Separate sessions. Carefully handled state.REMOTE BROWSER / ILLUSTRATION

A browser user is the person, account, or automated process interacting with a website through a browser. In automation, the phrase often points to a more practical question: *which identity and browser state does a task use, and what happens to that state afterward?*

The answer depends on several separate things: the website account, the browser profile, the active session, and the code or agent controlling the browser. Keeping them distinct helps prevent shared logins, accidental data exposure, and workflows that silently run under the wrong account.

“Browser user” can also be a search for Browser Use, the browser-agent project. That is different from the general term: Browser Use provides agent tooling, while a browser runtime provides the browser in which actions happen.

What does “browser user” mean?

In ordinary browsing, a browser user is usually the person opening pages, signing in, and interacting with a site. In an automated system, that person might authorize a program to act on their behalf, but the program still needs a browser environment and, when applicable, an account with the right permissions.

Consider an agent that retrieves an invoice from a customer portal:

  1. A customer authorizes access to their portal account.
  2. Your application starts a browser session for that customer’s task.
  3. The browser loads the portal, potentially using previously saved login state.
  4. The agent navigates to the invoice and returns an approved result.
  5. Your application closes the session and handles any saved state according to its retention policy.

The customer, the portal account, the browser session, and the agent are related, but they are not interchangeable. The customer is the person represented; the portal account determines site permissions; the session holds the active browsing environment; and the agent issues actions.

For production systems, identify each explicitly in your application records. A session ID alone should not be your proof that an agent was authorized to access a particular account.

Browser user vs. profile, session, and user agent

These terms are easy to conflate because they all affect how a website sees or remembers a visit.

TermWhat it representsExampleKey consideration
Browser userA person or program using a browserA customer or an authorized automation workerEstablish who requested the task and what they may do.
Website accountIdentity and permissions managed by the siteA portal login with read-only billing accessBrowser isolation does not change the account’s site permissions.
Browser profileBrowser data that may persist across sessionsSaved cookies and preferences for one accountTreat stored profile data as sensitive.
Browser sessionAn active browser environment for a period of workOne hosted Chromium runDefine who owns it and when it ends.
Browser contextAn isolated browsing environment within a browserA fresh Playwright context for one taskIt is useful for separating browser state, but is not necessarily a separate machine.
User agentBrowser information sent to websitesA browser identification string in a requestIt is not a user identity or proof of authorization.

A profile can preserve login-related state, but it does not guarantee that a website will keep the account signed in. Sites can expire sessions, require reauthentication, or change their security checks.

Likewise, an isolated context can help prevent cookies from being shared between tasks. It does not independently enforce your application’s tenant authorization, protect an exposed control endpoint, or grant access to a website.

For details on browser identification strings, see the existing guide to browser user agents.

How browser identity works in an automated task

A website may recognize a returning browser through cookies or other stored state, but your system should decide access before the browser starts. A useful model separates four layers:

  • Request identity: Which user or service requested the task?
  • Authorization: Which target account and actions are permitted?
  • Browser state: Which profile, cookies, or fresh context should the task use?
  • Execution: Which worker, agent, or operator controls the browser session?

For example, a support agent may be authorized to inspect an order but not submit a refund. The browser might be logged in to an account capable of both. In that case, browser access alone is too broad a control: the application also needs action-level rules and, where appropriate, a human approval step.

Fresh state for independent tasks

A fresh browser context is a good default for public pages, tests, and one-off tasks that do not need a previous login. It reduces the chance that a task inherits cookies or storage from an unrelated workflow.

Fresh state also has costs. Every authenticated task may need to sign in again, and a site can require multi-factor authentication or other verification. Design for those possibilities rather than assuming a script can complete every login unattended.

Persistent state for returning accounts

A persistent profile is useful when an authorized workflow must return to the same account across multiple runs. It can reduce repeated setup, but it also creates a durable collection of potentially sensitive browser data.

Associate the profile with an internal tenant and account identifier, not just a friendly browser user name. Restrict who can attach it to a session, avoid using the same profile for unrelated customers, and define when it should be deleted or reauthenticated.

Before running concurrent tasks against one profile, verify the runtime’s supported behavior. Even when concurrent access is technically possible, two tasks can interfere with each other by logging out, changing account settings, or modifying the same site data.

Where Browser Use and a remote browser fit

If you searched for “browser user” but meant Browser Use, the distinction is architectural:

  • Browser Use is an agent project for browser-driven workflows. The agent can decide what actions to take as it works toward a task.
  • Playwright or Puppeteer provides browser automation interfaces that code can use to navigate and interact with pages.
  • A browser runtime runs the browser itself, either locally or on hosted infrastructure.
  • A website account determines what the resulting browser user is allowed to do on the target site.

You do not need an AI agent for every browser task. A fixed Playwright script is often easier to test when the steps and page structure are predictable. An agent may be useful when it must interpret changing page content or choose among several paths, but it adds uncertainty that requires evaluation and oversight.

Remote Browser provides hosted Chromium sessions and CDP access for browser-use workflows and other automation. It also supports capabilities such as persistent profiles and a live viewer. Use the documentation to check the current session setup and supported configuration before connecting a client.

Run a browser user workflow with Playwright and CDP

The example below opens a fresh Playwright context in an existing remote Chromium session, visits a public page, and reads its title. It does not create a Remote Browser session or select a persistent profile; obtain the CDP endpoint through your runtime’s documented workflow first.

Prerequisites

You need Node.js, a reachable Chromium CDP endpoint, and permission to use the target site. Install the client dependencies in your project:

npm install playwright
npm install --save-dev typescript tsx

Set CDP_ENDPOINT in your environment to the CDP URL supplied for your session. Treat the complete endpoint as a secret: depending on the provider, it may contain connection credentials. Do not commit it to source control or print it in logs.

Save this as browser-user.ts:

import { chromium } from "playwright";

async function main(): Promise<void> {
  const endpoint = process.env.CDP_ENDPOINT;

  if (!endpoint) {
    throw new Error("Set CDP_ENDPOINT to your remote Chromium CDP URL.");
  }

  const browser = await chromium.connectOverCDP(endpoint);

  try {
    // Use a fresh context instead of reusing an existing profile or tab.
    const context = await browser.newContext();

    try {
      const page = await context.newPage();

      await page.goto("https://example.com", {
        waitUntil: "domcontentloaded",
        timeout: 30_000,
      });

      console.log(`Page title: ${await page.title()}`);
    } finally {
      await context.close();
    }
  } finally {
    await browser.close();
  }
}

main().catch(() => {
  // Avoid printing connection details that could contain credentials.
  console.error("Browser workflow failed. Check session and network configuration.");
  process.exitCode = 1;
});

Run it with:

npx tsx browser-user.ts

The expected output includes Page title: Example Domain. The script creates and closes its own context; it does not intentionally reuse an existing logged-in context. It also closes the Playwright browser connection. Check your provider’s lifecycle documentation for whether a separate action is required to stop the hosted session and end usage.

This example is intentionally limited. A production workflow should record a task ID, set an overall deadline, validate the destination, and distinguish navigation failures from authentication failures. For more on the connection method and its limitations, see the Playwright `connectOverCDP` documentation.

Using an existing login

Do not assume that creating a new context automatically loads a saved profile. If a workflow needs a returning browser user, configure the appropriate persistent profile through the runtime’s documented session setup, then follow its instructions for accessing the relevant context.

Before allowing the agent to proceed, verify the signed-in account using an appropriate page element or account identifier. A successful page load is not evidence that the browser is authenticated as the intended user.

Choose isolation based on the risk

Not every workload needs the same browser setup. The right choice depends on what state is involved and how much separation your application requires.

Public research or page checks

Use a fresh context for each independent task when no login is needed. Set navigation and task timeouts, limit the destinations the worker can reach, and close the context after collecting the result.

A shared browser process with separate contexts can be operationally convenient, but assess whether that boundary meets your security requirements. For higher-risk workloads, you may need stronger separation at the browser session or infrastructure level.

Customer-specific account workflows

Use a dedicated account association and, where needed, a profile assigned to that customer’s authorized workflow. Keep the mapping between your tenant, the target account, and the profile in an access-controlled system.

Avoid passing passwords through prompts or storing them in plain text in task records. Prefer the target service’s approved authentication methods and use a human handoff when a login or verification step requires one.

Human-supervised actions

A live viewer can help an operator understand where an automation is stuck or review an important action. Viewing access is itself sensitive: pages may display personal information, account details, or one-time codes.

Limit viewer access to authorized operators and apply your organization’s retention and audit policies. A visible session is useful for diagnosis; it is not a substitute for explicit approval before a consequential action.

Production checklist for each browser user

Before deploying an automated workflow, make these decisions explicit:

  1. Identify the requester. Record the tenant, requesting user or service, and task purpose.
  2. Scope the account. Map the task to the intended website account and confirm the required permissions.
  3. Choose browser state. Use a fresh context unless the workflow has an approved reason to reuse a profile.
  4. Protect control access. Store CDP endpoints and other credentials as secrets; restrict network access and avoid logging them.
  5. Bound execution. Set timeouts, control retries, and define who stops the hosted session after errors or disconnects.
  6. Verify before acting. Check the current account and page state before reading sensitive data or submitting changes.
  7. Handle uncertainty. Pause for human review when authentication fails, the site changes, or the next action is consequential.
  8. Minimize retained data. Review what screenshots, logs, recordings, and profiles contain; apply access and deletion policies.
  9. Measure outcomes. Track task success, authentication failures, session duration, and human interventions without collecting unnecessary page content.

Retries deserve special care. Repeating a read-only navigation may be harmless; repeating a payment, message, or form submission may not be. Check whether the previous action completed before attempting it again.

When a hosted browser makes sense

A local browser is practical for development, debugging, and small workflows where the machine can safely hold the required state. It gives developers direct control, but the team is responsible for browser availability, cleanup, isolation, and the operational environment.

A hosted browser is useful when workers run remotely, tasks need separate sessions, or operators need a way to inspect an active browser without accessing a developer’s machine. Remote Browser provides hosted Chromium, session isolation, CDP access, configurable browser settings, and usage controls. The application remains responsible for authorization, task logic, and deciding which browser user may access which account.

For the broader architecture, read remote browsers for AI agents. Review pricing for current usage details and limits before sizing a deployment.