# Agent programs: update, delete

URL: /code/mcp/agent/records-update · Id: `page:code/mcp/agent/records-update`

> The Agent Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

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

### Agent.update
Changes the given properties of an Agent. [Verb page](/business/nouns/agent/update?interface=mcp).

```text
do: return await $.Agent.update(input)
```

Emits `Agent.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Agent. |
| `instructions` | `text` | No | What the Agent does and how. |
| `model` | `string` | No | The model the Agent runs on. |
| `tools` | `string[]` | No | The tools the Agent may call. |
| `skills` | list of [Skill](/business/nouns/skill) | No | The Skills it loads. |
| `memory` | `string` | No | One of `tenant` (one Memory per Customer Tenant) or `startup` (one Memory for the Startup). |
| `maxSteps` | `integer` | No | The most steps one Task may take. |
| `budget` | `money` | No | The most one Task may spend; the Mandate’s Limits apply as well. |
| `handoffs` | list of [Role](/business/nouns/role) | No | The Roles it hands work to. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The 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**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Agent.update({ id: 'agent_tCzKDMorKn', skills: ['skill_xBqG4zTxBA'] })"
  }
}
```

### Agent.delete
Deletes an Agent: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/agent/delete?interface=mcp).

```text
do: return await $.Agent.delete(input)
```

Emits `Agent.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Agent. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The 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**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Agent.delete({ id: 'agent_tCzKDMorKn' })"
  }
}
```