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

# Create AI Assistant

> Creates a new AI assistant with the specified configuration. The variant determines the assistant's behavior and the required variantConfigs structure.




## OpenAPI

````yaml https://api.voice-agents.miraiminds.co/swagger.yaml post /v1/admin/assistant/create
openapi: 3.0.3
info:
  title: Voice Agent by Mirai Minds
  version: 1.1.0
  contact:
    name: API Architecture Team
    url: https://miraiminds.co
  license:
    name: Mirai Minds Proprietary License
    url: >-
      https://github.com/MiraiMinds/voice-agent-integration-specs/blob/main/LICENSE.md
servers:
  - url: https://api.voice-agents.miraiminds.co
    description: Production Server
  - url: https://api.stage.voice-agent.miraiminds.co
    description: Staging Server
  - url: http://localhost:3000
    description: Local Server
security:
  - PublicKeyAuth: []
    PrivateKeyAuth: []
paths:
  /v1/admin/assistant/create:
    post:
      tags:
        - Assistant
      summary: Create AI Assistant
      description: >
        Creates a new AI assistant with the specified configuration. The variant
        determines the assistant's behavior and the required variantConfigs
        structure.
      operationId: adminCreateAssistant
      parameters:
        - $ref: '#/components/parameters/PublicKeyHeader'
        - $ref: '#/components/parameters/PrivateKeyHeader'
        - $ref: '#/components/parameters/WorkspaceHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAssistantRequest'
            example:
              name: My Abandoned Cart Assistant
              variant:
                type: abandoned_cart
              agent:
                identity:
                  name: neha
                  gender: female
                  voice: neha
                systemPrompt: ''
              icpContext:
                targetAgeGroups:
                  - millennials
                locationTiers:
                  - metro_urban
                language: english
                targetAudience:
                  - female
              callSettings:
                slots:
                  - startTime: '10:00'
                    endTime: '17:30'
                maxCallDuration: 200
                concurrentCallCount: 5
                retryProtocol:
                  maxAttemptsNoPickup: 2
                  maxAttemptsLowEngagement: 1
                  reAttemptPeriod: 300
                  maxRescheduleCount: 1
              analysisPlan:
                successCriteriaPlan: >-
                  Call is successful if customer commits to completing the
                  purchase or schedules a callback
                summaryPlan: >-
                  Provide a concise summary of the conversation, customer
                  objections, and the outcome
              knowledgeBase:
                documents:
                  - url: https://example.com/product-catalog.pdf
                    title: Product Catalog
                    type: pdf
                faq:
                  - question: What is your return policy?
                    answer: We offer a 7-day return policy for unused items.
      responses:
        '200':
          description: Assistant Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Assistant created successfully
                  data:
                    type: object
                    properties:
                      assistantId:
                        type: string
        '400':
          description: Validation Error
        '409':
          description: Assistant with this name already exists
