# Buyer overview

> What a buyer sets up once — a workspace, wallets, policies — and the three ways an agent can then buy. Pick your path here.

As a buyer you give software the ability to pay for things, within limits you control. The model has three parts:

| | What it is | You'll have |
|---|---|---|
| **Workspace** (`wsp_…`) | your organisation on Zanora: the unit of **budget and policy** | one, from signup |
| **Wallet** (`wal_…`) | holds money, spends it per call | **one per agent**, so budgets and history stay separate |
| **Agent** | the thing that spends: a model in an MCP client, or your code | an **ed25519 keypair**. The wallet holds the public half, and the agent holds the private half and signs each payment with it |

Two credentials, two jobs:

- The **workspace API key** (`zk.akey_…`) authenticates API calls: discovery, balances, receipts.
- The **agent's private key** (`agent-key.pem`) signs payment proofs. It's the spending authority. The platform never has a copy.

## Set up once

### Step 1: Create a workspace

Sign up at the console or with `POST /v1/signup`, and optionally set a daily budget. See [Create a workspace](https://docs.zanora.dev/buyers/signup.md).

### Step 2: Create a wallet for each agent

Generate a keypair and register the public half with a new wallet. See [Wallets and agent keys](https://docs.zanora.dev/buyers/wallets.md).

### Step 3: Fund it

Card top-up or USDC deposit. Money is credited when the payment rail confirms it. See [Funding a wallet](https://docs.zanora.dev/buyers/funding.md).

### Step 4: Set the rules

Deny, require approval, or allow-list by price, category, seller or reputation. Rules are checked on the server before any money moves. See [Spending policies](https://docs.zanora.dev/buyers/policies.md).

## Then pick how the agent buys

- [From an MCP client](https://docs.zanora.dev/buyers/mcp.md): Claude, Cursor or any MCP client. Add one config block and the model gets `zanora_discover` and `zanora_invoke`. **No code.**
- [From your own code](https://docs.zanora.dev/buyers/sdk.md): `@zanora/sdk` in TypeScript: `discover()`, then `invoke()` or `invokeMcp()`. Typed results and receipt checks.
- [One seller's tools, directly](https://docs.zanora.dev/buyers/mcp-proxy.md): Already chose a seller? Their tools show up under their own names and are paid for as they're called.

The three can be combined. They use the same wallet, the same policies and the same receipts.

## What protects you

- **Policies run on the server.** A model can't argue its way past a rule. A blocked purchase comes back as `POLICY_DENIED` or `APPROVAL_REQUIRED`, and nothing is charged.
- **Your own ceiling.** `maxPriceMinor` (SDK) or `ZANORA_MAX_PRICE_MINOR` (MCP) makes your client refuse to sign anything above that price, whatever the seller asks.
- **Refunds are automatic.** If the seller fails, you get a `failed` receipt and your money back.
- **Every purchase is signed.** The receipt is signed by Zanora and bound to the exact answer you received.
- **One wallet per agent** means a misbehaving agent can spend only what that wallet holds.
