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

# Create AI agent

> Create a custom AI agent that can be referenced by /assess.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agents
openapi: 3.0.0
info:
  description: API for CraftCX conversation scoring and analysis
  title: CraftCX API
  version: 1.0.0
servers:
  - url: https://api.craftcx.com
security: []
paths:
  /v1/agents:
    post:
      tags:
        - Agents
      summary: Create AI agent
      description: Create a custom AI agent that can be referenced by /assess.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                  minLength: 1
                  description: >-
                    Your stable external ID from the source system for this AI
                    agent.
                  example: agent_123
                name:
                  type: string
                  minLength: 1
                  description: Display name for the AI agent.
                  example: My OpenClaw Agent
                type:
                  type: string
                  enum:
                    - custom
                  description: Agent type. Only custom agents are supported for now.
                  example: custom
              required:
                - external_id
                - name
                - type
      responses:
        '201':
          description: Created AI agent
          content:
            application/json:
              schema:
                type: object
                properties:
                  created_at:
                    type: number
                    description: Created at as epoch timestamp (ms).
                    example: 1756692778077
                  external_id:
                    type: string
                    description: >-
                      Your stable external ID from the source system for this AI
                      agent.
                    example: agent_123
                  id:
                    type: string
                    description: CraftCX AI Agent ID.
                    example: pfh0haxfpzowht3oi213cqos
                  name:
                    type: string
                    description: Display name for the AI agent.
                    example: My OpenClaw Agent
                  type:
                    type: string
                    enum:
                      - custom
                    description: Agent type.
                    example: custom
                required:
                  - created_at
                  - external_id
                  - id
                  - name
                  - type
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 400
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 401
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 409
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: >-
                      A human-readable explanation specific to this occurrence
                      of the problem.
                  status:
                    type: number
                    enum:
                      - 500
                    description: >-
                      The HTTP status code generated by the origin server for
                      this occurrence of the problem.
                  title:
                    type: string
                    description: A short, human-readable summary of the problem type.
                  type:
                    type: string
                    format: uri
                    default: about:blank
                required:
                  - status
                  - title

````