---
title: "Comms · Tempo AI Platform docs"
description: "Email and phone numbers for agents: a mailbox per cloud agent at nanocode.xyz, mailboxes and US or Canadian numbers to claim, and replies that wake the agent."
url: "https://gateway.tempo-dev.workers.dev/docs/comms"
---

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

# Mail and texts that wake the agent

> **Planned.** Email and phone numbers aren't launched yet: this page previews them and may change. See the [changelog](https://gateway.tempo-dev.workers.dev/docs/changelog.md#planned).

Give an agent an address and a number people can write to. Every cloud agent has a mailbox at nanocode.xyz, your apps claim their own, numbers take texts, and a reply from someone the agent wrote to wakes it up.

[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)

- **An address per agent.** Every cloud agent has its own mailbox, its id at nanocode.xyz, from the moment it starts, and its email tools default to it.
- **Mailboxes for your apps.** Claim name\@nanocode.xyz for $0.01, send from it and read what it receives, over the API or as MCP tools.
- **Phone numbers.** Lease a US or Canadian number for 30 days. It keeps the texts it receives and answers the numbers that texted it.
- **Replies wake the agent.** Mail or a text from someone the agent wrote to starts or steers its turn. A stranger's message waits in the inbox, so no one else can spend your key.
- **Threads and attachments.** reply answers an email in its thread, and attachments go out and come back as base64, 8 MiB a message.
- **Transactional, with limits.** $0.001 per email recipient and $0.03 a text, and a wallet sends to at most 100 email recipients and 100 texts a day.

## Use it

Use mail and phone numbers like any platform, with one API key for every route, or straight over MPP with a wallet and no account. Both pay the same prices.

### From your cloud agent

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

> Lease a phone number linked to yourself and tell me what it is. When I text it, answer with the benchmark table, and email the same table to you\@example.com from your own mailbox.

**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":"Lease a phone number linked to yourself and tell me what it is. When I text it, answer with the benchmark table, and email the same table to you@example.com from your own mailbox."}'
```

### With your Tempo Key

Claim a mailbox or lease a number with your Tempo Key, then send from it and read what arrives. Both belong to the key's wallet and Gateway-App. Every cloud agent of the key has its own mailbox, and a number linked to an agent wakes it.

**Claim a mailbox**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/email/create \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"name":"codecs-bot"}'
```

**Send email**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/email/send \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"mailbox":"codecs-bot","to":"you@example.com","subject":"Codec results","text":"lzma wins: 10.5x smaller"}'
```

**Read mail**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/email/list \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"mailbox":"codecs-bot","unread":true}'

curl https://gateway.tempo-dev.workers.dev/v1/email/read \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"id":"<id>"}'
```

**Lease a number**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/phone/create \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"country":"US","areaCode":"415","agent":"bench"}'
```

**Text back**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/phone/list \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"number":"+14155550123"}'

curl https://gateway.tempo-dev.workers.dev/v1/phone/send \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"number":"+14155550123","to":"+14155550199","body":"lzma wins: 10.5x smaller"}'
```

**An agent's address**

```sh
curl https://gateway.tempo-dev.workers.dev/v1/agents/$AGENT \
  -H "authorization: Bearer $TEMPO_KEY" \
  -H gateway-app:default | jq -r .email
```

### Over MPP, no account

Every email and phone route answers 402 like the rest of the platform, priced per recipient for an email and per text for a text. The wallet that paid owns the mailboxes and numbers it gets, and another wallet's calls on them answer not_found. Linking a number to an agent needs a Tempo Key.

**tempo request**

```sh
tempo request --mach -X POST \
  -H gateway-app:default \
  --json '{"name":"codecs-bot"}' \
  https://gateway.tempo-dev.workers.dev/v1/email/create

tempo request --mach -X POST \
  -H gateway-app:default \
  --json '{"mailbox":"codecs-bot","to":"you@example.com","subject":"Codec results","text":"lzma wins"}' \
  https://gateway.tempo-dev.workers.dev/v1/email/send
```

**A number**

```sh
tempo request --mach -X POST \
  -H gateway-app:default \
  --json '{"country":"US"}' \
  https://gateway.tempo-dev.workers.dev/v1/phone/create
```

**The 402**

```sh
curl -i https://gateway.tempo-dev.workers.dev/v1/email/send \
  -H gateway-app:default \
  -H content-type:application/json \
  -d '{"mailbox":"codecs-bot","to":["a@example.com","b@example.com"],"subject":"Hi","text":"Hello"}'
```

### As MCP tools

Every email and phone route is an MCP tool. Inside a cloud agent the email tools use its own mailbox, and the phone tools its newest number, unless told another.

`email_create`, `email_send`, `email_list`, `email_read`, `email_mailboxes`, `phone_create`, `phone_send`, `phone_list`, `phone_numbers`, `phone_release`

