# Create an agent
Source: https://docs.simpleserve.ai/docs/api-reference/publisher-agents/post-publisher-agents

Method: POST /v1/publisher/agents
Base URL: https://api.simpleserve.ai

```json
{
  "path": "/v1/publisher/agents",
  "method": "POST",
  "tags": [
    "Publisher Agents"
  ],
  "operationId": "createPublisherAgent",
  "summary": "Create an agent",
  "description": "Creates an agent and draft in the current Workspace.",
  "parameters": [
    {
      "$ref": "#/components/parameters/IdempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CreatePublisherAgentRequest"
        },
        "examples": {
          "default": {
            "value": {
              "name": "Weather Market Forecaster",
              "slug": "weather-market-forecaster",
              "description": "Compares weather forecasts and prediction-market prices."
            }
          }
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "The created agent.",
      "headers": {
        "location": {
          "description": "URL for the created agent.",
          "schema": {
            "type": "string",
            "format": "uri-reference"
          }
        },
        "etag": {
          "$ref": "#/components/headers/DraftEtag"
        },
        "x-request-id": {
          "$ref": "#/components/headers/RequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublisherAgent"
          },
          "examples": {
            "default": {
              "$ref": "#/components/examples/PublisherAgentExample"
            }
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/PublisherForbidden"
    },
    "409": {
      "$ref": "#/components/responses/PublisherConflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  }
}
```