Agents

Create agent with AI

Changed on

Creates a new agent using AI generation. Accepts either a guided questionnaire (array of Q&A pairs) or a free-text description. The AI generates the agent's prompt and configuration. A security check is run on the generated prompt before the agent is persisted. Deducts credits on success.

Rules:

  • Either questions (non-empty array) or description must be provided — not both.
  • emotiveToggle, voiceId, and voiceModel must either all be present or all be absent.
  • When emotiveToggle=true, voiceModel must be GPT_REALTIME.
  • When emotiveToggle=false, voiceModel cannot be GPT_REALTIME.
post/agent/with-ai

Request

  • Base URL
    https://api.smallest.ai/atoms/v1
  • URL
    https://api.smallest.ai/atoms/v1/agent/with-ai
  • Auth
    HTTP bearer

Request body

namestring

Agent name. Auto-generated if omitted.

descriptionstring

Free-text description. Required if questions not given.

type'single_prompt'

Workflow type. Only single_prompt is supported.

emotiveToggleboolean

Enable emotive (GPT Realtime) mode. Must be given with voiceId and voiceModel.

voiceIdstring

Voice ID. Must be given together with emotiveToggle and voiceModel.

voiceModelstring

Voice model. Must be given together with emotiveToggle and voiceId.

knowledgeBaseIdstring

Knowledge base to attach (must belong to the organization).

Response

Agent created — returns the new agent's ObjectId

successboolean
datastring

MongoDB ObjectId of the created agent

Example response

{
  "success": true
}

Changes

    • breaking

      removed the enum value gpt-realtime of the request property

    • breaking

      removed the enum value gpt-realtime-mini of the request property

    • breaking

      removed the enum value other of the request property

    • breaking

      removed the enum value waves of the request property

    • breaking

      removed the enum value waves_lightning_large of the request property

    • breaking

      removed the enum value waves_lightning_large_voice_clone of the request property

    • breaking

      removed the enum value waves_lightning_v2 of the request property

    • breaking

      removed the enum value waves_lightning_v3 of the request property

    • breaking

      removed the enum value waves_lightning_v3_1 of the request property

    • warning

      removed the optional property from the response with the status

    • info

      api operation id createAgentWithAi was added

    • info

      the request property default value single_prompt was removed

    • info

      the request property's minLength was decreased from 1 to 0

    • info

      the request property's minLength was decreased from 1 to 0

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added