> ## 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.

# Classify Agent Blueprint

> Classify an agent blueprint to get a type recommendation from structured business and call requirements.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

Classify an agent blueprint to get a type recommendation from structured business and call requirements. This operation does not create or publish an agent.

## Before you begin

* Send a valid workspace API key.
* Supply the blueprint fields you know. Each field is optional; text fields allow 4000 characters each, while `language` allows 120.

## Classify Agent Blueprint Request

```json theme={null}
{"primary_goal": "Book a callback", "language": "English"}
```

## Verify the result

The current route returns HTTP `201` with `data.shape`, `data.pipeline`, `data.confidence`, `data.evidence`, `data.needsTiebreak`, and `data.features`. Shapes are `spa`, `cfa`, and `ivr`; pipelines are `cascaded` and `s2s`. Compare the evidence with the intended call before choosing a type.

## Errors and recovery

`400` means a field has the wrong type or exceeds its length limit. For `401`, correct the API key. The service uses a rule-based recommendation if its model-assisted step fails. Recommendations can change between requests; retrying does not create duplicate agents.

## Related endpoints

* [Recommend Agent Type](/docs/api-reference/v1/agent-builder/recommend-type)
* [Agent Builder](/docs/agents/ai-agent-builder#choose-the-suggested-agent-type)
* [Create Agent](/docs/api-reference/v1/agents/create)


## OpenAPI

````yaml POST /v1/agent-builder/classify-shape
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: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
paths:
  /v1/agent-builder/classify-shape:
    post:
      tags:
        - Agent Builder
      summary: Classify Agent Blueprint
      description: >-
        Recommends an agent type from structured blueprint answers. No agent is
        created or published. Uses a model-assisted recommendation with
        rule-based fallback when the model is unavailable.
      operationId: classifyAgentBlueprint
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_and_offering:
                  type: string
                  maxLength: 4000
                target_customer:
                  type: string
                  maxLength: 4000
                primary_goal:
                  type: string
                  maxLength: 4000
                success_criteria:
                  type: string
                  maxLength: 4000
                information_to_collect:
                  type: string
                  maxLength: 4000
                objections_and_faqs:
                  type: string
                  maxLength: 4000
                agent_tone:
                  type: string
                  maxLength: 4000
                additional_context:
                  type: string
                  maxLength: 4000
                language:
                  type: string
                  maxLength: 120
            examples:
              request:
                value:
                  primary_goal: Book a callback
                  language: English
      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
                        enum:
                          - spa
                          - cfa
                          - ivr
                      pipeline:
                        type: string
                        enum:
                          - cascaded
                          - s2s
                      confidence:
                        type: number
                        minimum: 0
                        maximum: 1
                      evidence:
                        type: array
                        items:
                          type: string
                      needsTiebreak:
                        type: boolean
                      features:
                        type: object
                        additionalProperties: true
                  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
                      pipeline: cascaded
                      confidence: 0.8
                      evidence:
                        - One focused call objective.
                      needsTiebreak: false
                      features: {}
                    timestamp: '2026-09-07T06:00:00.000Z'
        '400':
          description: A blueprint field has an invalid type or exceeds its length limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 400
                    message: >-
                      A blueprint field has an invalid type or exceeds its
                      length limit.
                    error: Bad Request
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  value:
                    statusCode: 401
                    message: Missing or invalid API key.
                    error: Unauthorized
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: phone_number must be a valid E.164 phone number
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````