---
title: "Machines · Tempo AI Platform docs"
description: "Your laptop, a browser tab or a sandbox as an agent's hands, and paid hands that charge other agents per use."
url: "https://gateway.tempo-dev.workers.dev/docs/machines"
---

> Every page of the Tempo AI Platform is Markdown at its URL with .md, or with Accept: text/markdown. The index of every page is https://gateway.tempo-dev.workers.dev/llms.txt, the API https://gateway.tempo-dev.workers.dev/openapi.json and the MCP server https://gateway.tempo-dev.workers.dev/mcp.

# Your machines as hands

Let an agent work on the machines you already have: your laptop, a browser tab, a sandbox. Lend a laptop or a GPU box to other people's agents, and they pay you for what they touch.

[Get your Tempo Key](https://gateway.tempo-dev.workers.dev/key.md) · [Run it in a cloud agent](https://gateway.tempo-dev.workers.dev/docs/quickstart.md)

- **Your laptop.** nc hand attaches a machine to your account, and every agent of the key runs commands and edits files there, also in a turn already running.
- **A browser tab.** nanocode.xyz/hand turns a tab into a hand, from the same token.
- **A sandbox, nothing installed.** compute_create with attach makes a new sandbox a hand. The gateway runs the hand and reaches the sandbox through its provider.
- **Survives restarts.** A hand that drops for under 30 s resumes what it was running, and its replies reach the agent.
- **Price your machine.** nc hand --pricing charges per file read or command. Agents that use it pay you, and an agent that cannot pay gets nothing.
- **Caps and payouts.** Cap what a hand may earn per operation and per window. Owners are paid over MPP channels to their address, or in USDC.e from the gateway.

## Use it

Attach machines with your Tempo Key like any platform, and get paid over MPP when other people's agents use yours.

### From your cloud agent

Give [your agent](https://gateway.tempo-dev.workers.dev/docs/quickstart.md) a turn. It already has these tools:

> Bring up a sandbox attached as w1, clone our repo there, run the test suite on w1, and run git status on my laptop hand to compare.

**Cloud agent**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/agents/$AGENT/turns \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -H accept:text/event-stream \
  -d '{"prompt":"Bring up a sandbox attached as w1, clone our repo there, run the test suite on w1, and run git status on my laptop hand to compare."}'
```

### With your Tempo Key

Mint a hand with your Tempo Key and connect it. Hands belong to the key and its Gateway-App, so every agent of the key can use them and no one else's can.

**Your laptop**

```sh
HAND=$(curl -s -X POST "https://gateway.tempo-dev.workers.dev/v1/hands?name=laptop" -H "authorization: Bearer $TEMPO_KEY")
nc hand "$(jq -r .url <<<"$HAND")" --token "$(jq -r .token <<<"$HAND")"
```

**A sandbox**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/compute/create \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"lease":600,"attach":"w1"}'
```

**Use it**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/agents/$AGENT/turns \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"prompt":"Run uname -a on the laptop hand","hand":"laptop"}'
```

**List and remove**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/hands -H "authorization: Bearer $TEMPO_KEY"

curl -X DELETE https://gateway.tempo-dev.workers.dev/v1/hands/laptop -H "authorization: Bearer $TEMPO_KEY"
```

### Paid to you over MPP

A paid hand's owner is paid over MPP: the agent that used it opens a session channel to your address, in OUSD or USDC.e, and the gateway settles it to you as operator. You need only an address, and you never run MPP code.

**pricing.json**

```json
{
  "payee": "0xYourAddress",
  "describe": "Lab dataset, $0.01 a file",
  "currency": "OUSD",
  "rules": [{ "paths": ["data/**"], "ops": ["read"], "usd": 0.01 }]
}
```

**Lend it**

```sh
nc hand "$URL" --token "$TOKEN" --pricing pricing.json --tools-only
```

**Cap it**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/hands/laptop/cap \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H content-type:application/json \
  -d '{"usd":5,"operation":0.05}'
```

### As MCP tools

compute_hand attaches a running sandbox, and compute_create's attach a new one. Inside an agent, any tool call runs on a hand when it names one.

`compute_hand`, `compute_create`, `hands`, `exec_command`

**Claude Code**

```sh
claude mcp add --transport http tempo https://gateway.tempo-dev.workers.dev/mcp \
  --header "authorization: Bearer $TEMPO_KEY"
```

**Codex**

```sh
curl -fsSL https://gateway.tempo-dev.workers.dev/codex | sh
```

## How hands work

A hand is a machine that runs an agent's cells and tools. In a cell, a tool call runs on a hand when it names one, such as `tools.exec_command({ cmd: "uname -a", hand: "laptop" })`, and a turn's `hand` places the whole turn there.

- **Your machines**\
  `nc hand` (`nanocode hand`) attaches a machine, and nanocode-ts's `Hand.connect` a Node process or a browser tab at nanocode.xyz/hand, with the token a hand route answers.
- **Account or agent**\
  A hand of your account, from `POST /v1/hands`, serves every agent of the key and app, also in a turn that is already running. A hand from `POST /v1/agents/:id/hands` serves that one agent.
- **Sandboxes**\
  A sandbox joins the account as a hand with nothing installed in it: `compute_create` with `attach: "w1"`, or `compute_hand` for a running one. The gateway runs the hand and reaches the sandbox through E2B or Modal, so an agent and its subagents can each bring up a machine from a cell, paid from the key. The hand ends with its sandbox.
- **Restarts**\
  When a hand's connection drops, the gateway keeps its agents attached for 30 s; a hand that comes back as the same process finishes what it was running, and its replies reach the agent.
- **Ending**\
  `DELETE /v1/hands/:name` disconnects a hand and revokes its token, so `nc hand` exits; minting the name again issues a new token. Revoking the key ends its hands too.

## Paid hands

A hand's owner prices its files and commands with `nc hand --pricing pricing.json` (or `Hand.connect`'s `pricing`): the payee address, a description agents read, the currency, `ousd` by default or `usdce`, and rules by path and operation.

- **Priced before it runs**\
  Every request an agent sends a priced hand carries the most it may cost: $1, or less under the hand's caps. The hand refuses an operation priced above that without running it.
- **Paid before the agent sees it**\
  The gateway charges the agent's key or payer once the hand answered, and only then hands the answer over. An agent that cannot pay gets payment_failed and none of the data; an error is never charged.
- **Caps**\
  `POST /v1/hands/:name/cap` sets what the hand may charge in all and per operation. Each set starts a new window, which is how an app lends a hand per round.
- **Getting paid**\
  The agent pays the owner over an MPP session channel to the payee's address, in OUSD or USDC.e, which the gateway settles to the owner as operator once $0.10 is owed. An agent that cannot open one pays the gateway instead, and the gateway pays the owner in USDC.e at $0.10, or at $0.01 a day later.
- **Seeing it**\
  `GET /v1/hands` reports each hand's charges, what it earned and what reached the owner on chain, with its payouts and channels.

A tools-only hand is priced per tool call with its input; a hand that runs cells is priced per cell. [Pricing](https://gateway.tempo-dev.workers.dev/docs/pricing.md) lists the gateway's own prices; a hand's are its owner's.

## Routes

Every route takes the key as `Authorization: Bearer` and an optional `Gateway-App`, and minting, listing, capping and removing hands is free. A hand's socket carries its hand token, not the key.

| Route                           | What it does                                                                                                                                                                                                                                                   | Price                                                   |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| POST /v1/hands?name=            | A hand token for your account, with its socket url, the nc hand command as short and a tab link: every agent of the key and app can use the hand, also in a turn already running. The hand runs tools only, unless \&cells=1 lets it run the agents' cells too | Free                                                    |
| GET /v1/hands                   | Your account's hands, the agents each is attached to and its requests; for a priced hand, its pricing, cap, charges, earnings, payouts and channels                                                                                                            | Free                                                    |
| POST /v1/hands/:name/cap        | Cap what agents may spend on a priced hand, in all (usd) and per operation, starting a new window. A hand sets prices only on a name with a cap                                                                                                                | Free                                                    |
| DELETE /v1/hands/:name          | Disconnect a hand and revoke its token                                                                                                                                                                                                                         | Free                                                    |
| POST /v1/agents/:id/hands?name= | A hand token for one agent, with its socket URL and the nc hand command                                                                                                                                                                                        | Free                                                    |
| GET /v1/agents/:id/hands        | The hands attached to an agent                                                                                                                                                                                                                                 | Free                                                    |
| POST /v1/compute/hand           | Attach a running sandbox as a hand of the key's account, named sb- and the end of its id unless you name it                                                                                                                                                    | Free                                                    |
| hand.use                        | An operation on a priced hand, charged after the hand answered and paid to its owner                                                                                                                                                                           | Owner's price (at most $1 an operation, nothing on top) |

[<- Compute](https://gateway.tempo-dev.workers.dev/docs/compute.md) · [Memory ->](https://gateway.tempo-dev.workers.dev/docs/memory.md)
