# mint

URL: /business/nouns/agent/mint · Id: `verb:Agent.mint` · Call: `await $.Agent.mint({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Mint creates an Agent in a Customer’s Tenant from an Agent Product the Customer bought.

Mint creates an [Agent](/business/nouns/agent) in a [Customer](/business/nouns/customer)’s [Tenant](/business/nouns/tenant) from an Agent [Product](/business/nouns/product) the Customer bought.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `tenant` | [Tenant](/business/nouns/tenant) | Yes | The Customer’s Tenant. |
| `product` | [Product](/business/nouns/product) | Yes | The Agent Product. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The Customer’s own Agent. |

## Effects
- Emits [`Agent.minted`](/business/events/Agent.minted).
- Performed by the [People Lead](/agents/people/people-lead).
- Bounds the Agent by the Customer’s Entitlements and their Limits.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The operation is part of an Offer the caller has not accepted or paid for. | [`payment-required`](/code/api/errors/payment-required) | Accept the Offer named in the response, then retry the call. | [Offer.accept](/business/nouns/offer/accept) |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Agent.mint](/business/nouns/agent/mint) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Mint the latest agent with a tenant and a product.
```

**API**

```bash
curl -X POST https://api.sb/patentpad.com/agents/mint \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant":"tenant_1","product":"product_1"}'
```

```json
{
  "api": "https://api.sb/patentpad.com",
  "agent": {
    "$id": "https://api.sb/patentpad.com/agents/agent_1",
    "$type": "Agent",
    "instructions": "Example instructions",
    "model": "Example model",
    "status": "standby"
  },
  "action": {
    "$id": "https://api.sb/patentpad.com/actions/action_1",
    "operation": "Agent.mint",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/patentpad.com/actions/action_1"
  }
}
```

**SDK**

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

const agent = await $.Agent.mint({ tenant: 'tenant_1', product: 'product_1' })
```

**CLI**

```bash
npx startup-builder do Agent.mint --json '{"tenant":"tenant_1","product":"product_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Agent.mint({ tenant: 'tenant_1', product: 'product_1' })"
  }
}
```