Create Agent
curl --request POST \
--url https://api.bey.dev/v1/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{
"type": "webcam_vision"
},
{
"triggers": [
"hey agent",
"hi pal"
],
"type": "wakeup_mode"
}
],
"llm": {
"type": "openai"
},
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": [
"<string>"
]
}
'import requests
url = "https://api.bey.dev/v1/agents"
payload = {
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{ "type": "webcam_vision" },
{
"triggers": ["hey agent", "hi pal"],
"type": "wakeup_mode"
}
],
"llm": { "type": "openai" },
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Jarvis',
avatar_id: '01234567-89ab-cdef-0123-456789abcdef',
system_prompt: 'You are a helpful assistant.',
language: 'en',
greeting: 'Hello!',
max_session_length_minutes: 30,
capabilities: [
{type: 'webcam_vision'},
{triggers: ['hey agent', 'hi pal'], type: 'wakeup_mode'}
],
llm: {type: 'openai'},
tts: {type: 'elevenlabs', voice: '21m00Tcm4TlvDq8ikWAM'},
knowledge_file_ids: ['<string>']
})
};
fetch('https://api.bey.dev/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{
"type": "webcam_vision"
},
{
"triggers": [
"hey agent",
"hi pal"
],
"type": "wakeup_mode"
}
],
"llm": {
"type": "openai"
},
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": [
"<string>"
]
}Agents
Create Agent
Create a new agent.
POST
/
v1
/
agents
Create Agent
curl --request POST \
--url https://api.bey.dev/v1/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{
"type": "webcam_vision"
},
{
"triggers": [
"hey agent",
"hi pal"
],
"type": "wakeup_mode"
}
],
"llm": {
"type": "openai"
},
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": [
"<string>"
]
}
'import requests
url = "https://api.bey.dev/v1/agents"
payload = {
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{ "type": "webcam_vision" },
{
"triggers": ["hey agent", "hi pal"],
"type": "wakeup_mode"
}
],
"llm": { "type": "openai" },
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Jarvis',
avatar_id: '01234567-89ab-cdef-0123-456789abcdef',
system_prompt: 'You are a helpful assistant.',
language: 'en',
greeting: 'Hello!',
max_session_length_minutes: 30,
capabilities: [
{type: 'webcam_vision'},
{triggers: ['hey agent', 'hi pal'], type: 'wakeup_mode'}
],
llm: {type: 'openai'},
tts: {type: 'elevenlabs', voice: '21m00Tcm4TlvDq8ikWAM'},
knowledge_file_ids: ['<string>']
})
};
fetch('https://api.bey.dev/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "Jarvis",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"system_prompt": "You are a helpful assistant.",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [
{
"type": "webcam_vision"
},
{
"triggers": [
"hey agent",
"hi pal"
],
"type": "wakeup_mode"
}
],
"llm": {
"type": "openai"
},
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": [
"<string>"
]
}Body
application/json
Request body to create an agent.
Language to use.
Available options:
ar, ar-SA, bn, bg, zh, hr, cs, da, nl, en, en-AU, en-GB, en-US, fi, fr, fr-CA, fr-FR, ka, de, el, gu, he, hi, hu, id, it, ja, kn, kk, ko, ms, mr, no, pl, pt, pt-BR, pt-PT, pa, ro, ru, sk, es, sv, tl, ta, te, th, tr, uk, ur, vi Example:
"en"
Extra capabilities to manage calls.
Agent capability to see user camera feed.
- WebcamVisionAgentCapability
- WakeupModeAgentCapability
Show child attributes
Show child attributes
Example:
[
{ "type": "webcam_vision" },
{
"triggers": ["hey agent", "hi pal"],
"type": "wakeup_mode"
}
]
Response
Created Agent with ID
Response model for an agent.
Language to use.
Available options:
ar, ar-SA, bn, bg, zh, hr, cs, da, nl, en, en-AU, en-GB, en-US, fi, fr, fr-CA, fr-FR, ka, de, el, gu, he, hi, hu, id, it, ja, kn, kk, ko, ms, mr, no, pl, pt, pt-BR, pt-PT, pa, ro, ru, sk, es, sv, tl, ta, te, th, tr, uk, ur, vi Example:
"en"
Extra capabilities to manage calls.
Agent capability to see user camera feed.
- WebcamVisionAgentCapability
- WakeupModeAgentCapability
Show child attributes
Show child attributes
Example:
[
{ "type": "webcam_vision" },
{
"triggers": ["hey agent", "hi pal"],
"type": "wakeup_mode"
}
]
Was this page helpful?