# Update an agent by UID

> You're reading the Mindset v3 documentation. v3 is no longer sold; this is reference for existing customers. Mindset 4 docs are at /docs.

Mindset v3 REST API reference: Agent Management (deprecated).

**PATCH** `/api/v1/appuid/{appUid}/agents/uid/{uid}`

## Base URL

Requests go to your region's API host, for example `https://a.api.mindset.ai`. Hosts: `https://a.api.mindset.ai`, `https://b.api.mindset.ai`, `https://c.api.mindset.ai`, `https://d.api.mindset.ai`.

## Authorization

- `x-api-key` (string, required, header)

  Your API key.

## Path parameters

- `appUid` (string, required, path)

  Your application's uid

* `uid` (string, required, path)

  Unique ID of the agent

## Request body

Content type: `application/json`.

- `agentName` (string, body)

  Name of the agent

* `agentPurpose` (string, body)

  Purpose of the agent

- `formatting` (string, body)

  Output formatting instructions

* `agentPersonality` (string, body)

  Personality of the agent

- `agentPolicyRules` (string, body)

  Policy rules for the agent

* `iceBreakerMessage` (string, body)

  Invisible instruction to prompt the agent to greet users in a specific way or style

- `live` (boolean, body)

  Activate the agent and make it live for end users

  Default: `false`.

* `contextUids` (string\[], body)

  Array of existing context Uids (max 30)

- `mcpserverUids` (string\[], body)

  Array of existing MCP server Uids (max 5)

* `tags` (string\[], body)

  Array of tags (max 10)

- `access` (string, body)

  Access control mode for this agent

  One of: `openAccess`, `restrictedAccess`.

```json
{
  "agentName": "string",
  "agentPurpose": "string",
  "formatting": "string",
  "agentPersonality": "string",
  "agentPolicyRules": "string",
  "iceBreakerMessage": "string",
  "live": true,
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess"
}
```

## Responses

### 200

Successful update

```json
{
  "uid": "string",
  "agentName": "string",
  "agentPurpose": "string",
  "formatting": "string",
  "agentPersonality": "string",
  "agentPolicyRules": "string",
  "iceBreakerMessage": "string",
  "live": true,
  "createdAt": "string",
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess",
  "externalTenantId": "string"
}
```

### 404

Agent not found

### 422

Unprocessable Entity

## Example request

```bash
curl -X PATCH "https://a.api.mindset.ai/api/v1/appuid/{appUid}/agents/uid/{uid}" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"agentName":"string","agentPurpose":"string","formatting":"string","agentPersonality":"string","agentPolicyRules":"string","iceBreakerMessage":"string","live":true,"contextUids":["string"],"mcpserverUids":["string"],"tags":["string"],"access":"openAccess"}'
```
