> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hotkey.so/llms.txt
> Use this file to discover all available pages before exploring further.

# A first session

> What an agent does in a Hotkey browser, call by call, when a sign-in needs you.

This is one task from start to finish, with the calls the agent makes and what each returns, shortened. The site is a sample, Ledgerline, at `app.ledgerline.example`.

You ask Claude:

> Use my Work browser to check the open invoices in Ledgerline.

## 1. Find the browser

The agent lists your browsers and picks one.

```json list_connected_browsers wrap theme={null}
[
  { "deviceId": "brw_k3m9x2p7qa4t", "name": "Work", "inUse": true, "awake": false, "timeZone": "Europe/Berlin", "languages": ["en-GB", "en"] },
  { "deviceId": "brw_q8f2w7ma3dzc", "name": "Personal", "inUse": false, "awake": false, "timeZone": "Europe/Berlin" }
]
```

Work is already the one in use, so it needs no `select_browser`. It's asleep, and wakes on the next call in about a second.

## 2. Open the site

```text navigate wrap theme={null}
{ "url": "app.ledgerline.example/invoices" }

Navigated to https://app.ledgerline.example/login?next=/invoices
```

The browser was signed in to Ledgerline, but the session ran out, so the site sends it to its sign-in page.

## 3. Sign in with the saved password

```text sign_in wrap theme={null}
{ "tabId": 1001 }

Typed the saved email and password for alex@work.example on app.ledgerline.example and submitted. Read the page or take a screenshot to see the result.
```

The browser typed the password you saved earlier. It never appears in the result, so the agent never sees it. The agent reads the page to see where it landed.

```text get_page_text wrap theme={null}
{ "tabId": 1001 }

Ledgerline: verify it's you
Verify it's you
We sent a 6-digit code to the phone ending in 42. Enter it to finish signing in.
```

## 4. Ask you for the code

Only you have the code, so the agent asks. In a chat it doesn't wait: it passes `wait_seconds: 0`, gives you the link and ends its turn.

```json request_human wrap theme={null}
{ "reason": "Enter the 6-digit code Ledgerline sent to your phone, then tap Done.", "tabId": 1001, "wait_seconds": 0 }

{
  "id": "ask_k3m9x2p7qa4t_5f1c0e9a2b7d",
  "kind": "human",
  "reason": "Enter the 6-digit code Ledgerline sent to your phone, then tap Done.",
  "by": "Claude",
  "status": "pending",
  "link": "https://console.hotkey.so/hkl_8fK2mQ9xLp3vT6wZbC4d",
  "tabId": 1001,
  "linkExpiresAt": "2026-11-15T10:20:00.000Z",
  "next": "call wait_for_human with id \"ask_k3m9x2p7qa4t_5f1c0e9a2b7d\" (in a chat with the person: give them the link, end your turn, and call it once they say they are done)"
}
```

Claude tells you: "Ledgerline wants a code from your phone. Open this link, enter it, and tap Done." Your phone also gets a push, and the ask waits in **Needs you** in the console.

![The ask, opened from its link on a phone.](https://mintcdn.com/hot-key/sZaNcHFHkClnSzgJ/images/ask-link-phone-light.png?fit=max\&auto=format\&n=sZaNcHFHkClnSzgJ\&q=85\&s=24b451ffb5c633bc0ed4a2342f2a0f3b)

The ask, opened from its link on a phone.

You type the code on the page, tap **Done**, and tell Claude you're done.

## 5. Carry on

```json wait_for_human wrap theme={null}
{ "id": "ask_k3m9x2p7qa4t_5f1c0e9a2b7d" }

{ "id": "ask_k3m9x2p7qa4t_5f1c0e9a2b7d", "status": "done", "resolvedBy": "link", "tabId": 1001, … }
```

The tab is signed in now, and stays signed in for the next run. The agent goes back to the invoices.

```text navigate wrap theme={null}
{ "url": "app.ledgerline.example/invoices", "tabId": 1001 }

Navigated to https://app.ledgerline.example/invoices
```

```text get_page_text wrap theme={null}
{ "tabId": 1001 }

Invoices
INV-2041  Brightwater Co.  $4,200.00  Due Nov 20  Open
INV-2038  Northwind Ltd.   $1,150.00  Due Nov 18  Open
```

Claude answers with the two open invoices. Next time, the browser is still signed in, and the same task needs no one.

## What to take from it

* The agent signs in with `sign_in` and never handles the password.
* When only you can do a step, the agent asks with `request_human`, and you do it in the same tab, on your phone or in the console.
* In a chat the agent ends its turn after asking. Tell it when you're done.

See [Asks and hand links](https://docs.hotkey.so/concepts/asks.md) for how asks work and what a link can do, and the [tools reference](https://docs.hotkey.so/tools.md) for every call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.