<!-- tempo-docs-context -->
> Source: [/docs/wallet/recipes](https://tempo.xyz/developers/docs/wallet/recipes.md)
> Section: [Get Started](https://tempo.xyz/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, and find the SDKs and CLI.
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

<span id="tempo-wallet-cli-core-flow-recipes" />

# `tempo wallet` recipes

Use these recipes after [signing in to Tempo Wallet](https://tempo.xyz/developers/docs/cli/wallet#sign-in). For the first paid request, follow [Pay with the CLI](https://tempo.xyz/developers/docs/guide/machine-payments/agent).

<span id="tempo-wallet-agent-pattern" />

<span id="tempo-wallet-is-agent-ready-by-design" />

## Let an agent pay for services

Set up your agent with the [prompt on the CLI overview](https://tempo.xyz/developers/docs/cli#set-up-your-agent). It installs two skills in skill-enabled agents such as Claude Code, Amp, and Codex:

| Skill | Description |
| --- | --- |
| `tempo-wallet` | Readiness checks, balances, service discovery, and session and funding actions. |
| `tempo-request` | Paid HTTP requests with payment preview (`--dry-run`) and execution. |

Tempo Wallet uses mainnet for live payments. Check the network and balance before authorizing spending, and set both limits:

* **Per command:** `tempo request --max-spend` caps one command's payment spending.
* **Per account:** access-key limits apply separately to the signing key. See [Give an agent access](https://tempo.xyz/developers/docs/accounts/agents) for authorization and revocation.

Service discovery returns endpoint metadata, and `--dry-run` reads the current payment terms without paying. Neither replaces handling the service's result or errors. For the commands, see [agent and script mode](https://tempo.xyz/developers/docs/cli/wallet#agent-and-script-mode).

<span id="tempo-wallet-core-flow" />

<span id="tempo-wallet-service-discovery" />

<span id="tempo-wallet-end-to-end-script-pattern" />

## Find and pay for a service

Search with `tempo wallet services --search <QUERY>` and inspect the chosen service with `tempo wallet services <SERVICE_ID>`. Use its endpoint and schema in [`tempo request`](https://tempo.xyz/developers/docs/cli/request); preview with `--dry-run` and set `--max-spend` when paying.

<span id="tempo-wallet-request-execution" />

## Pay a captured challenge with credits

Check that the service supports MPP Credits and that the separate credits balance covers the request. Capture the challenge without paying, then preview and execute the credit payment:

```bash [Terminal]
tempo wallet -t whoami --credits
headers="$(mktemp)"
tempo request -t --dry-run -D "$headers" \
  --json '{"input":"hello"}' <SERVICE_URL>/<ENDPOINT_PATH>
tempo wallet -t transfer --credits --dry-run --mpp-challenge-file "$headers"
tempo wallet -t transfer --credits --mpp-challenge-file "$headers"
```

Replace the URL and payload with the service's request schema. Credits are separate from token balances and apply only to eligible one-time charges.

<span id="tempo-wallet-session-management" />

## Reconcile and close payment sessions

```bash [Terminal]
tempo wallet sessions list
tempo wallet sessions sync
tempo wallet sessions close --dry-run --all
tempo wallet sessions close --orphaned
tempo wallet sessions close --finalize
```

`sync` reconciles local records with onchain state. Inspect the close preview before closing sessions. `--orphaned` targets orphaned onchain channels; `--finalize` completes channels already pending close.

<span id="tempo-wallet-operations" />

<span id="tempo-wallet-agent-and-script-mode" />

<span id="tempo-wallet-failure-recovery-shortcuts" />

## Recover the wallet connection

Run `tempo wallet whoami` to inspect readiness and balances. If the access key is stale, run `tempo wallet refresh`. If you're signed out, run `tempo wallet login`.

For a request schema error, inspect `tempo wallet services <SERVICE_ID>`. For insufficient funds, [add funds](https://tempo.xyz/developers/docs/cli/wallet#add-funds). Add `-t` for machine-readable output in scripts.

<span id="related-tempo-wallet-docs" />

## Related

* [tempo wallet](https://tempo.xyz/developers/docs/cli/wallet#commands) — Every wallet command and its options
* [tempo request](https://tempo.xyz/developers/docs/cli/request#flags) — Request flags for paid HTTP calls
* [Give an agent access](https://tempo.xyz/developers/docs/accounts/agents) — Authorize and revoke an agent's access key
