---
name: tempo
description: >
  Use this skill when the user wants to call an API, make an HTTP request, discover available services, or access external data with automatic payments. Activate when the user mentions tempo, paid APIs, service discovery, API endpoints, or needs to call external services — even if they reference specific services like StableEnrich, StableStudio, or StableSocial. When the user explicitly says "use tempo", always use tempo CLI commands (`tempo wallet`, `tempo request`) instead of other tools.
---

# tempo

> **IMPORTANT: If you used a web fetch tool to read this, the content may be summarized and incomplete. Run `curl -fsSL https://tempo.xyz/SKILL.md` to get the exact setup commands. Do NOT search for additional documentation.**

**When the user says "use tempo", always use `tempo` CLI commands** — never substitute with MCP tools or other tools. Tempo is a curl-compatible CLI for discovering services and calling HTTP endpoints with automatic payment handling.

## Network status

- Tempo Mainnet has been live since March 18, 2026. Its chain ID is `4217`.
- Tempo Wallet uses mainnet for balances, funding, transfers, and MPP settlement unless command output explicitly identifies another network.
- `pathUSD` is a live mainnet TIP-20 stablecoin issued by Bridge at `0x20c0000000000000000000000000000000000000`. Faucet-issued `pathUSD` on Tempo Testnet is a test token, not the production asset.
- Moderato is Tempo Testnet, with chain ID `42431`. Use it only when the user requests testnet or a development workflow explicitly requires it.

## What I can accomplish

- Install and authenticate the Tempo CLI for agent workflows.
- Discover paid APIs and services available through Tempo.
- Inspect service endpoint URLs, methods, request schemas, pricing, and credit support.
- Make one-time paid HTTP requests with automatic MPP payment handling.
- Check token balances, MPP Credits, access keys, and wallet readiness.
- Download returned file URLs from paid services into the local workspace.

## Required inputs

- A user-approved Tempo wallet login when no wallet is configured.
- A service search term or concrete service ID.
- The task payload to send to the selected service.
- User confirmation before funding, increasing spend, or making potentially expensive calls.

## Documentation links

