import requests
url = "http://localhost:3000/v1/agent/"
payload = {
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"language": "es",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"time_before_start": 123,
"boosted_keywords": ["<string>"],
"redirect_number": "<string>",
"max_reminder_count": 3,
"reminder_frequency_ms": 7500,
"reminder_messages": [],
"knowledge_base_ids": [],
"mode": "free",
"conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_name": "<string>",
"integrations": [],
"call_tools": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"version_created_at": "2023-11-07T05:31:56Z",
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>"
},
"language": "es",
"mode": "free",
"version_name": "<string>",
"is_draft": false,
"is_published": false,
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"time_before_start": 123,
"boosted_keywords": [
"<string>"
],
"redirect_number": "<string>",
"max_reminder_count": 3,
"reminder_frequency_ms": 7500,
"reminder_messages": [],
"knowledge_base_ids": [],
"conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrations": [],
"call_tools": []
}Create a new agent. By default, creates a new version(v1) and a draft. If is_draft is true, creates only a draft.
import requests
url = "http://localhost:3000/v1/agent/"
payload = {
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"language": "es",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"time_before_start": 123,
"boosted_keywords": ["<string>"],
"redirect_number": "<string>",
"max_reminder_count": 3,
"reminder_frequency_ms": 7500,
"reminder_messages": [],
"knowledge_base_ids": [],
"mode": "free",
"conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_name": "<string>",
"integrations": [],
"call_tools": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"version_created_at": "2023-11-07T05:31:56Z",
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>"
},
"language": "es",
"mode": "free",
"version_name": "<string>",
"is_draft": false,
"is_published": false,
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"time_before_start": 123,
"boosted_keywords": [
"<string>"
],
"redirect_number": "<string>",
"max_reminder_count": 3,
"reminder_frequency_ms": 7500,
"reminder_messages": [],
"knowledge_base_ids": [],
"conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrations": [],
"call_tools": []
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
If true, the agent is created as a draft.
The voice id to be used by the agent
The language used by the agent. Use multi for the agent using both english and spanish in the same call (multi will expand to more languages in the future)
es, en, multi, fr, ca, de, bg, zh, zh-TW, zh-HK, cs, da, nl, et, fi, nl-BE, de-CH, el, hi, hu, id, it, ja, ko, lv, lt, ms, no, pl, pt, ro, ru, sk, sv, th, tr, uk, vi The name of the agent
The description given to the agent
The prompt given to the agent
The greeting message said by the agent to the caller at the beginning of the call
The time in seconds before the agent starts to speak
he list of keywords that are boosted for the agent speech recognition. Use this to improve the agent's recognition of domain-specific terms. For example, ['bradycardia']
The phone number to use by the agent if the call needs to be redirected. If not provided, you won't be able to redirect the call even if the tool is present
The maximum number of reminders that can be sent to the caller. If not provided, the default value is 3. When reached the last reminder, the call gets hang up. Set this value to 0 to disable reminders
x >= 0The frequency in milliseconds to send reminders to the caller. If not provided, the default value is 7500. Set this value to 0 to disable reminders
x >= 1000The list of messages to send to the caller as reminders. If not provided, the default value is an empty list which makes the model to generate the reminder messages by itself. Please, note that when using an empty list, the reminder_frequency_ms can be a little bit higher than specified since it has to generate the messages
The list of knowledge base ids available for the agent to use
The mode of the agent. Can be 'free' or 'path'
free, path The id of the conversational path used by the agent.
The name of the created version
The list of integrations and their tools to assign to the agent
Successful Response
The unique identifier for the agent
The date and time when the agent was last updated
The date and time when the agent was created
The version id of the agent
The version number of the agent
The date and time when the version was created
The language used by the agent. Use multi for the agent using both english and spanish in the same call (multi will expand to more languages in the future)
es, en, multi, fr, ca, de, bg, zh, zh-TW, zh-HK, cs, da, nl, et, fi, nl-BE, de-CH, el, hi, hu, id, it, ja, ko, lv, lt, ms, no, pl, pt, ro, ru, sk, sv, th, tr, uk, vi The mode of the agent. Can be 'free' or 'path'
free, path The version name of the agent
Indicates if the agent is a draft version
Indicates if the agent is published
The name of the agent
The description given to the agent
The prompt given to the agent
The greeting message said by the agent to the caller at the beginning of the call. If set, the agent will always speak first both in inbound and outbound calls
The time in seconds before the agent starts to speak
he list of keywords that are boosted for the agent speech recognition. Use this to improve the agent's recognition of domain-specific terms. For example, ['bradycardia']
The phone number to use by the agent if the call needs to be redirected. If not provided, you won't be able to redirect the call even if the tool is present
The maximum number of reminders that can be sent to the caller. If not provided, the default value is 3. Set this value to 0 to disable reminders
x >= 0The frequency in milliseconds to send reminders to the caller. If not provided, the default value is 7500.
The list of messages to send to the caller as reminders. If not provided, the default value is an empty list which makes the model to generate the reminder messages by itself. Please, note that when using an empty list, the reminder_frequency_ms can be a little bit higher than specified since it has to generate the messages
The list of knowledge bases available for the agent to use
The id of the conversational path used by the agent.
The list of integrations and their assigned tools for the agent
The list of call-tools (built-in tools) assigned to the agent