Send either of the first two as a header:
Scoping rules
- A
sat_token for agent X presented on agent Y’s routes → 401. - A
swk_key presented on an agent outside its workspace → 401. - Tokens and keys can never mint, list, or revoke tokens and keys — that stays with a signed-in browser session.
Getting credentials
- Agent token (
sat_) — minted by the owner on the agent’s Reach page in the studio. - Workspace key (
swk_) — via device-flow login (below), or manually on /studio → Devices & keys.
Device-flow login
Thegh auth login pattern — how spirit login (or any MCP client / script)
gets a workspace key without a human ever handling the secret:
Errors
Every error is JSON —{"error": "..."} — with conventional status codes:
400 bad input, 401 unauthenticated, 402 out of credits, 403 forbidden,
404 unknown agent or resource, 429 rate-limited.