---
title: "Docs · Tempo AI Platform"
description: "How to run Codex and Claude agents, models, web search, cards, sandboxes, machines, memory, email and phone numbers on a Tempo Key or straight over MPP."
url: "https://gateway.tempo-dev.workers.dev/docs"
---

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

# Cloud agents overview

Cloud agents are Codex and Claude agents that run on the Tempo AI Platform instead of your laptop, with everything they call a tool: models, the web and any MPP service, sandboxes and browsers, your machines, memory, mail and phone numbers. One Tempo Key creates them and pays for all of it from a budget you set. There is no account to open: your wallet is who you are.

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

## Cloud agents or your own

The same key runs both. Use a cloud agent when the work should outlive your session; bring your own when you want the loop on your machine.

|                        | Your own agent                                    | Cloud agent                                                         |
| ---------------------- | ------------------------------------------------- | ------------------------------------------------------------------- |
| **What runs the loop** | Your machine: Codex, Claude Code or your own code | The platform: a Codex or Claude loop in its own Durable Object      |
| **When it stops**      | When you close the terminal                       | When the work is done, a crash or a deploy included                 |
| **Where commands run** | Where you run it                                  | Its own workspace, a sandbox, or a machine you attach as its hands  |
| **What you call**      | The models, tools and MPP services, with your key | Its routes: create, turn, steer, stream, cancel                     |
| **Best for**           | Work you watch, in your editor                    | Long or unattended work, fan-out to subagents, agents your app runs |

To bring your own, one command makes the gateway Codex's provider and MCP server, and Claude Code takes the key in its environment. [Models](https://gateway.tempo-dev.workers.dev/docs/models.md) and [MCP tools](https://gateway.tempo-dev.workers.dev/docs/mcp.md) cover the rest.

**Codex**

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

**Claude Code**

```sh
ANTHROPIC_BASE_URL=https://gateway.tempo-dev.workers.dev ANTHROPIC_AUTH_TOKEN=$TEMPO_KEY ANTHROPIC_MODEL=vercel/anthropic/claude-sonnet-5.5 claude
```

**MCP tools**

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

**OpenAI SDK**

```ts
new OpenAI({ baseURL: "https://gateway.tempo-dev.workers.dev/v1", apiKey: process.env.TEMPO_KEY })
```

