PATCH
/
agent
/
{id}
Update an agent
curl --request PATCH \
  --url https://atoms-api.smallest.ai/api/v1/agent/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "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.

Path Parameters

id
string
required

Body

application/json
name
string
description
string
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
slmModel
enum<string>
default:electron
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 updated successfully

status
boolean
Example:

true

data
string

The ID of the updated agent

Example:

"60d0fe4f5311236168a109ca"