Agents

Create a new agent.

post/v1/agents

Request

  • Base URL
    https://api.bey.dev
  • URL
    https://api.bey.dev/v1/agents
  • Auth
    API key in header x-api-key

Request body

namestring required

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

avatar_idstring required

ID of avatar to use.

system_promptstring required

System prompt to use.

language'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'

Language for communication.

greetingstring nullable

What to say when a call starts.

max_session_length_minutesinteger nullable

Maximum session length in minutes.

knowledge_file_idsstring[]

IDs of knowledge files to refer to.

Example request

{
  "name": "Jarvis",
  "avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
  "system_prompt": "You are a helpful assistant.",
  "greeting": "Hello!",
  "max_session_length_minutes": 30
}

Response

Created Agent with ID

idstring required

Unique identifier of the object in the database.

namestring required

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

avatar_idstring required

ID of avatar to use.

system_promptstring required

System prompt to use.

language'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'

Language for communication.

greetingstring nullable

What to say when a call starts.

max_session_length_minutesinteger nullable

Maximum session length in minutes.

knowledge_file_idsstring[]

IDs of knowledge files to refer to.

Example response

{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "name": "Jarvis",
  "avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
  "system_prompt": "You are a helpful assistant.",
  "greeting": "Hello!",
  "max_session_length_minutes": 30
}

Changes