profile_id to run() — the agent opens a browser seeded from that profile and runs your task on it. Cookies and login state saved during the run persist, so the next run with the same profile is already logged in.
profile_id to run() provisions the browser and runs the agent in one call — no separate session step. Profile state is saved automatically when the run ends.
View your profile IDs at cloud.browser-use.com/settings.
Persist state on a browser you drive (CDP)
Profiles work the same whether the agent drives or you do. Passprofile_id to browsers.create(), set state over CDP, then stop the browser to flush cookies and localStorage into the profile. Reconnect later with the same profile_id and the state is there.
Use a site that actually sets cookies/localStorage to verify persistence —
example.com sets none, so it is a poor test target.Manage profiles
Usage patterns
- Per-user profiles: Create one profile per end-user. Query by name to get the profile ID, or store a mapping between your users and their profile IDs in your database.