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

Update an agent.

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

Update an agent. Supports partial updates - only include fields you want to change. For nested objects (personality, formatting, policies, memory), the entire nested object is replaced if provided.

## 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

- `personality` (object, body)

  Agent personality configuration

* `formatting` (object, body)

  Agent response formatting configuration

- `policies` (object, body)

  Agent policy configuration with 10 toggleable policies

* `additionalPolicyRules` (string, body)

  Additional free-form policy rules

- `additionalInformation` (string, body)

  Additional context information for the agent

* `iceBreakerMessage` (string, body)

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

- `memory` (object, body)

  Agent memory configuration. Note: Memory access must be enabled at the app level for these settings to take effect.

* `options` (object, body)

  SDK3 display options. Only present for apps with SDK3 enabled (labsSDKV3Beta: true).

- `live` (boolean, body)

  Agent is active and live for end users

* `showPromptLibrary` (boolean, body)

  Show prompt library in SDK UI

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

  Array of existing context UIDs (max 30)

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

  Array of existing MCP server UIDs (max 5)

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

  Array of existing plan UIDs (max 20)

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

  Array of existing skill UIDs (max 20)

- `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",
  "personality": {
    "preset": "friendly",
    "customText": "string"
  },
  "formatting": {
    "preset": "conversational",
    "customText": "string"
  },
  "policies": {
    "focusAndScope": {
      "enabled": true,
      "scope": "string"
    },
    "knowledgeLimits": {
      "enabled": true,
      "themeSpecificAllowance": "string"
    },
    "nonContextSegmentMessage": {
      "enabled": true,
      "message": "string"
    },
    "clarification": {
      "enabled": true
    },
    "recommendations": {
      "enabled": true
    },
    "neutrality": {
      "enabled": true
    },
    "professionalConduct": {
      "enabled": true
    },
    "legalFinancial": {
      "enabled": true
    },
    "safeguarding": {
      "enabled": true,
      "email": "string"
    },
    "feedback": {
      "enabled": true
    }
  },
  "additionalPolicyRules": "string",
  "additionalInformation": "string",
  "iceBreakerMessage": "string",
  "memory": {
    "allowAccess": true,
    "allowContribution": true,
    "miningGuidance": "string"
  },
  "options": {
    "showSourceContent": true,
    "sourceDisplayStyle": "compact",
    "sourceCardType": "segments",
    "showSpeakers": true,
    "showFollowUpQuestions": true,
    "showCitations": true,
    "showQuickReplies": true
  },
  "live": true,
  "showPromptLibrary": true,
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "planUids": [
    "string"
  ],
  "skillUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess"
}
```

## Responses

### 200

Successful update

```json
{
  "uid": "string",
  "agentName": "string",
  "agentPurpose": "string",
  "personality": {
    "preset": "friendly",
    "customText": "string"
  },
  "formatting": {
    "preset": "conversational",
    "customText": "string"
  },
  "policies": {
    "focusAndScope": {
      "enabled": true,
      "scope": "string"
    },
    "knowledgeLimits": {
      "enabled": true,
      "themeSpecificAllowance": "string"
    },
    "nonContextSegmentMessage": {
      "enabled": true,
      "message": "string"
    },
    "clarification": {
      "enabled": true
    },
    "recommendations": {
      "enabled": true
    },
    "neutrality": {
      "enabled": true
    },
    "professionalConduct": {
      "enabled": true
    },
    "legalFinancial": {
      "enabled": true
    },
    "safeguarding": {
      "enabled": true,
      "email": "string"
    },
    "feedback": {
      "enabled": true
    }
  },
  "additionalPolicyRules": "string",
  "additionalInformation": "string",
  "iceBreakerMessage": "string",
  "memory": {
    "allowAccess": true,
    "allowContribution": true,
    "miningGuidance": "string"
  },
  "options": {
    "showSourceContent": true,
    "sourceDisplayStyle": "compact",
    "sourceCardType": "segments",
    "showSpeakers": true,
    "showFollowUpQuestions": true,
    "showCitations": true,
    "showQuickReplies": true
  },
  "live": true,
  "showPromptLibrary": true,
  "contextUids": [
    "string"
  ],
  "mcpserverUids": [
    "string"
  ],
  "planUids": [
    "string"
  ],
  "skillUids": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "access": "openAccess",
  "externalTenantId": "string",
  "createdAt": "string"
}
```

### 400

Bad Request - Invalid input

### 401

Unauthorized

### 403

Forbidden

### 404

Agent not found

### 422

Unprocessable Entity - Validation error

## Example request

```bash
curl -X PATCH "https://a.api.mindset.ai/api/v2/appuid/{appUid}/agents/uid/{uid}" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"agentName":"string","agentPurpose":"string","personality":{"preset":"friendly","customText":"string"},"formatting":{"preset":"conversational","customText":"string"},"policies":{"focusAndScope":{"enabled":true,"scope":"string"},"knowledgeLimits":{"enabled":true,"themeSpecificAllowance":"string"},"nonContextSegmentMessage":{"enabled":true,"message":"string"},"clarification":{"enabled":true},"recommendations":{"enabled":true},"neutrality":{"enabled":true},"professionalConduct":{"enabled":true},"legalFinancial":{"enabled":true},"safeguarding":{"enabled":true,"email":"string"},"feedback":{"enabled":true}},"additionalPolicyRules":"string","additionalInformation":"string","iceBreakerMessage":"string","memory":{"allowAccess":true,"allowContribution":true,"miningGuidance":"string"},"options":{"showSourceContent":true,"sourceDisplayStyle":"compact","sourceCardType":"segments","showSpeakers":true,"showFollowUpQuestions":true,"showCitations":true,"showQuickReplies":true},"live":true,"showPromptLibrary":true,"contextUids":["string"],"mcpserverUids":["string"],"planUids":["string"],"skillUids":["string"],"tags":["string"],"access":"openAccess"}'
```
