---
name: browser-desk
description: Use Machine King Labs' Browser Desk, a real signed-in Chrome on Alpine Swift driven by an AI. Use it to browse the web, read or act on sites (including sites that need his logins), get screenshots, and ask follow-up questions about what it saw. Load it whenever a task needs a real browser and you are not on Alpine Swift. This covers Plum (Codex), Cupcake, the Mac and SOVEREIGN, from anywhere on the internet.
---

# Browser Desk (for AIs outside Alpine Swift)

Browser Desk is a real, visible Chrome on Machine King's PC "Alpine Swift". You send it a job in plain English. It does the job with its own AI brain, then gives you the answer and screenshots. It is signed in to his accounts and can sign in to more from its locked vault, which types the password without any AI seeing it.

## Address
- **Internet:** `https://aplineswift.tailc0c68e.ts.net`
- **Home network / Tailscale:** `http://192.168.1.251:8771` or `http://100.120.206.8:8771`
- **This manual, always current:** `GET <address>/skill` (no login needed). **Re-read it every 24 hours, when you log in again.**

## Your login (lasts 24 hours)
You were given a **name** and a **login key** (Plum: `browser-desk-login.txt` in your start kit). Never print the key and never put it in a URL.

```bash
curl -s -X POST $DESK/login -H "content-type: application/json" -d '{"name":"plum","key":"<login key>"}'
# -> {"token":"...","expires_at":"...","hours":24,"read_only":false}
```
Send `Authorization: Bearer <token>` on every other call. When a call returns **401**, log in again and retry once. Tokens die after 24 hours.

## Do a job
```bash
curl -s -X POST $DESK/submit -H "authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"task":"Open https://example.com and tell me the main heading."}'
# -> {"id":"job_abc","status":"queued"}
```
Optional fields: `"model"` (a brain id from `GET /models`), and `"read_only": true` (look only: no typing, clicking, signing in or buying).

Then poll every 5-10 seconds until `status` is `done` or `failed`:
```bash
curl -s "$DESK/status?job=job_abc" -H "authorization: Bearer $TOKEN"
# -> {"status":"done","answer":"...","steps":[...],"pictures":["/shot?job=job_abc&n=0", ...],"cost":0.0004}
```
Most jobs take 20 seconds to 3 minutes. `GET /status` with no job lists your last 20 jobs.

## See the pictures
Every job keeps up to 6 screenshots. Fetch each `pictures` link with your token; each comes back as a PNG:
```bash
curl -s "$DESK/shot?job=job_abc&n=0" -H "authorization: Bearer $TOKEN" -o shot0.png
```
Look at them. If a picture shows something the answer doesn't mention, ask about it.

## Ask a follow-up question
```bash
curl -s -X POST $DESK/ask -H "authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"job":"job_abc","question":"What is the price on that page?"}'
# -> {"id":"job_def","status":"running","follow_up_of":"job_abc"}
```
The Desk gets the earlier task and answer, and the browser is usually still on that page. Poll the new id as above.

## Writing good tasks
- Start with the full URL to open. Then say exactly what to read or do, and what the answer must contain.
- **Logins:** say "sign in with the saved login for <site>". If the site is missing from the vault, the job says so. Tell Machine King to add it in the panel's Credentials box. Never send a password in a task.
- **Captchas / "I'm not a robot" / phone codes:** the Desk waits for the page to clear. If a person has to solve a puzzle or type a code, the job ends saying so, with a picture. Tell Machine King. He can do it on Alpine and you then send the job again.
- One job, one goal. Use `/ask` for the next question rather than starting from scratch.

## Rules
- Only your own jobs are visible to you. 60 calls a minute at most.
- Machine King's own rules still apply: no purchases, payments, money moves, account deletions or messages sent in his name unless **he** asked for that exact thing.
- Never print the login key or token. If you must name one, show only its last 4 characters.
- If the Desk is down (connection refused or 502), post on the Switchboard bus to `alpine-swift`. Don't retry in a loop.

## Brains
The Desk picks its own brain: DeepSeek V4.1 Flash, then GLM 5.3 Flash (both via OpenRouter), then Claude Sonnet 5.5 (direct), then Cupcake's free local Qwen. If one fails, it moves to the next. `GET /models` lists them all. Choose one with `"model"` only when a job needs it, for example `"claude:claude-opus-5-5"` for hard judgement calls.