**Any MPP service**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/fetch/https://api.exa.ai/search -H "authorization: Bearer $TEMPO_KEY" -H content-type:application/json -d '{"query":"Tempo payments"}'
```

## Core concepts

| Concept   | What it is                                                                                                                                           |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tempo Key | An sk-tempo- API key with a budget Tempo enforces on chain. It creates your agents and pays for everything they call.                                |
| Agent     | A Codex or Claude loop on a gateway model, with Code Mode cells and a workspace under /workspace. It has an id (agt\_…) and, if you like, a persona. |
| Turn      | One prompt and the work it starts. It runs in the cloud until it ends, whether or not you stay connected.                                            |
| Events    | The agent's log: its text, tool calls and their results, as JSON pages or a live stream.                                                             |
| Subagent  | An agent its parent spawns in the same session, on either harness, that you can message, interrupt or question from outside.                         |
| Hand      | A machine the agent's cells and tools run on: your laptop, a browser tab or a sandbox, attached to one agent or to your account.                     |
| Tools     | The gateway's MCP tools, web search, and a fetch that pays any MPP service from the key.                                                             |
| App       | A name in Gateway-App (default) that keeps a key's agents and data apart.                                                                            |

## How it works

1. ### Get a Tempo Key

   Choose its budget, approve it with your passkey in Tempo ID, and keep the key it shows you once.

   **shell setup**

   ```sh
   export GW=https://gateway.tempo-dev.workers.dev
   export TEMPO_KEY=sk-tempo-…
   ```
2. ### Create an agent

   Pick the harness, Codex or Claude, and a model that calls tools. It answers the agent's id.

   **1. Create an agent**

   ```sh
   curl https://gateway.tempo-dev.workers.dev/v1/agents -H "authorization: Bearer $TEMPO_KEY" -H content-type:application/json -d '{"harness":"codex","persona":"bench"}'
   ```
3. ### Give it somewhere to run

   Its cells run in its own runtime with a workspace. For more, it starts sandboxes and GPUs itself, or you attach your laptop or a sandbox as its hands. [Machines](https://gateway.tempo-dev.workers.dev/docs/machines.md)
4. ### Send a turn and stream its events

   Post a prompt with `Accept: text/event-stream` to watch the model write, or without it to get the turn's id and poll.

   **2. Give it a turn**

   ```sh
   curl https://gateway.tempo-dev.workers.dev/v1/agents/bench/turns -H "authorization: Bearer $TEMPO_KEY" -H content-type:application/json -H accept:text/event-stream -d '{"prompt":"Benchmark zlib, bz2 and lzma in sandboxes"}'
   ```
5. ### Steer or interrupt

   A prompt sent while a turn runs steers it at the model's next step. Cancel a turn to stop it.

   **steer and cancel**

   ```sh
   curl $GW/v1/agents/bench/turns -H "authorization: Bearer $TEMPO_KEY" -H content-type:application/json -d '{"prompt":"Skip lzma"}'
   curl -X POST $GW/v1/agents/bench/turns/$TURN/cancel -H "authorization: Bearer $TEMPO_KEY"
   ```

## How it works

One guide for each claim on the home page, explaining how that part of the platform works.

- [It durably runs agent swarms on any model, without your laptop](https://gateway.tempo-dev.workers.dev/docs/guides/swarms.md)\
  How an agent's turn runs in its own Durable Object, fans out to subagents on any model, and survives disconnects, crashes and deploys.
- [It's multiplayer](https://gateway.tempo-dev.workers.dev/docs/guides/multiplayer.md)\
  How a team co-steers shared agents from its own wallets and keys, reuses personas, and spends one budget with a limit per member.
- [It's context efficient](https://gateway.tempo-dev.workers.dev/docs/guides/code-mode.md)\
  How a cell runs as a program next to the tools, so only what it returns enters the model's context.
- [It's customizable](https://gateway.tempo-dev.workers.dev/docs/guides/personas.md)\
  How a persona names an agent's harness, model, effort and instructions once, so every agent started from it, yours or your team's, works the same way.
- [It can pay for its own compute, memory and storage](https://gateway.tempo-dev.workers.dev/docs/guides/resources.md)\
  How sandboxes, GPUs, browsers, values, files and repositories are bought, scoped to a wallet and billed by the second or the call.
- [It supports every tool](https://gateway.tempo-dev.workers.dev/docs/guides/tools.md)\
  How one MPP session channel pays the platform's tools, web search and any paid API, with one transaction to open it.
- [It's an API](https://gateway.tempo-dev.workers.dev/docs/guides/api.md)\
  How a Tempo Key turns a bearer token into payments signed by an access key your wallet limits on chain.
- [It's an MCP](https://gateway.tempo-dev.workers.dev/docs/guides/mcp.md)\
  How the MCP server serves every route as a tool, with the same prices and data, paid from a key or over MPP.
- [It's an MPP service](https://gateway.tempo-dev.workers.dev/docs/guides/mpp.md)\
  How every paid route answers 402, takes a session voucher from any wallet, and makes the wallet that paid its owner.
- [It speaks SSH](https://gateway.tempo-dev.workers.dev/docs/guides/ssh.md)\
  How an SSH connection reaches a cloud agent through a relay and its own Durable Object, signs in with Tempo ID, carries files and survives deploys.

## When to use cloud agents

- **Long work.** Turns that take minutes or hours keep going after you close the laptop, and come back from a crash or a deploy.
- **Work that costs money.** The agent buys what it needs, from models and searches to sandboxes and GPUs, within your budget.
- **Fan-out.** A lead agent splits the work across subagents, each with its own sandbox.
- **Your own machines.** Its commands run on your laptop or a GPU box without opening a port.
- **Nothing to operate.** No agent loop, queue, sandbox account or payment integration to build or run.

## Supported tools

- **Code Mode cells**: JavaScript in the agent's runtime that calls every other tool.
- **Shell and files**: Codex's `exec_command` and `apply_patch`, Claude's Bash, Read, Write and Edit, on the workspace or a hand.
- **Web search and page reads**, served by the gateway for both harnesses. [Services](https://gateway.tempo-dev.workers.dev/docs/services.md#web)
- **fetch**, which pays any MPP service from the key. [Services](https://gateway.tempo-dev.workers.dev/docs/services.md#fetch)
- **The gateway's tools** as `mcp__gateway__*`: memory, sandboxes, browsers and sharing. [MCP tools](https://gateway.tempo-dev.workers.dev/docs/mcp.md)
- **Subagents**: `spawn_agent`, `send_agent_message`, `wait_agent`, `list_agents`, `interrupt_agent` and `close_agent`. [Agents](https://gateway.tempo-dev.workers.dev/docs/agents.md#how)

## What you need

- A Tempo Key, from [/key](https://gateway.tempo-dev.workers.dev/key.md) or the [Codex installer](https://gateway.tempo-dev.workers.dev/docs/keys.md#codex). There is no waitlist and no account.
- `Authorization: Bearer sk-tempo-…` on every request.
- Optionally `Gateway-App`, to keep agents and data apart under one key.

## Availability

### Routes

| Route      | What it does                                                                |
| ---------- | --------------------------------------------------------------------------- |
| /v1/agents | Create agents, give them turns, stream their events, manage their subagents |
| /v1/hands  | Attach your machines to your account as hands                               |
| /mcp       | The gateway's tools, for agents and for any MCP client                      |
| /api/keys  | Request, describe, top up and revoke a Tempo Key                            |

### Payment

Payments settle on Tempo mainnet in MACH or OUSD, from the key's budget or, with no key, from any MPP client's own session. [How a key pays](https://gateway.tempo-dev.workers.dev/docs/keys.md#paying)

### Data handling

An agent belongs to its wallet and app, so every key of the wallet reaches it from curl, SSH or the web, and it pays from the key that created it; another wallet reaches it only through an agents grant, and pays for the turns it starts itself. Deleting an agent deletes its transcript and workspace, and an agent ends with its key, so revoking the key stops it. What it stores in memory stays private until you publish or share it. [Sharing](https://gateway.tempo-dev.workers.dev/docs/memory.md#sharing)

## Next steps

- [Quickstart](https://gateway.tempo-dev.workers.dev/docs/quickstart.md): your first agent with curl, in a few minutes.
- [How it works](#guides): how agents, teams, Code Mode, personas, resources, payments, the API, MCP, MPP and SSH work.
- [Agents](https://gateway.tempo-dev.workers.dev/docs/agents.md): turns, steering, subagents and every route.
- [Pricing](https://gateway.tempo-dev.workers.dev/docs/pricing.md): what each model, tool and service costs.
- [Changelog](https://gateway.tempo-dev.workers.dev/docs/changelog.md): what shipped, and what's planned.

## Support

Report a problem, ask for a feature or ask a question with `POST /v1/feedback`, or have an agent call the MCP tool `send_feedback`. Both are free and answer an `fb_…` id to quote. A report sent with `POST /v1/feedback/stake` or `stake_feedback` pays $0.01 as a deposit: if the team accepts it, usually because it led to a change, the deposit comes back with a reward in USDC.e to the paying wallet, and any other report keeps it. `GET /v1/feedback/:id` and `feedback_status` show where a report stands and the payout's transaction.

| Route                   | What it does                                                                                                                                      | Price |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| POST /v1/feedback       | Send message, kind (bug, feature, question or other) and, optionally, the tool, model, error and context; kept for the team that runs the gateway | Free  |
| POST /v1/feedback/stake | The same report with a $0.01 deposit, returned with a reward if the report is accepted                                                            | Free  |
| GET /v1/feedback/:id    | Open, accepted or closed, the resolution, the deposit and reward, and the payout; free                                                            | Free  |

## Feedback on your website

Any website can turn its visitors' comments into issues on its own gateway app, which its agent can then work on. Open the page with `?feedback`, click an element and write what should change. Until the site is set up, the widget says what is missing instead. Each report becomes the kv value `issues/<id>` in the app, and with an agent it starts a turn that names the issue, so the agent can fix it and set its `status` and `resolution`. The issue's link shows the visitor where it stands. No key ever reaches a browser.

### Without a backend

The gateway files the issues itself. Turn feedback on once in the [console's Feedback tab](https://gateway.tempo-dev.workers.dev/console.md#feedback), with `POST /v1/feedback/site`, or by asking an agent to call `feedback_site_set`: the origins whose pages may file, an optional repository, the agent to wake, and how many issues a UTC day your key pays for at the kv write price. Then add the script with your wallet and app. A page that is not set up yet links straight to that form, filled in with its app and origin.

With a repository, issues are numbered #1, #2… as the kv values `git/<repo>/issues/<n>`, the convention for a repository's issues, so the agents working on that repository find them. The console's Feedback tab lists every board in your apps, whoever filed into it, and accepts, closes or reopens each issue.

**shell**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/feedback/site -H "authorization: Bearer $TEMPO_KEY" -H "gateway-app: acme-site" \
  -H "content-type: application/json" -d '{"origins":["https://acme.com"],"repo":"acme","agent":"site","daily":50}'
```