components:
  parameters:
    PublicKeyHeader:
      name: x-public-key
      in: header
      required: true
      schema:
        type: string
    PrivateKeyHeader:
      name: x-private-key
      in: header
      required: true
      schema:
        type: string
    WorkspaceHeader:
      name: workspace
      in: header
      required: true
      schema:
        type: string
  schemas:
    AdminAssistantRequest:
      type: object
      required:
        - name
        - variant
        - agent
      properties:
        name:
          type: string
          maxLength: 40
        variant:
          type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - abandoned_cart
                - custom
            config:
              $ref: '#/components/schemas/VariantConfigs'
        agent:
          type: object
          required:
            - identity
          properties:
            identity:
              $ref: '#/components/schemas/AgentIdentity'
            systemPrompt:
              type: string
        analysisPlan:
          $ref: '#/components/schemas/AnalysisPlan'
        icpContext:
          $ref: '#/components/schemas/ICPContext'
        callSettings:
          $ref: '#/components/schemas/CallSettings'
        knowledgeBase:
          $ref: '#/components/schemas/AdminKnowledgeBase'
    VariantConfigs:
      type: object
      description: >
        Variant-specific configuration. For `custom` variant, `systemPrompt` is
        required. For `abandoned_cart`, `systemPrompt` is optional (overrides
        the generated one). `variables` defines the fields expected in the call
        payload.
      properties:
        systemPrompt:
          type: string
          description: >-
            Custom system prompt. Required for custom variant; overrides the
            generated prompt for abandoned_cart.
          example: ''
        variables:
          type: array
          description: Variables expected in the call payload for this assistant.
          items:
            $ref: '#/components/schemas/AdditionalField'
    AgentIdentity:
      type: object
      properties:
        name:
          type: string
        gender:
          type: string
          enum:
            - male
            - female
        voice:
          type: string
    AnalysisPlan:
      type: object
      properties:
        successCriteriaPlan:
          type: string
        summaryPlan:
          type: string
        callInsightPlan:
          $ref: '#/components/schemas/CallInsightPlan'
    ICPContext:
      type: object
      properties:
        targetAgeGroups:
          type: array
          items:
            type: string
            enum:
              - gen_z
              - millennials
              - gen_x
              - boomers
          description: Affects slang usage. Gen Z = 'Vibe'; Boomers = 'Quality'.
        locationTiers:
          type: array
          items:
            type: string
            enum:
              - metro_urban
              - tier1
              - tier2
              - tier3
              - rural
          description: Affects language complexity and speed.
        language:
          type: string
          enum:
            - hinglish
            - english
            - hindi
            - telugu
            - tamil
            - kannada
            - malayalam
            - gujarati
            - punjabi
            - odia
            - marathi
          description: Affects language complexity and speed.
        targetAudience:
          type: array
          items:
            type: string
            enum:
              - male
              - female
              - children
          description: Affects language complexity and speed.
    CallSettings:
      type: object
      required:
        - slots
        - retryProtocol
      properties:
        slots:
          type: array
          description: Array of time slots for call execution
          minItems: 1
          items:
            type: object
            properties:
              startTime:
                type: string
                example: '10:00'
              endTime:
                type: string
                example: '13:00'
        maxCallDuration:
          type: number
          example: 200
        concurrentCallCount:
          type: number
          maximum: 10
          example: 5
        retryProtocol:
          $ref: '#/components/schemas/RetryProtocol'
    AdminKnowledgeBase:
      type: object
      description: Combined knowledge base containing both documents and FAQ entries.
      properties:
        documents:
          type: array
          description: List of documents for deep knowledge retrieval.
          items:
            type: object
            required:
              - url
              - title
              - type
            properties:
              url:
                type: string
                format: uri
              title:
                type: string
              type:
                type: string
                enum:
                  - pdf
                  - txt
                  - docx
                  - markdown
        faq:
          type: array
          description: List of Question-Answer pairs.
          items:
            $ref: '#/components/schemas/faq'
    AdditionalField:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - object
            - array
          default: string
        isRequired:
          type: boolean
        fields:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalField'
    CallInsightPlan:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/InsightField'
      description: Map of insight names to their expected structure.
    RetryProtocol:
      type: object
      description: Smart logic based on why the call failed.
      properties:
        maxAttemptsNoPickup:
          type: integer
          default: 2
          description: Phone rang, no answer. Call back twice.
        maxAttemptsLowEngagement:
          type: integer
          default: 1
          description: User picked up but said 'busy' or cut immediately. Call back once.
        reAttemptPeriod:
          type: integer
          default: 300
          description: Delay between second reattempt of call to same person in seconds
        maxRescheduleCount:
          type: integer
          default: 1
          maximum: 5
          description: How many times we can reschedule a call when user ask to callback
    faq:
      type: object
      required:
        - question
        - answer
      properties:
        question:
          type: string
          example: What is your return policy?
        answer:
          type: string
          example: We offer a 7-day return policy for unused items.
    InsightField:
      type: object
      required:
        - type
        - description
        - required
      properties:
        type:
          type: string
          enum:
            - number
            - boolean
            - string
        description:
          type: string
        required:
          type: boolean
        enum:
          type: array
          items:
            type: string
  securitySchemes:
    PublicKeyAuth:
      type: apiKey
      in: header
      name: x-public-key
    PrivateKeyAuth:
      type: apiKey
      in: header
      name: x-private-key

````