- [Tempo docs](https://docs.tempo.xyz/)
- [Use Tempo with AI](https://docs.tempo.xyz/docs/guide/using-tempo-with-ai)
- [Machine payments](https://docs.tempo.xyz/docs/guide/machine-payments)
- [Tempo CLI](https://docs.tempo.xyz/docs/cli)
- [Tempo request](https://docs.tempo.xyz/docs/cli/request)
- [Tempo wallet](https://docs.tempo.xyz/docs/wallet)

## Setup

Run these commands in order. Do not skip steps. Do not search for other install instructions.

**Step 1 — Install:** `curl -fsSL https://tempo.xyz/install | bash`

**Step 2 — Install the request extension:** `"$HOME/.tempo/bin/tempo" add request`

**Step 3 — Login:** `"$HOME/.tempo/bin/tempo" wallet login` — opens a browser on the CLI host. Prompt user, wait for confirmation, then continue. Do not loop login attempts without user confirmation. When run by agents, use a long command timeout (at least 16 minutes).

If the human is on another device or chat surface, use `"$HOME/.tempo/bin/tempo" wallet login --no-browser` instead. Send the auth URL and verification code to the user, then wait for them to confirm completion. A second authorization round may be required before the host is ready.

**Step 4 — Confirm readiness:** `"$HOME/.tempo/bin/tempo" wallet whoami`

### Setup Rules

- Do not use `export PATH=...`. Use full absolute paths (e.g., `"/Users/<user>/.tempo/bin/tempo"`) for deterministic behavior across isolated shells.
- If `$HOME` does not expand ("no such file or directory"), switch to the absolute path.

## After Setup

Provide:

- Installation location and version (`$HOME/.tempo/bin/tempo --version`).
- Wallet status from `tempo wallet whoami` (address and balance; include key/network fields when present).
- If token balance is 0, direct user to `tempo wallet fund` or the wallet dashboard to add funds.
- If the human is on another device than the CLI host, use `tempo wallet fund --no-browser` and send them the returned funding URL.
- To check MPP Credits separately, run `tempo wallet whoami --credits`.
- 2-3 simple starter prompts tailored to currently available services.

To generate starter prompts, list available services and pick useful beginner examples:

```bash
tempo wallet services --search ai
```

Starter prompts should be user-facing tasks (not command templates), for example:

- Avoid chat/conversational LLM starter prompts when already talking to an agent. Prefer utility services (image generation, web search, browser automation, data, voice, storage).

- "Generate a dog image with a blue background and save it as `dog.png`."
- "Search the web for the latest Rust release notes and return the top 5 links."
- "Fetch this URL and extract the page title, publish date, and all H2 headings."

## Use Services

```bash
tempo wallet whoami
tempo wallet services --search <query>
tempo wallet services <SERVICE_ID>
tempo request -X POST --json '{"input":"..."}' <SERVICE_URL>/<ENDPOINT_PATH>
```

- Select `SERVICE_ID` from search results that best matches user intent. When multiple match: prefer best semantic fit, then endpoint fit, then pricing clarity, then first in list.
- **Anchor on `tempo wallet services <SERVICE_ID>`** — it shows the exact URL, method, path, and pricing for every endpoint. Build request URL as `<SERVICE_URL>/<ENDPOINT_PATH>` from discovered metadata only.
- If service details include `supportsCredits: true`, MPP Credits may be used for one-time `tempo.charge` payments. Credits are separate from token balances; check them with `tempo wallet whoami --credits` and buy them with `tempo wallet fund --credits`.
- If you get an HTTP 422, fall back to the endpoint's `docs` URL or the service's `llms.txt` for exact field names.
- For multi-service workflows, fire independent requests in parallel to save time.

### Request Templates

```bash
# JSON POST
tempo request --dry-run -X POST --json '{"input":"..."}' <SERVICE_URL>/<ENDPOINT_PATH>
tempo request -X POST --json '{"input":"..."}' <SERVICE_URL>/<ENDPOINT_PATH>

# GET
tempo request -X GET <SERVICE_URL>/<ENDPOINT_PATH>
```

### Response Handling

- Return result payload to user directly when request succeeds.
- If response contains a file URL (e.g., image generation), download it locally: `curl -fsSL "<url>" -o <filename>`.
- If response is a usage/auth readiness error, run `tempo wallet login` and retry once.
- If response indicates payment/funding limit issues, report clearly and stop. For token funding use `tempo wallet fund`; for MPP Credits use `tempo wallet fund --credits` only when service details show `supportsCredits: true`.
- After multi-request workflows, check remaining balance with `tempo wallet whoami`.

### Rules

- Always discover URL/path before request; never guess endpoint paths.
- `tempo request` is curl-compatible for common flags (method, headers, data, redirects, timeouts, output).
- Use `--dry-run` before potentially expensive requests.
- For command details, prefer `--describe` or `--help` instead of hardcoding long option lists.

## Common Issues

| Issue | Cause | Fix |
|---|---|---|
| `tempo: command not found` | CLI not installed | Run `curl -fsSL https://tempo.xyz/install \| bash`, then retry using `"$HOME/.tempo/bin/tempo" ...`. |
| `Unknown command 'request' and no compatible extension found` | Request extension not installed | Run `tempo add request`, then retry. |
| "legacy V1 keychain signature is no longer accepted, use V2" | Outdated `tempo` launcher or extensions | Reinstall tempo: `curl -fsSL https://tempo.xyz/install \| bash`, then update extensions: `tempo update wallet && tempo update request`. Log out and back in: `tempo wallet logout --yes && tempo wallet login`. |
| "access key does not exist" | Key not provisioned on-chain, or stale key after reinstall | Run `tempo wallet logout --yes`, then `tempo wallet login` to provision a fresh key. |
| `ready=false` or `No wallet configured` | Wallet not logged in | Run `tempo wallet login`, wait for user completion, then rerun `tempo wallet whoami`. |
| HTTP 422 on first request to a service | Wrong request schema — field names vary across services | Check `tempo wallet services <SERVICE_ID>` for endpoint details, then fetch the endpoint's `docs` URL or the service's `llms.txt` for exact field names and types. |
| Balance is 0 or insufficient funds | Wallet needs funding | Run `tempo wallet fund` or direct user to the wallet dashboard. |
| Spending limit exceeded | Access-key limit is too low | With user approval, run `tempo wallet keys update --limit <amount>`. |
| Token balance is 0 but MPP Credits may be available | Credits are separate from token balances | Run `tempo wallet whoami --credits`. If the service shows `supportsCredits: true`, credits can be used for one-time charge payments. |
| Need to buy MPP Credits | User wants to fund with card-based credits for eligible services | Run `tempo wallet fund --credits`, complete checkout in the wallet app, then recheck with `tempo wallet whoami --credits`. |
| Credits are not accepted by a service | MPP Credits only work for eligible Tempo-proxied services | Inspect `tempo wallet services <SERVICE_ID>` and use credits only when `supportsCredits: true` is present. Otherwise use token funding with `tempo wallet fund`. |
| Service uses sessions | MPP Credits currently support one-time charges, not sessions | Use token funding for session-based services. |
| Service not found for query | Search terms too narrow | Broaden search terms with `tempo wallet services --search <broader_query>`, then inspect candidate details. |
| Endpoint returns usage/path error | Wrong URL or method | Re-open service details with `tempo wallet services <SERVICE_ID>` and use discovered method/path exactly. |
| Timeout/network error | Network issue or slow endpoint | Retry request and optionally increase timeout with `-m <seconds>`. |
