<!--
Sitemap:
- [Newton Agent NeoBank](/index)
- [Getting Started](/getting-started)
- [Onboard an Agent](/guides/onboard-an-agent)
- [Give an Agent a Budget](/guides/agent-budget)
- [Pay for an API](/guides/pay-for-an-api)
- [Issue a Card](/guides/issue-a-card)
- [Meter Your API](/guides/meter-your-api)
- [SDK Essentials](/reference/sdk)
- [ModularVault](/reference/sdk/modular-vault)
- [PlatformClient](/reference/sdk/platform-client)
- [FacilitatorClient](/reference/sdk/facilitator-client)
- [createX402Fetch](/reference/sdk/create-x402-fetch)
- [buildPolicyParams](/reference/sdk/build-policy-params)
- [Networks & Addresses](/reference/networks)
-->

# Give an Agent a Budget

Every agent spends through a policy you set — a daily limit and a list of who it's allowed to pay. Set it once, and the agent can't go past it.

## What a budget looks like

For each token an agent can spend, you set a daily cap and an allowlist of recipients:

```json
{
  "max_daily_spend": 500000000,
  "allowed_recipients": "0xApiProvider,0xOtherVendor"
}
```

* **`max_daily_spend`** — the most the agent can spend per day, in the token's smallest units. USDC has 6 decimals, so `500000000` is 500 USDC. Use `0` for no limit.
* **`allowed_recipients`** — who the agent can pay: a comma-separated list of addresses, or `*` for anyone.

You can go further — a per-transaction cap for a specific vendor, or requiring every recipient to be on a verified list.

## How it's enforced

When an agent tries to pay, its policy is checked off-chain by Newton Protocol and confirmed before any funds move. A payment over the cap, or to someone not on the list, is declined — the agent never touches money it isn't allowed to spend. You stay in control without trusting the agent's key.

## Set it with the SDK

```typescript
import { buildPolicyParams } from "@newton-xyz/isaac";
import { toHex } from "viem";

const params = buildPolicyParams({
  "0xAgentAddress": {
    "0x8cfff8Bc9aA3d41fb9608496705CbfC83EBFc67c": {
      max_daily_spend: 500_000_000, // 500 USDC/day
      allowed_recipients: "*",
    },
  },
});

// Register it for the agent (a hex-encoded blob is what the platform expects):
const policyParams = toHex(JSON.stringify(params));
```

## Next

* **[Pay for an API](/guides/pay-for-an-api)** — put the budget to work.
