- Browse anything — if a human can do it in a browser, your agent can too
- Stay logged in — sessions persist across runs with contexts, no re-auth loops
- See what your agent sees — every session is inspectable via live view and session recording
- Access any website — Agent Identity gets your agent past anti-bot systems and authentication walls
- Skip the infra — no browser clusters to manage, spin up thousands of sessions on demand
Looking to deploy your browser agent? Functions let you deploy and run agents on Browserbase for faster, more secure execution — invocable via webhook or API call.
What you can build
If your agent touches the web, it needs a browser. Build agents that:- Navigate portals, fill out forms, and submit data on sites without APIs
- Log into third-party tools and take action on a user’s behalf
- Pull live data from sites that require authentication or block bots
- Run parallel workloads across thousands of browser sessions
Implementation
Use Search and Fetch to gather context cheaply, then hand off to a browser agent for interaction.Search the web
Use the Search API to find relevant pages without spinning up a browser. Returns structured results — quick, token-efficient recon for your agent.
Fetch page content
Use the Fetch API to retrieve content from a target URL. Faster and cheaper than a full session for read-only checks and pre-processing.
Launch a browser agent
Use Stagehand to give your agent a headless browser. The agent autonomously navigates, interacts with elements, and extracts structured data — powered by any model via the Model Gateway.
Example: Research agent
Search the web, fetch a page for recon, then launch a Stagehand agent to extract key points from the top result.- TypeScript
Stagehand’s Python SDK also supports this workflow. See the Python quickstart to get started.
Best practices
Use Search and Fetch for recon
Search and Fetch are faster and cheaper than a full browser session. Use them to gather context, then send your agent to pages that need interaction.- TypeScript
Persist sessions with contexts
Use browser contexts to save login state across agent runs. Your agent authenticates once, then picks up where it left off — no re-auth loops.- TypeScript
Constrain agent behavior with system prompts
A well-scoped system prompt reduces hallucination, limits unnecessary navigation, and keeps token usage predictable.- TypeScript
Monitor with live view and session recordings
Use live view to watch agent sessions in real time, and session recordings to debug after the fact.- TypeScript
Next steps
Stagehand
The AI SDK for browser agents
Agent Identity
Access any website without getting blocked
Contexts
Persist login state across agent runs
Functions
Deploy and run agents on Browserbase
Session live view
Watch agent sessions in real time
Model Gateway
One API key, access to every model
GitHub repository
Get started with the full ready-to-use browser agent implementation.Browser agent demo
Clone, configure, and run in minutes