**html**

```text
<script async src="https://gateway.tempo-dev.workers.dev/feedback.js" data-owner="0xYourWallet" data-app="acme-site"></script>
```

### With your own backend

Your server serves `Handler.feedback` from `nanocode-ts/feedback/server` at `/feedback` with the site's Tempo Key, and the script posts there. `accept`, `identify` and `admin` let the site decide which reports to take, who sent them and who reads the whole list.

**html**

```text
<script async src="https://gateway.tempo-dev.workers.dev/feedback.js"></script>
```

**worker.ts**

```sh
import { env } from "cloudflare:workers";
import { Handler } from "nanocode-ts/feedback/server";

const feedback = Handler.feedback({ agent: "site", app: "acme-site", key: env.TEMPO_KEY, repo: "acme" });

export default {
  fetch: (request: Request) =>
    new URL(request.url).pathname.startsWith("/feedback") ? feedback.fetch(request) : env.ASSETS.fetch(request),
};
```

`examples/feedback` in nanocode-ts is a Worker that runs both halves.

| Route                             | What it does                                                                               |
| --------------------------------- | ------------------------------------------------------------------------------------------ |
| GET /v1/feedback/site             | The Gateway-App's feedback site: origins, agent, daily cap, today's count; free            |
| POST /v1/feedback/site            | Set origins, agent, daily and public; the calling key pays for each issue; free            |
| DELETE /v1/feedback/site          | Stop filing; free                                                                          |
| GET /v1/feedback/sites            | Every feedback site of the key's wallet; free                                              |
| GET /v1/feedback/site/issues      | A board's issues, by default the site's (board, cursor); free                              |
| POST /v1/feedback/site/issues/:id | Set an issue's status and resolution; free                                                 |
| POST /p/:owner/:app/feedback      | Where the script files a report, from an allowed origin; the owner's key pays the kv write |
| GET /p/:owner/:app/feedback/:id   | Whether an issue is open or resolved, and when; free                                       |

[Quickstart ->](https://gateway.tempo-dev.workers.dev/docs/quickstart.md)
