# Create an agent (/id/growsocmed/docs/api-reference/ai-agents/create-agent)

POST /agents

```json
{
  "tags": [
    "AI agents"
  ],
  "summary": "Create an agent",
  "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
            }
          },
          "required": [
            "name"
          ]
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Created",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "operationId": "create-agent"
}
```