> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weya.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Agent

> Create a new AI voice agent.

## Overview

Create a new AI agent that can be used for voice calls, campaigns, or inbound phone numbers.

## Prerequisites

* API Key or Bearer Token
* Organization access
* At least one supported LLM configured

## Request

<ParamField header="Authorization" type="string">
  Bearer token for authentication.
</ParamField>

<ParamField body="agentName" type="string" required>
  Unique name of the agent.
</ParamField>

<ParamField body="prompt" type="string" required>
  System prompt used by the agent.
</ParamField>

<ParamField body="voiceId" type="string">
  Voice to use.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl ...
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json theme={null}
  {
    "status": true,
    "message": "Agent created successfully",
    "data": {
      "_id": "...",
      "agentName": "Sales Agent"
    }
  }
  ```
</ResponseExample>

## Errors

* 400 Bad Request
* 401 Unauthorized
* 500 Internal Server Error

<Check>
  Use **GET /api/agents/{id}** to verify the agent was created.
</Check>
