Skip to content

Agent methods: mint, pause, resume, retire

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

Reference for Agent, one group of Agent methods.

Agent.mint

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

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

Emits Agent.minted.

Inputs

InputTypeRequiredDescription
tenantTenantrequiredThe Customer’s Tenant.
productProductrequiredThe Agent Product.

Returns

OutputTypeRequiredDescription
agentAgentrequiredThe Customer’s own Agent.

Refuses when

CheckErrorFixThen call
The operation is part of an Offer the caller has not accepted or paid for.payment-requiredAccept the Offer named in the response, then retry the call.Offer.accept
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

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

Emits Agent.paused.

Inputs

InputTypeRequiredDescription
agentslist of AgentThe Agents to pause. Name one of agents, team or customerFacing.
teamTeamPause every Agent seated on this Team.
customerFacingbooleanTrue pauses every Agent seated in a Role that answers a customer Channel.
reasontextrequiredWhy the Agents stop, shown to every watcher.

Returns

OutputTypeRequiredDescription
agentslist of AgentrequiredEvery Agent it paused; each emits its own Agent.paused.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

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

Emits Agent.resumed.

Inputs

InputTypeRequiredDescription
agentAgentrequiredThe paused Agent.

Returns

OutputTypeRequiredDescription
agentAgentrequiredThe working Agent.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
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.

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

Emits Agent.retired.

Inputs

InputTypeRequiredDescription
agentAgentrequiredThe Agent to retire.
reasontextrequiredWhy it leaves.

Returns

OutputTypeRequiredDescription
agentAgentrequiredThe retired Agent.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

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