Agent Integration

Create LiveKit Room

Changed on

Create a LiveKit room for one of your agents and return the credentials a LiveKit client needs to join it.

Use this only when you are embedding a conversation in your own application via the LiveKit client SDK. Most integrations do not need it: Interacting with Managed Agents through the UI starts a conversation with no API call required.

The room is created together with its conversation, whose status and transcript you can then read from /v1/conversations/{id}.

post/v1/livekit-rooms

Request

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

Request body

agent_idstring required

ID of agent managing the conversation.

user_namestring nullable

Name of the user.

user_emailstring nullable

Email of the user.

tagsobject

Tags for the conversation.

Response

Created LiveKit room with its conversation ID and connection details.

idstring required

Unique identifier of the object in the database.

agent_idstring required

ID of agent managing the conversation.

user_namestring nullable

Name of the user.

user_emailstring nullable

Email of the user.

tagsobject

Tags for the conversation.

livekit_urlstring required

LiveKit server URL to connect to.

livekit_tokenstring required

JWT for joining the LiveKit room.

Example response

{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "status": {
    "started_at": "2022-01-01T00:00:00Z"
  }
}

Changes