Agents
Create Voice AI Agent
Create a new AI voice agent with custom configuration and capabilities
POST
/
agent
Create Voice AI Agent
curl --request POST \
--url https://api.kallabot.com/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_config": {
"agent_name": "Alfred",
"agent_welcome_message": "How are you doing Bruce?",
"agent_type": "other",
"timezone": "America/Los_Angeles",
"country": "US",
"call_direction": "inbound",
"inbound_phone_number": "+14155551234",
"tasks": [
{
"task_type": "conversation",
"tools_config": {
"llm_agent": {
"agent_type": "simple_llm_agent",
"agent_flow_type": "streaming",
"llm_config": {
"provider": "openai",
"model": "gpt-4o-mini"
}
},
"synthesizer": {
"provider": "polly",
"provider_config": {
"voice": "Matthew",
"engine": "generative"
}
},
"transcriber": {
"provider": "deepgram",
"model": "nova-2"
},
"input": {
"provider": "twilio",
"format": "wav"
},
"output": {
"provider": "twilio",
"format": "wav"
},
"api_tools": {
"api_tool_ids": [
"tool_1",
"tool_2"
]
}
},
"toolchain": {
"execution": "parallel",
"pipelines": [
[
"transcriber",
"llm",
"synthesizer"
]
]
},
"task_config": {
"hangup_after_silence": 10
}
}
]
},
"agent_prompts": {
"task_1": {
"system_prompt": "What is the Ultimate Question of Life, the Universe, and Everything?"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_config: {
agent_name: 'Alfred',
agent_welcome_message: 'How are you doing Bruce?',
agent_type: 'other',
timezone: 'America/Los_Angeles',
country: 'US',
call_direction: 'inbound',
inbound_phone_number: '+14155551234',
tasks: [
{
task_type: 'conversation',
tools_config: {
llm_agent: {
agent_type: 'simple_llm_agent',
agent_flow_type: 'streaming',
llm_config: {provider: 'openai', model: 'gpt-4o-mini'}
},
synthesizer: {provider: 'polly', provider_config: {voice: 'Matthew', engine: 'generative'}},
transcriber: {provider: 'deepgram', model: 'nova-2'},
input: {provider: 'twilio', format: 'wav'},
output: {provider: 'twilio', format: 'wav'},
api_tools: {api_tool_ids: ['tool_1', 'tool_2']}
},
toolchain: {execution: 'parallel', pipelines: [['transcriber', 'llm', 'synthesizer']]},
task_config: {hangup_after_silence: 10}
}
]
},
agent_prompts: {
task_1: {
system_prompt: 'What is the Ultimate Question of Life, the Universe, and Everything?'
}
}
})
};
fetch('https://api.kallabot.com/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kallabot.com/agent"
payload = {
"agent_config": {
"agent_name": "Alfred",
"agent_welcome_message": "How are you doing Bruce?",
"agent_type": "other",
"timezone": "America/Los_Angeles",
"country": "US",
"call_direction": "inbound",
"inbound_phone_number": "+14155551234",
"tasks": [
{
"task_type": "conversation",
"tools_config": {
"llm_agent": {
"agent_type": "simple_llm_agent",
"agent_flow_type": "streaming",
"llm_config": {
"provider": "openai",
"model": "gpt-4o-mini"
}
},
"synthesizer": {
"provider": "polly",
"provider_config": {
"voice": "Matthew",
"engine": "generative"
}
},
"transcriber": {
"provider": "deepgram",
"model": "nova-2"
},
"input": {
"provider": "twilio",
"format": "wav"
},
"output": {
"provider": "twilio",
"format": "wav"
},
"api_tools": { "api_tool_ids": ["tool_1", "tool_2"] }
},
"toolchain": {
"execution": "parallel",
"pipelines": [["transcriber", "llm", "synthesizer"]]
},
"task_config": { "hangup_after_silence": 10 }
}
]
},
"agent_prompts": { "task_1": { "system_prompt": "What is the Ultimate Question of Life, the Universe, and Everything?" } }
}
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",
"status": "created"
}{
"error": 123,
"message": "Invalid agent_config"
}This page is generated from the production OpenAPI specification (
openapi.json).Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Agent creation payload
⌘I
Create Voice AI Agent
curl --request POST \
--url https://api.kallabot.com/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_config": {
"agent_name": "Alfred",
"agent_welcome_message": "How are you doing Bruce?",
"agent_type": "other",
"timezone": "America/Los_Angeles",
"country": "US",
"call_direction": "inbound",
"inbound_phone_number": "+14155551234",
"tasks": [
{
"task_type": "conversation",
"tools_config": {
"llm_agent": {
"agent_type": "simple_llm_agent",
"agent_flow_type": "streaming",
"llm_config": {
"provider": "openai",
"model": "gpt-4o-mini"
}
},
"synthesizer": {
"provider": "polly",
"provider_config": {
"voice": "Matthew",
"engine": "generative"
}
},
"transcriber": {
"provider": "deepgram",
"model": "nova-2"
},
"input": {
"provider": "twilio",
"format": "wav"
},
"output": {
"provider": "twilio",
"format": "wav"
},
"api_tools": {
"api_tool_ids": [
"tool_1",
"tool_2"
]
}
},
"toolchain": {
"execution": "parallel",
"pipelines": [
[
"transcriber",
"llm",
"synthesizer"
]
]
},
"task_config": {
"hangup_after_silence": 10
}
}
]
},
"agent_prompts": {
"task_1": {
"system_prompt": "What is the Ultimate Question of Life, the Universe, and Everything?"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_config: {
agent_name: 'Alfred',
agent_welcome_message: 'How are you doing Bruce?',
agent_type: 'other',
timezone: 'America/Los_Angeles',
country: 'US',
call_direction: 'inbound',
inbound_phone_number: '+14155551234',
tasks: [
{
task_type: 'conversation',
tools_config: {
llm_agent: {
agent_type: 'simple_llm_agent',
agent_flow_type: 'streaming',
llm_config: {provider: 'openai', model: 'gpt-4o-mini'}
},
synthesizer: {provider: 'polly', provider_config: {voice: 'Matthew', engine: 'generative'}},
transcriber: {provider: 'deepgram', model: 'nova-2'},
input: {provider: 'twilio', format: 'wav'},
output: {provider: 'twilio', format: 'wav'},
api_tools: {api_tool_ids: ['tool_1', 'tool_2']}
},
toolchain: {execution: 'parallel', pipelines: [['transcriber', 'llm', 'synthesizer']]},
task_config: {hangup_after_silence: 10}
}
]
},
agent_prompts: {
task_1: {
system_prompt: 'What is the Ultimate Question of Life, the Universe, and Everything?'
}
}
})
};
fetch('https://api.kallabot.com/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kallabot.com/agent"
payload = {
"agent_config": {
"agent_name": "Alfred",
"agent_welcome_message": "How are you doing Bruce?",
"agent_type": "other",
"timezone": "America/Los_Angeles",
"country": "US",
"call_direction": "inbound",
"inbound_phone_number": "+14155551234",
"tasks": [
{
"task_type": "conversation",
"tools_config": {
"llm_agent": {
"agent_type": "simple_llm_agent",
"agent_flow_type": "streaming",
"llm_config": {
"provider": "openai",
"model": "gpt-4o-mini"
}
},
"synthesizer": {
"provider": "polly",
"provider_config": {
"voice": "Matthew",
"engine": "generative"
}
},
"transcriber": {
"provider": "deepgram",
"model": "nova-2"
},
"input": {
"provider": "twilio",
"format": "wav"
},
"output": {
"provider": "twilio",
"format": "wav"
},
"api_tools": { "api_tool_ids": ["tool_1", "tool_2"] }
},
"toolchain": {
"execution": "parallel",
"pipelines": [["transcriber", "llm", "synthesizer"]]
},
"task_config": { "hangup_after_silence": 10 }
}
]
},
"agent_prompts": { "task_1": { "system_prompt": "What is the Ultimate Question of Life, the Universe, and Everything?" } }
}
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",
"status": "created"
}{
"error": 123,
"message": "Invalid agent_config"
}
