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

# Recommend Agent Type

> Recommend an agent type from a short description of the calls you want to handle.

Read only

Recommend an agent type from a short description of the calls you want to handle. The response can suggest one type, a two-agent combination, or a clarifying question. It does not create or publish an agent.

## Before you begin

* Prepare a description of the caller, goal, and routing requirements.
* Send a valid workspace API key. The description is required and limited to 2000 characters.

## Recommend Agent Type Request

```json theme={null}
{"description": "Call new customers and book a callback."}
```

## Verify the result

The current route returns HTTP `201` with the recommendation under `data`. Read `why` and check `shape`, `agent_type`, `pipeline`, `combo`, and `clarify`. If clarification is requested, include the answer in a revised description. If a combination is suggested, create and connect the agents separately.

## Errors and recovery

`400` means the description is missing, the wrong type, or too long. Correct the input. For `401`, correct the API key. After `500`, retry the recommendation. Repeating this operation does not duplicate an agent, but generated advice can differ.

## Related endpoints

* [Classify Agent Blueprint](https://dialnexa.com/docs/api-reference/v1/agent-builder/classify-blueprint.md)
* [Compare agent types](https://dialnexa.com/docs/agents/types-of-agents.md)
* [Create Agent](https://dialnexa.com/docs/api-reference/v1/agents/create.md)


## OpenAPI

````yaml POST /v1/agent-builder/shape-advisor
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/agent-builder/shape-advisor:
    post:
      tags:
        - Agent Builder
      summary: Recommend Agent Type
      description: >-
        Recommends an agent type, a two-agent combination, or a clarifying
        question from a plain-language description. No agent is created or
        published.
      operationId: recommendAgentType
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  minLength: 1
                  maxLength: 2000
              required:
                - description
            examples:
              request:
                value:
                  description: Call new customers and book a callback.
      responses:
        '201':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: boolean
                  statusCode:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      shape:
                        type: string
                        nullable: true
                      agent_type:
                        type: string
                        nullable: true
                      pipeline:
                        type: string
                        enum:
                          - Cascaded
                          - Speech_To_Speech
                      combo:
                        type: object
                        properties:
                          front:
                            type: string
                          then:
                            type: string
                        nullable: true
                      clarify:
                        type: string
                        nullable: true
                      why:
                        type: string
                  timestamp:
                    type: string
                    format: date-time
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
              examples:
                success:
                  value:
                    success: true
                    error: false
                    statusCode: 201
                    message: Success
                    data:
                      shape: spa
                      agent_type: Single_Prompt_Agent
                      pipeline: Cascaded
                      combo: null
                      clarify: null
                      why: One focused conversation can handle this goal.
                    timestamp: '2026-09-07T06:00:00.000Z'
        '400':
          description: >-
            Description is missing, has an invalid type, or exceeds 2000
            characters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 400
                    error: true
                    success: false
                    data: []
                    message: >-
                      description must be shorter than or equal to 2000
                      characters
                    errors:
                      - >-
                        description must be shorter than or equal to 2000
                        characters
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 401
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
        '500':
          description: The recommendation could not be generated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 500
                    error: true
                    success: false
                    data: []
                    message: Internal server error
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.