**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
```

## Email

Mail runs on Cloudflare Email Service. `email/create` claims a mailbox, `name@nanocode.xyz`, for `ttl` seconds, or renews one of yours. Names are 3 to 64 lowercase letters, digits or hyphens, role names such as postmaster and abuse are reserved, and one someone else holds answers 409. Every agent also has a mailbox named by its id, which lives as long as the agent; its email tools use it unless told otherwise.

- **Sending**\
  From one of your mailboxes to up to 10 recipients across `to`, `cc` and `bcc`, 8 MiB in all. `reply` with a message id threads the answer, and `to` and the subject then default to its sender and Re: its subject. A wallet sends to at most 100 recipients a day, and mail is transactional only: never bulk or unsolicited.
- **Receiving**\
  Mail to a mailbox lands in its inbox, up to 1,000 messages of 10 MiB each, and is kept 30 days.
- **Waking an agent**\
  Mail to an agent's mailbox starts or steers a turn only when it is authenticated and comes from an address the mailbox has written to. Anything else just lands in the inbox.
- **Scope**\
  Mailboxes and their mail belong to the wallet and app that claimed them; another's answer not_found.

| Route                    | What it does                                                                                                                        | Price                  |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| POST /v1/email/create    | Claim a mailbox (name, ttl up to 90 days, the default), or renew one of yours                                                       | $0.01                  |
| POST /v1/email/mailboxes | Your mailboxes in this app, your agents' included                                                                                   | $0.0005                |
| POST /v1/email/send      | Send from a mailbox to up to 10 recipients: to, cc, bcc, subject, text or html, attachments as base64 and reply to thread an answer | $0.001 (per recipient) |
| POST /v1/email/list      | A mailbox's inbox or sent folder, newest first (unread, limit up to 50, cursor)                                                     | $0.0005                |
| POST /v1/email/read      | Read a message and mark it read, or one of its attachments as base64                                                                | $0.0005                |
| POST /v1/email/delete    | Delete a message                                                                                                                    | $0.0001                |
| POST /v1/email/close     | Close a mailbox, deleting its mail and freeing its name; an agent's own answers 409                                                 | $0.0001                |

## Phone

`phone/create` leases a US or Canadian number from AgentPhone, through Orthogonal's MPP front, for 30 days, near `areaCode` when one is free. It receives texts at once. Pass `agent`, the id or persona of an agent of your key in this app, to link the number to it.

- **Paying for it**\
  A number costs $3.50, Orthogonal's price. A Tempo Key pays Orthogonal from its own wallet in USDC.e, or swaps OUSD or pathUSD for it on the stablecoin DEX, and is charged nothing more; MACH cannot pay it. A key whose wallet or limits cannot cover the number answers 402 before anything is charged. An MPP session is charged the price and the gateway pays.
- **Texts**\
  A number keeps up to 1,000 texts for 30 days, and `phone/list` pages them newest first, or only those to and from one number with `with`.
- **Sending**\
  A number only answers: `phone/send` texts a number that texted it in the last 30 days, and anything else answers 403. A text costs $0.03, Orthogonal's price: a key pays it from its own wallet when it can, and otherwise the gateway pays it and charges the key. A wallet sends at most 100 texts a day.
- **Waking an agent**\
  A text to a number linked to an agent starts or steers a turn only when the number has texted that sender before, and at most 20 times an hour. To reach the agent by text, text its number, have it answer once, and text again.
- **In an agent**\
  An agent's `phone_create` links the number to itself unless `agent` names another agent of its key, and its `phone_send` and `phone_list` default to its newest number.
- **Ending**\
  A number is released after 30 days and is not renewed. `phone/release` releases it at once and deletes its texts, and deleting an agent keeps its numbers, unlinked.
- **Delivery**\
  US carriers filter texts from 10-digit numbers without a registered campaign, so a text may not arrive. `create` answers `outboundSms`, which says whether the number can send yet.

| Route                  | What it does                                                                                               | Price                                           |
| ---------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| POST /v1/phone/create  | Lease a US or Canadian number for 30 days: country, areaCode and agent, an agent of your key to link it to | $3.5 (paid to Orthogonal; a key pays it itself) |
| POST /v1/phone/numbers | Your numbers in this app                                                                                   | $0.0005                                         |
| POST /v1/phone/list    | A number's texts, newest first (with one counterpart, limit up to 50, cursor)                              | $0.0005                                         |
| POST /v1/phone/send    | Text body (up to 1,600 characters) from number to to, a number that texted it in the last 30 days          | $0.03 (per text, paid to Orthogonal)            |
| POST /v1/phone/release | Release a number now and delete its texts                                                                  | $0.0001                                         |

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