# Agent methods: mint, pause, resume, retire

URL: /code/sdk/agent/verbs · Id: `page:code/sdk/agent/verbs`

> The Agent Verbs mint, pause, resume, retire as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Agent](/business/nouns/agent), one group of [Agent methods](/code/sdk/agent).

### Agent.mint
Mint creates an Agent in a Customer’s Tenant from an Agent Product the Customer bought. [Verb page](/business/nouns/agent/mint?interface=sdk).

```ts
interface AgentVerbs {
  mint(input: AgentMintInput, options?: SB.CallOptions): SB.Call<Agent>
}
```

Emits [`Agent.minted`](/business/events/Agent.minted).

**Inputs**

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

**Returns**

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

**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. | None. |

**Example**

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

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

### Agent.pause
Pause stops one Agent, every Agent on a Team, or every customer-facing Agent from starting new Actions in a Startup. [Verb page](/business/nouns/agent/pause?interface=sdk).

```ts
interface AgentVerbs {
  pause(input: AgentPauseInput, options?: SB.CallOptions): SB.Call<Agent[]>
}
```

Emits [`Agent.paused`](/business/events/Agent.paused).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `agents` | list of [Agent](/business/nouns/agent) | No | The Agents to pause. Name one of `agents`, `team` or `customerFacing`. |
| `team` | [Team](/business/nouns/team) | No | Pause every Agent seated on this Team. |
| `customerFacing` | `boolean` | No | True pauses every Agent seated in a Role that answers a customer Channel. |
| `reason` | `text` | Yes | Why the Agents stop, shown to every watcher. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agents` | list of [Agent](/business/nouns/agent) | Yes | Every Agent it paused; each emits its own `Agent.paused`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| 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. | None. |

**Example**

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

const agents = await $.Agent.pause({ agents: ['agent_tCzKDMorKn'], reason: 'Example reason' })
```

### Agent.resume
Resume restarts a paused Agent in every seat it holds, with its Memory, Mandates and Limits unchanged. [Verb page](/business/nouns/agent/resume?interface=sdk).

```ts
interface AgentVerbs {
  resume(input: AgentResumeInput, options?: SB.CallOptions): SB.Call<Agent>
}
```

Emits [`Agent.resumed`](/business/events/Agent.resumed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The paused Agent. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The working Agent. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| 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. | None. |

**Example**

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

const agent = await $.Agent.resume({ agent: 'agent_tCzKDMorKn' })
```

### Agent.retire
Retire removes an Agent from every seat in a Startup for good and keeps its Actions, Memory and Mailbox history on the record. [Verb page](/business/nouns/agent/retire?interface=sdk).

```ts
interface AgentVerbs {
  retire(input: AgentRetireInput, options?: SB.CallOptions): SB.Call<Agent>
}
```

Emits [`Agent.retired`](/business/events/Agent.retired).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The Agent to retire. |
| `reason` | `text` | Yes | Why it leaves. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The retired Agent. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| 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. | None. |

**Example**

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

const agent = await $.Agent.retire({ agent: 'agent_tCzKDMorKn', reason: 'Example reason' })
```