# Approve what agents spend

URL: /agents/approve-what-agents-spend · Id: `guide:approve-what-agents-spend`

> Set the line above which any agent spend waits for you, then answer each request in your startups.studio inbox, Slack or Microsoft Teams.

Set a [Limit](/business/nouns/limit) on what agents spend. Anything above it becomes an [Approval](/business/nouns/approval) that waits for your yes, wherever you [answer approvals](/agents/answer-an-approval).

Needs: [Agent](/business/nouns/agent)

**Before it runs**

- You leave the chat: Never: it all happens in the chat.
- First question at Idea: “What amount needs your yes: $100, or every dollar?”

## What you get
- 1 $500 a month spending limit on every agent (Limit)
- 1 request to you for each spend above it, with the reason, in your startups.studio inbox and in Slack or Microsoft Teams (Approval)
- 1 business cardholder, so agents never hold your own card (Card)
- 1 single-use card for each approved payment, capped at its amount (Card)
- 1 short wait before each payment goes out, so you can still stop it (Action)
- 1 line in your books for every payment (Entry)

## Your agent does
**For agents**

- Guide: `guide:approve-what-agents-spend`, status `live`. Page: [/agents/approve-what-agents-spend.md](/agents/approve-what-agents-spend.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Needs first: [Agent](/business/nouns/agent).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Limit.create`](/business/nouns/limit/create) (`verb:Limit.create`) | `amount` money: example `{"amount":500,"currency":"USD"}`; `period` string: example `"month"` | `limit` Limit |
| 2 | [`Approval.approve`](/business/nouns/approval/approve) (`verb:Approval.approve`) | `approval` Approval (an id), required: example `"approval_1"`; `note` text: example `"Yes: the annual renewal for the listing site."` | `approval` Approval |

Returns: the last call answers with `approval` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "approval": {
    "$id": "https://api.sb/leaseline.app/approvals/approval_1",
    "$type": "Approval"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Approval.approve",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Raise it to $1,000 for ad spend only”, or “Refuse the $740 request and tell the agent why”.

Calls: `Limit.create` → `Approval.approve`

Ask:

```text
Ask me before any agent spends more than $500 a month.
Nothing over $500 goes out without my yes.
Show me what the agents want to spend, and let me approve it.
```

API:

```bash
# 1. Limit.create
curl -X POST https://api.sb/leaseline.app/limits \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":{"amount":500,"currency":"USD"},"period":"month"}'

# 2. Approval.approve
curl -X POST https://api.sb/leaseline.app/approvals/approval_1/approve \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note":"Yes: the annual renewal for the listing site."}'
```

SDK:

```ts
import { $ } from 'startup-builder'

await $.Limit.create({ amount: { amount: 500, currency: 'USD' }, period: 'month' })
await $.Approval.approve({ approval: 'approval_1', note: 'Yes: the annual renewal for the listing site.' })
```

CLI:

```bash
npx startup-builder do Limit.create --json '{"amount":{"amount":500,"currency":"USD"},"period":"month"}'
npx startup-builder do Approval.approve --json '{"approval":"approval_1","note":"Yes: the annual renewal for the listing site."}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "await $.Limit.create({ amount: { amount: 500, currency: 'USD' }, period: 'month' })\nreturn await $.Approval.approve({ approval: 'approval_1', note: 'Yes: the annual renewal for the listing site.' })"
  }
}
```

## Change it
- Raise it to $1,000 for ad spend only.
- Refuse the $740 request and tell the agent why.
- Stop all agent spending until I say so.

## Under the hood
- Systems: [Spend management](/systems/spend), [Treasury](/systems/treasury), [Ledger](/systems/ledger)
- Nouns: [Limit](/business/nouns/limit), [Approval](/business/nouns/approval), [Mandate](/business/nouns/mandate), [Card](/business/nouns/card), [Entry](/business/nouns/entry)
- Events: `Limit.created`, [`Approval.approved`](/business/events/Approval.approved)
- Stripe objects: `Issuing Cardholder`, `Issuing Card`