---
title: "Quickstart · Tempo AI Platform docs"
description: "Create a cloud agent, give it a turn, attach this machine as its hands and steer it, with curl."
url: "https://gateway.tempo-dev.workers.dev/docs/quickstart"
---

> 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.

# Quickstart

Create a cloud agent, give it a turn, lend it this machine as its hands and steer it while it works, all with curl.

[Get your Tempo Key](https://gateway.tempo-dev.workers.dev/key.md) · [How agents work](https://gateway.tempo-dev.workers.dev/docs/agents.md)

## Before you start

- **A Tempo Key.** [/key](https://gateway.tempo-dev.workers.dev/key.md) gets one in your browser, and the [Codex installer](https://gateway.tempo-dev.workers.dev/docs/keys.md#codex) saves one in `~/.codex/tempo-gateway.key`.
- **curl and jq.** Every step is one HTTP call.
- **nanocode**, for the step that attaches this machine. The answer to that step carries a command that installs it.

## Run your first agent

1. Keep your key and a helper in the shell. [/key](https://gateway.tempo-dev.workers.dev/key.md) gets one in your browser, and the [Codex installer](https://gateway.tempo-dev.workers.dev/docs/keys.md#codex) saves one in `~/.codex/tempo-gateway.key`.

   **shell setup**

   ```sh
   export GW=https://gateway.tempo-dev.workers.dev
   export TEMPO_KEY=$(cat ~/.codex/tempo-gateway.key)
   gw() { curl -sS -H "authorization: Bearer $TEMPO_KEY" -H content-type:application/json "$@"; }
   ```
2. Create a Codex agent and give it a turn. Creating answers the agent with its `id` (`agt_…`), and the turn answers `202` with its `request_id` and the agent's `agent` id and `persona`.

   **create and prompt**

   ```sh
   AGENT=$(gw $GW/v1/agents -d '{"harness":"codex"}' | jq -r .id)
   TURN=$(gw $GW/v1/agents/$AGENT/turns -d '{"prompt":"Wait 30 seconds in a cell, then say hello"}' | jq -r .request_id)
   ```

   A `persona` is optional: give one at creation (or later with `PATCH`) and every route takes it in place of the id. A [saved persona](https://gateway.tempo-dev.workers.dev/docs/agents.md#personas) of that name also gives the agent its harness, model, thinking and instructions.

   **persona**

   ```text
   gw $GW/v1/agents -d '{"harness":"claude","persona":"reviewer"}'
   gw $GW/v1/agents/reviewer/turns -d '{"prompt":"Say hello"}'
   ```
3. While it runs, attach this machine to your account as the hand `laptop`. The answer holds its `token` and `url`, the `nc hand` command as `short`, a `command` that installs nanocode first, and a `tab` link that attaches a browser tab instead.

   **attach a hand**

   ```sh
   HAND=$(gw -X POST "$GW/v1/hands?name=laptop")
   nc hand "$(jq -r .url <<<"$HAND")" --token "$(jq -r .token <<<"$HAND")" &
   ```
4. Prompt again. While the first turn runs, the prompt steers it and answers `{"status":"steered"}`, and the hand is usable in that turn; once it ended, the prompt starts a new turn.

   **steer**

   ```text
   gw $GW/v1/agents/$AGENT/turns -d '{"prompt":"Also run uname -a on the laptop hand"}'
   ```
5. Read the turn. Its `status` is `queued` or `running` until it ends, and then it holds the agent's answer or its error.

   **read the turn**

   ```text
   gw $GW/v1/agents/$AGENT/turns/$TURN
   ```
6. Disconnect the hand and revoke its token; `nc hand` exits.

   **remove the hand**

   ```text
   gw -X DELETE $GW/v1/hands/laptop
   ```

## Next steps

- [Agents](https://gateway.tempo-dev.workers.dev/docs/agents.md): turns, steering, subagents, ids and every route.
- [Machines](https://gateway.tempo-dev.workers.dev/docs/machines.md): hands on your laptop, a browser tab or a sandbox, and paid hands.
- [Tempo Keys](https://gateway.tempo-dev.workers.dev/docs/keys.md): budgets, limits and how a key pays.

[<- Overview](https://gateway.tempo-dev.workers.dev/docs.md) · [It durably runs agent swarms on any model, without your laptop ->](https://gateway.tempo-dev.workers.dev/docs/guides/swarms.md)
