# Update an agent (/ms/growsocmed/docs/api-reference/ai-agents/update-agent)

Change an agent

PATCH /agents/{id}

```json
{
  "tags": [
    "AI agents"
  ],
  "summary": "Update an agent",
  "parameters": [
    {
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            "instructions": {
              "type": "string",
              "maxLength": 8000,
              "default": ""
            },
            "model": {
              "type": [
                "string",
                "null"
              ],
              "maxLength": 120
            },
            "knowledge_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 100,
              "default": []
            },
            "handoff": {
              "type": "object",
              "properties": {
                "keywords": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "maxItems": 30,
                  "default": []
                },
                "upset": {
                  "type": "boolean",
                  "default": true
                },
                "unknown": {
                  "type": "boolean",
                  "default": true
                }
              },
              "default": {
                "keywords": [],
                "upset": true,
                "unknown": true
              }
            },
            "disclosure": {
              "type": "boolean",
              "default": true
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "operationId": "update-agent",
  "description": "Change an agent"
}
```