Skip to main content
PATCH
/
v1
/
agents
/
{id}
Update Agent
curl --request PATCH \
  --url https://api.bey.dev/v1/agents/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "avatar_id": "<string>",
  "system_prompt": "<string>",
  "language": "en",
  "greeting": "Hello!",
  "max_session_length_minutes": 30,
  "capabilities": [
    {
      "type": "webcam_vision"
    }
  ],
  "llm": {
    "type": "openai"
  },
  "tts": {
    "type": "elevenlabs",
    "voice": "21m00Tcm4TlvDq8ikWAM"
  },
  "knowledge_file_ids": [
    "<string>"
  ]
}
'
import requests

url = "https://api.bey.dev/v1/agents/{id}"

payload = {
"name": "<string>",
"avatar_id": "<string>",
"system_prompt": "<string>",
"language": "en",
"greeting": "Hello!",
"max_session_length_minutes": 30,
"capabilities": [{ "type": "webcam_vision" }],
"llm": { "type": "openai" },
"tts": {
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
},
"knowledge_file_ids": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
avatar_id: '<string>',
system_prompt: '<string>',
language: 'en',
greeting: 'Hello!',
max_session_length_minutes: 30,
capabilities: [{type: 'webcam_vision'}],
llm: {type: 'openai'},
tts: {type: 'elevenlabs', voice: '21m00Tcm4TlvDq8ikWAM'},
knowledge_file_ids: ['<string>']
})
};

fetch('https://api.bey.dev/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Beyond Presence API Key.

Path Parameters

id
string
required

Agent ID.

Body

application/json

Request body to update an agent. Omitted fields are unchanged.

name
string

Display name to use. Also used when addressed in conversations.

Required string length: 1 - 100
Examples:

"Jarvis"

"HAL 9000"

avatar_id
string

ID of avatar to use.

Required string length: 1 - 100
Example:

"01234567-89ab-cdef-0123-456789abcdef"

system_prompt
string

System prompt to use.

Required string length: 1 - 10000
Example:

"You are a helpful assistant."

language
enum<string> | null

Language to use.

Available options:
ar,
ar-SA,
bn,
bg,
zh,
cs,
da,
nl,
en,
en-AU,
en-GB,
en-US,
fi,
fr,
fr-CA,
fr-FR,
de,
el,
hi,
hu,
id,
it,
ja,
kk,
ko,
ms,
no,
pl,
pt,
pt-BR,
pt-PT,
ro,
ru,
sk,
es,
sv,
tr,
uk,
ur,
vi
Example:

"en"

greeting
string | null

What to say when a call starts.

Required string length: 1 - 1000
Example:

"Hello!"

max_session_length_minutes
integer | null

Maximum session length in minutes.

Required range: 0 < x <= 90
Example:

30

capabilities
(WebcamVisionAgentCapability · object | WakeupModeAgentCapability · object)[]

Extra capabilities to manage calls.

Agent capability to see user camera feed.

Example:
[
{ "type": "webcam_vision" },
{
"triggers": ["hey agent", "hi pal"],
"type": "wakeup_mode"
}
]
llm
LivekitAgentLlm · object

Configuration for LLM to use.

Example:
{ "type": "openai" }
tts
LivekitAgentTts · object

Configuration for TTS to use.

Example:
{
"type": "elevenlabs",
"voice": "21m00Tcm4TlvDq8ikWAM"
}
knowledge_file_ids
string[]

IDs of knowledge files to refer to.

Minimum string length: 1

Response

Successful Update