POST
/
agent
Create a new agent
curl --request POST \
  --url https://atoms-api.smallest.ai/api/v1/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "backgroundSound": false,
  "language": {
    "enabled": "en",
    "switching": {
      "isEnabled": false,
      "minWordsForDetection": 2,
      "strongSignalThreshold": 0.7,
      "weakSignalThreshold": 0.3,
      "minConsecutiveForWeakThresholdSwitch": 2
    }
  },
  "synthesizer": {
    "voiceConfig": {
      "model": "waves_lightning_large_voice_clone",
      "voiceId": "<string>",
      "gender": "male"
    },
    "speed": 1.2,
    "consistency": 0.5,
    "similarity": 0,
    "enhancement": 1
  },
  "globalKnowledgeBaseId": "<string>",
  "slmModel": "electron",
  "defaultVariables": {},
  "globalPrompt": "<string>",
  "telephonyProductId": "<string>"
}'
{
  "status": true,
  "data": "60d0fe4f5311236168a109ca"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
description
string
backgroundSound
boolean
default:false

Whether to add ambient background sound during calls. Currently provides office ambience by default. Additional sound options available upon request.

language
object

Language configuration for the agent. You can enable or disable language switching for the agent. This will be used to determine the language of the agent.

synthesizer
object

Synthesizer configuration for the agent. You can configure the synthesizer to use different voices and models. Currently we support 3 types of models for the synthesizer. Waves, Waves Lightning Large and Waves Lightning Large Voice Clone. You can clone your voice using waves platform https://waves.smallest.ai/voice-clone and use the voiceId for this field and select the model as waves_lightning_large_voice_clone to use your cloned voice. When updating the synthesizer configuration to voice clone model, you have to provide model and voiceId and gender all are required fields but when selecting the model as waves or waves and waves_lightning_large, you have to provide only model field and voiceId.

globalKnowledgeBaseId
string

The global knowledge base ID of the agent. You can create a global knowledge base by using the /knowledgebase endpoint and assign it to the agent. The agent will use this knowledge base for its responses.

slmModel
enum<string>
default:electron

The LLM model to use for the agent. LLM model will be used to generate the response and take decisions based on the user's query.

Available options:
electron,
gpt-4o
defaultVariables
object

The default variables to use for the agent. These variables will be used if no variables are provided when initiating a conversation with the agent.

globalPrompt
string

Set global instructions for your agent's personality, role, and behavior throughout conversations

telephonyProductId
string

The telephony product ID of the agent. This is the product ID of the telephony product that will be used to make the outbound call. You can buy telephone number and assign it to the agent.

Response

Agent created successfully

status
boolean
Example:

true

data
string

The ID of the created agent

Example:

"60d0fe4f5311236168a109ca"