Secure browser-based AI agents across session isolation, authentication, authorization, governance, and evidence, with a clear split of ownership.
A browser-based agent that passes a pilot can still fail a security review. The gap usually sits in the browser, in who can see the session, where credentials live, and what evidence survives when something goes wrong. Browser agents handle logins and sensitive data, so a weakness in the infrastructure becomes the team's incident.
This guide maps the risks that appear when AI agents operate real browsers, then sets out five controls an engineering lead can implement and defend. Each control carries a division of responsibility between the infrastructure provider and the adopting team, and the framework can be forwarded to a security reviewer without a sales explanation.
Security requirements for browser-based agents
What browser agents do and why they need controls
A browser-based agent navigates websites, completes forms, handles logins, and retrieves data on behalf of a user or business process. That activity creates security requirements around isolation, observability, and evidence. Automation should run only on sites and accounts the team is authorized to use, a baseline every control in this guide assumes.
When agents require full browser access
Not every task needs a browser, and if a service exposes a solid API, calling it directly is simpler and safer than giving an agent a browser. A full browser earns its place when the workflow depends on JavaScript-heavy pages, authenticated portals, or multi-step interactions with no suitable API. Steel runs a full browser even for a simple scrape, so logged-in and rendered pages come back the way a user sees them.
The trade-off is a larger attack surface, because a real browser executes untrusted page code, holds credentials, and maintains session state, and that surface is what the rest of this guide secures.
Mapping browser agent risks to controls
Risk profile for browser-based agents
The OWASP Top 10 for LLM Applications names prompt injection as its first risk, and the OWASP Top 10 for Agentic Applications starts with agent goal hijack.
Both apply in a browser, where the model's input includes page content the team doesn't control. For governance framing, NIST publishes the AI Risk Management Framework and defines per-request authorization in NIST SP 800-207, and the table below maps browser agent risks to their primary controls.
The five control areas for browser agents
The counter to these risks is five control areas, each answering a question a security reviewer will ask.
- Session isolation: can a hostile page escape its session?
- Authentication: who and what can start or view a session?
- Authorization: what is the agent allowed to do?
- Governance: who approves sensitive actions and policy changes?
- Evidence: can the team prove what happened?
Governance is a continual, cross-cutting requirement that applies to all five areas.
Threat vectors for browser-based AI agents
The four vectors below are where agentic AI security fails when a third party operates the browser.
Preventing browser session takeovers
Steel gives each session two links, per its live view documentation. Organization members can open the session in the Steel dashboard. Anyone with its debugUrl can view the browser and, when interaction is enabled, control it, because the URL carries its own viewer token and works without an API key. Interaction is on by default.
Authenticate users before sharing that URL, and keep it out of logs and analytics. Teams embedding live view in a user-facing product should create the session on their server and send only the debugUrl to the page, never the API key, because a forwarded link is a forwarded session.
Preventing credential leaks in logs
Steel keeps stored credential values out of the model's context, so an agent can log in without seeing the secret. Keeping a login across runs has three options: stored credentials, a captured session context, and a persistent profile, each trading convenience against exposure. A saved profile may require a fresh login once the underlying session expires. The remaining leak path is the team's own application logs, so never log form values.
Defending against malicious site payloads
A hostile page can try to exploit the browser itself. Steel's fleet runs each browser session in its own microVM, with its own kernel, memory, network, and files, as described in Steel's post on building the agent, not its computer. An exploit contained in a disposable VM has nowhere to persist.
Preventing unauthorized agent access
An agent with over-broad permissions can take actions the team didn't approve, whether that means a data-collection agent submitting forms or an order-status agent issuing refunds. Sensitive actions should route through human approval, because least privilege limits the blast radius of bugs and injected instructions alike. Emerging standards will help, as the IETF's Web Bot Auth working group is standardizing cryptographic identity for agents, currently as a draft.
Baseline security controls for browser agents
These controls form the baseline for securing AI agents operating browsers, and the questions to ask when one is missing.
Preventing cross-session data leakage
Sessions must not share state, and under Steel's isolation guarantee, each session is its own browser, with its own cookies, storage, and proxy. Shared browser pools reuse contexts to save startup cost, and state left behind in one job can surface in the next.
Managing agent credentials and secrets
Steel encrypts stored credentials with AES-256-GCM using a data key for each project, and an organization-specific key in Steel's key management service protects that data key, per its security and compliance documentation. Each encrypted value is bound to its organization, project, credential ID, and version, so copying the ciphertext to a different credential record won't make it decrypt there. Steel does not publish a customer-managed key option, so teams that require one should raise it with Steel during evaluation.
Controlling AI agent browser access
Access control operates at three layers, with the provider supplying session-scoped tokens for live view, project-scoped API keys, and SSO (Enterprise only). The team supplies everything in front of its own users, covering who may start sessions and who may view them.
Defining agent override policies
A person must be able to take over for two-factor authentication and unclear steps. Steel's live view supports interactive takeover, and the customer defines which actions run automatically, which require review, and which are forbidden. NIST SP 800-207 frames this as per-request authorization, a principle that maps to per-action approval for agents.
Compliance logs for agent workflows
Evidence is a control, because session recordings, replays, and agent traces let the team reconstruct what an agent did, and the agent traces timeline shows actions step by step. Retention depends on plan, as the subscription table below shows.
Session lifecycle in code
Secure session setup comes down to lifecycle: create the session with explicit limits, do the work, and release it. The examples below use Steel's official SDKs and set the pattern the other controls build on.
Configuring a Python agent session
import os
from steel import Steel
from playwright.sync_api import sync_playwright
client = Steel(steel_api_key=os.environ["STEEL_API_KEY"])
session = client.sessions.create(api_timeout=300000)
try:
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(session.websocket_url)
context = browser.contexts[0]
page = context.pages[0] if context.pages else context.new_page()
page.goto("https://example.com")
# agent work here
finally:
client.sessions.release(session.id)Keep the API key in STEEL_API_KEY, and add .env to .gitignore. Runtime requirements and the current connection pattern sit in the integration guide for the team's framework, such as CrewAI.
Configuring secure Node.js sessions
import Steel from "steel-sdk";
import { chromium } from "playwright";
const client = new Steel({ steelAPIKey: process.env.STEEL_API_KEY });
const session = await client.sessions.create({ inactivityTimeout: 300000 });
try {
const browser = await chromium.connectOverCDP(session.websocketUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] ?? (await context.newPage());
await page.goto("https://example.com");
// agent work here
} finally {
await client.sessions.release(session.id);
}The Claude Agent SDK integration shows the same pattern inside an agent framework.
Enforcing secure session termination
Releasing the session ends it and stops its billing, and the finally block is the enforcement mechanism because it runs even when the agent fails. A session ends after 5 minutes by default, which is 300000ms, and runs up to the plan maximum. That maximum is 15 minutes on Launch, 1 hour on Scale, and up to 24 hours on Enterprise.
Mapping security ownership for AI agents
Infrastructure tasks handled by Steel
On Steel Cloud, the provider side of the line includes per-session isolated microVMs, encrypted connections, session recording and replay, and encrypted credential storage that Steel manages. SSO runs on Enterprise, and a HIPAA-ready BAA is available on Scale and Enterprise with scope confirmed directly with Steel. Steel signs a Data Processing Agreement, and the Trust Center holds more on the security program.
Steel is currently in a SOC 2 Type II audit period, and the Trust Center tracks the security program as it progresses. Teams that need a completed report today should factor that timing into their evaluation.
Defining team scope for browser agents
Steel manages the infrastructure layer, and the adopting team owns the policy layer:
- Access policy: who can start, view, and approve sessions
- Secrets hygiene: credentials kept out of prompts, code, and logs
- Agent permissions: the action allowlist and approval thresholds
- Review processes: who watches recordings and how often
- Evidence retention: exports before the plan's retention window closes
A security reviewer should be able to assign every row an owner, and if any row lands on nobody, the review is not finished.
Deployment paths for browser-based agent security
Steel Cloud data controls and residency
Steel Cloud carries the managed controls above and runs in US regions. Teams with residency requirements outside the US have two routes: dedicated deployments or reserved compute through Steel, or the self-hosted path below.
Self-hosting the Steel Browser
Steel Browser is open source under Apache 2.0 and deploys on Docker, Railway, or Render, giving the team full control of the environment, and Steel Local and Steel Cloud share the session model. Self-hosting means the team owns authentication, updates, capacity, cleanup, logging, network policy, backups, and incident response. Steel Local concurrency is 1. Self-hosted Steel supports session files, and Steel Cloud also provides global file storage through the Files API. The Credentials API, managed proxies, CAPTCHA solving, and the Stealth Browser run on Steel Cloud only.
Control ownership across deployment models
Each control has a primary owner under each deployment model, and the adopting team keeps a verification or policy duty on every row.
Security features by Steel subscription
Security features are plan-gated, so the plan choice is partly a security decision. Details live on Steel's pricing page and enterprise page.
Pilot costs and success metrics
The Launch plan starts at $0 plus usage as of November 2026, with a $30 one-time credit valid for 90 days, and no credit card is needed to start.
A security pilot should measure session isolation behavior, evidence quality from recordings and traces, live view access controls, and the export path for retention. Steel reports 35M+ sessions served across its fleet (self-reported).
Security features for Scale plan workloads
Scale, at $250 per month plus usage as of November 2026 with a $100 monthly credit, adds a dedicated Slack channel and the HIPAA-ready BAA noted above. The retention window and the BAA matter most for teams in regulated workflows.
Enterprise plan security and access features
Beyond the concurrency, session length, SSO, and BAA in the table, Enterprise adds a dedicated Slack channel, a 911 email, the Stealth Browser, and reserved browser pools. It also adds support and uptime SLAs, with custom retention terms set by contract, including zero data retention on request. Teams can request SLA terms during evaluation and test failure behavior during the pilot.
Read the security and compliance documentation before choosing between Steel Cloud and Steel Local. To test these controls on a real workload, create an account on the free Launch plan.
Frequently asked questions
What are some risks that come with using AI?
For browser-based agents, the main risks are prompt injection through page content, session exposure through leaked live links, and credential leakage into logs or model context. Over-broad permissions are the fourth, letting the agent act beyond its task. The matching controls are session isolation, token-scoped access, encrypted credential custody, least-privilege permissions, and retained evidence.
What is security in AI?
Applied to agents acting in browsers, security means the agent's environment is isolated and its permissions are controlled. Untrusted page content can't steer it, a person can intervene on sensitive steps, and the team retains evidence of what it did. Agent security covers the actions the agent takes in the browser, which is the focus of this guide.
How can a team keep credentials out of model context?
Store credentials in a system that injects them without exposing values to the model. Steel encrypts stored credentials with AES-256-GCM using a data key for each project, protected by an organization-specific key in Steel's key management service, and binds each encrypted value to its organization, project, credential ID, and version. Steel also keeps stored values out of model context. The team must also keep secrets out of its own logs, prompts, and screenshots.
Can anyone view a live agent session?
Organization members can open the session in the Steel dashboard. Anyone with its `debugUrl` can view the browser and, when interaction is enabled, control it. Interaction is on by default, and the `debugUrl` works without an API key. Authenticate users before sharing that URL, including before embedding it in a product interface.
How long are session recordings retained?
Retention is 7 days on Launch, 14 days on Scale, and custom on Enterprise, where the contract sets the terms and can include zero data retention. The team exports the evidence it needs for audits before the window closes, because recordings past retention may not be recoverable.
Key terms glossary
Session isolation: Each browser session runs in its own isolated environment, so no state is shared between sessions. Steel's security and compliance documentation states the guarantee.
Credential custody: Where login secrets are stored and who holds the encryption keys. On Steel Cloud, credentials are encrypted with a data key for each project, protected by an organization-specific key in Steel's key management service.
Prompt injection: Instructions hidden in page content that an agent may read as its own, defended against by treating all page content as untrusted input.
Session takeover: Gaining control of a live session, typically through a leaked live view link, which can allow control as well as viewing.
Privilege escalation: An agent performing actions beyond its approved task, covered under Identity and Privilege Abuse in the OWASP Top 10 for Agentic Applications.
Audit trail: Recordings, replays, and agent traces that reconstruct what an agent did, retained per plan and exported before expiry.
Shared responsibility model: The split between provider-managed infrastructure controls and customer-owned policy, secrets, permissions, and reviews.
Self-host: Running Steel Browser on the team's own infrastructure under Apache 2.0, which returns operations and security maintenance to the team.
Data residency: Where session data physically runs, which for Steel Cloud servers is the United States.
Zero data retention: A custom Enterprise retention configuration where no session data is kept after a session ends, with terms set by the contract.