/v1 from your backend. Every write takes an Idempotency-Key, so each step is safe to send again.
1. One workspace for your product
Make one team workspace for the company in the console, under Settings, then Workspace. Your staff are its members and see every browser. Your users never sign in to Hotkey; they only open hand links. Don’t make a workspace per user. Workspaces are for people who work together, and a plan’s limits belong to the workspace. Make a key for the workspace: switch to it in the console, then Settings, Connect your agent, Tokens for scripts. Your backend keeps it. It is the only key that makes browsers. Then turn phone alerts off, since you tell your users yourself:2. A browser for each user
external_idis your id for the user, unique in the workspace. A second browser with it is refused with 409browser_exists, and the error’sbrowserfield names the first one.GET /v1/browsers?external_id=user_829finds it later. For an admin page,?q=searches names, external ids and metadata (q=plan:pro), and?state=awakelists those at work now (filters).- Names are unique in the workspace, so two users called Ada can’t both have
"Acme for Ada": the second is refused with 409. Put your own user id in the name your user sees, such as"Acme for Ada (829)"; the hand link’s page shows it to them (“It opens this one tab of Acme for Ada (829)”). Or leavenameout: the browser is then named after itsexternal_id, and the user’s display name can go inmetadata. - Making browsers in bulk, send at most 25 requests a second with one key; past that the answer is 429 with
Retry-After. 300 browsers took 8 to 20 seconds in our runs. - A new browser sleeps. It wakes when it is used and sleeps again on its own, so a user who isn’t active costs nothing.
3. A key that reaches only that browser
Give the agent that works for this user a key for their browser alone:secret is shown once. With it, on /v1 and on MCP:
list_connected_browsersandGET /v1/browsersshow this browser only, and calls without atabIdgo to it.- Another user’s browser, tabs, asks, downloads and events answer as if they don’t exist (404 on
/v1, “doesn’t exist” over MCP). A mistake in your agent, or a prompt injected by a page, can’t reach another user. - It makes no browsers or keys and changes no workspace setting (403
key_scoped). - It stops working when the browser is deleted or moved to another workspace.
https://mcp.hotkey.so with Authorization: Bearer <secret>. A browser has at most 5 keys of its own.
4. The first sign-in
Ask the user to sign in, and say where to send them back:link to your user, by email, text or in your app. It opens that one tab with no sign-in to Hotkey. They sign in, press Done, and the page sends them to your return_url. If they can’t, Can’t do it takes a note, and they go back the same way.
The link’s page names your team workspace as who asks (“Sign in for Acme”, “Acme sent you this link from Hotkey”), so name the workspace after your product. An agent that asks with request_human is named by the title of its MCP client instead.
-
return_urlis https (http only onlocalhost). The link’s page says where it goes back to, and never tells your user to answer an agent in a chat. Without a team name to show, it names your app byreturn_url’s host. -
A link opened again after the step ended, or after its 30 minutes, sends your user back to
return_urltoo. Have that page offer a new link when the ask still waits (below). -
A link works for 30 minutes. If the user comes later, make a new one and send that:
The old link stops at once. The ask itself waits up to
timeout_minutes, a day by default. -
An email can sit unread for longer than that. Put your own address in it, such as
https://app.acme.com/connect/829, and when your user opens it, read the ask (GET /v1/asks/{id}): send them to itslink, or make a new one whenlinkis null, or a new ask when it ended. -
Someone who opens a link that ended reads that it ended, with a button back to your
return_url. Your user reaches that page after Done, after Can’t do it, and from a link that ended, so have it read the ask (GET /v1/asks/{id}) before it says they’re connected. -
An agent asks the same way with
request_human, which also takesreturn_url. -
Add
"save_sign_in": trueand your user may let the browser keep the password they sign in with, so the next time the site signs the browser out, your agent’ssign_insigns it back in without them (Sign-ins your users let the browser keep).
5. Many users at once: a nightly run
Your plan sets how many browsers work at once (Plans and limits, 50 on Scale), and every user’s browser counts while it is awake.GET /v1/workspace says both numbers (plan.browsers_at_once, plan.browsers_working). When every place is taken, a call that needs one more browser waits up to 20 seconds for one to free, then fails: /v1 answers 429 browsers_busy with Retry-After: 30, and an MCP tool call answers with an error whose _meta.retryAfter is 30. Nothing ran, so send it again then. A browser frees its place once nothing has used it for 15 seconds, and one kept awake only by an ask that nobody has open frees it too (its link wakes the browser again).
So a run over hundreds of users:
- Runs at most
plan.browsers_at_onceusers at a time, as a pool: start the next user when one finishes, rather than in fixed waves. - Puts each browser to sleep when its user is done, with
POST /v1/browsers/{id}/sleep. Its place goes to the next user at once, where otherwise each new start waits out the 15 seconds. In a run of 300 users 50 at a time, no start waited for a place this way, against 50 that did without it; in one of 12 users 3 at a time, the run took 13 s instead of 64 s. The browser keeps its logins and wakes in a second or two the next night. - Treats
browsers_busyand 503 as “try again afterRetry-After”, and puts the user back in the queue.
6. Webhooks
Register an endpoint for the workspace to hear about every user’s browser:ask.doneandask.cancelledsay the user finished or couldn’t; the event’sbrowsernames whose browser it is, with itsexternal_id, so you find your user from the event alone.- An endpoint made with a user’s key, or with
"browser": "brw_…"in the body, gets that browser’s events only. - See Webhooks for signatures and retries.
- The endpoint’s address must be https and resolve to a public address. To test on your own machine, put your receiver behind a tunnel (cloudflared, ngrok) and register its https address.
7. Your support staff
Your staff are members of the team workspace and see every user’s browser in the console, live. Each browser object has aconsole address that opens it there; link to it from your admin page.
To show a user’s browser inside your own admin page, embed its live view: list your admin site’s origin on the workspace, mint a short-lived view-only embed for that browser from your backend, and put its url in an iframe. The console and hand links themselves can’t be framed by another site.
8. When a user leaves
browser.deleted webhook says when its files are gone. The keys made for it stop working at once, and the endpoints filtered to it are deleted a minute later, after its last events have gone out. In a team, the key of an owner or admin deletes browsers; a user’s key never does.
Many users at once, up to 100 a request:
9. Billing your users
GET /v1/usage?group_by=external_id gives each of your users’ minutes awake, agent calls, asks, downloads and storage for a range of days, this month by default, and format=csv gives it as a spreadsheet. Users who left during the month keep their row. Each browser object also carries this month’s usage, for an admin page. See Usage.