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

# Create agent

> Create a new AI voice agent

Creates a minimal agent from a persona. The prompt, voice, and other behavior
settings are configured afterward via [Patch update agent](/api-reference/agents/patch-update-agent).

### Body parameters

<ParamField body="name" type="string" required>
  Agent display name, 1–120 characters.
</ParamField>

<ParamField body="agent_persona_id" type="string" required>
  A persona ID to initialize the agent with — list available personas via [`GET /prompts/personas`](/api-reference/configuration/list-personas).
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://prod-platform-core-api.20x.business/api/v1/agents \
    -H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Sales Voice Agent",
      "agent_persona_id": "c7a840e6-..."
    }'
  ```

  ```python Python theme={null}
  requests.post(
      "https://prod-platform-core-api.20x.business/api/v1/agents",
      headers={"Authorization": f"Bearer {API_KEY}"},
      json={
          "name": "Sales Voice Agent",
          "agent_persona_id": "c7a840e6-...",
      },
  )
  ```

  ```javascript Node theme={null}
  await fetch("https://prod-platform-core-api.20x.business/api/v1/agents", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Sales Voice Agent",
      agent_persona_id: "c7a840e6-...",
    }),
  });
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Support Agent",
  "is_active": true
}
```

<Callout type="info">
  The response's `id` is the agent's **channel** id, used for most endpoints
  (calls, campaigns, patching). Some endpoints — like generating a prompt — use
  the agent's underlying brain id instead, returned as `agent_id` or
  `brain.id` on this same response.
</Callout>
