Skip to main content

1. Install

pip install browser-use-sdk
Get a key at cloud.browser-use.com/settings, then:
export BROWSER_USE_API_KEY=your_key

2. Run your first task

import asyncio
from browser_use_sdk.v3 import AsyncBrowserUse

async def main():
    client = AsyncBrowserUse()
    result = await client.run("List the top 20 posts on Hacker News today with their points")
    print(result.output)

asyncio.run(main())
Want a full working app? Check out the Chat UI example.

Agent vs Browser

AgentBrowser
Methodsessions.create() / run()browsers.create()
What it doesAI agent runs your taskRaw browser via CDP
task
model
proxy
custom_proxy
profile_id
recording
workspace_id
keep_alive
screen size
timeout