Skip to main content
POST
/
agents
/
{agentId}
/
versions
/
{versionId}
/
activate
Activate Agent Version
curl --request POST \
  --url https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}/versions/{versionId}/activate \
  --header 'x-api-key: <api-key>'
{
  "agent": {
    "id": "f790923795a23467555c0ad6",
    "config": {
      "agent_name": "<string>",
      "agent_description": "<string>",
      "engine": {
        "kind": "<string>",
        "stt": "<string>",
        "llm": "<string>",
        "tts": "<string>",
        "voice_id": "<string>",
        "language": "<string>"
      },
      "engine_pipeline": {},
      "engine_realtime": {},
      "prompt": "<string>",
      "agent_role": "<string>",
      "agent_goal": "<string>",
      "agent_instructions": "<string>",
      "dynamic_variables": {},
      "dynamic_variable_defaults": {},
      "conversation_start": {
        "who": "<string>",
        "greeting": "<string>"
      },
      "turn_detection": "<string>",
      "noise_cancellation": {},
      "api_key": "<string>",
      "knowledge_base": {},
      "managed_agents": {},
      "tools": [
        "<string>"
      ],
      "lyzr_tools": [
        {}
      ],
      "agent_id": "<string>",
      "user_id": "<string>",
      "session_id": "<string>",
      "preemptive_generation": true,
      "pronunciation_correction": true,
      "pronunciation_rules": {},
      "audio_recording_enabled": true,
      "vad_enabled": true,
      "avatar": {},
      "background_audio": {},
      "corrections": [
        {}
      ]
    },
    "createdAt": "2023-10-25T12:00:00Z",
    "updatedAt": "2023-10-26T12:30:00Z",
    "shared": true
  }
}
Restore or activate a specific historical configuration of your Voice Agent. When you make changes to an agent, a new version is created. If an update causes unexpected behavior, or if you simply want to revert to a previously stable setup, you can use this endpoint to promote an older versionId to become the currently active configuration.
Authentication Required: You must include your API key in the x-api-key header to authenticate this request.

Required Parameters

You need two pieces of information in the URL path to make this request:
  • agentId: The 24-character string ID of the parent agent.
  • versionId: The exact UUID of the version you wish to activate (you can retrieve this using the List Agent Versions endpoint).

What Happens on Activation?

When you successfully activate a version (returning a 200 OK status), the following occurs:
  1. The agent’s live configuration is immediately replaced with the payload from the specified versionId.
  2. Any new LiveKit sessions initiated for this agentId will use this newly activated configuration.
  3. The API returns the complete, updated agent object so you can verify the settings have been applied in your application.
Note on active sessions: Activating a new version will not disrupt or alter any ongoing voice calls. The changes will only apply to the next session created after this request succeeds.

Authorizations

x-api-key
string
header
required

Path Parameters

agentId
string
required

The unique identifier of the agent.

Example:

"f790923795a23467555c0ad6"

versionId
string<uuid>
required

The UUID of the specific version to activate.

Example:

"3052daF7-8cbB-61dE-8820-dAb2019F43fd"

Response

Agent version successfully activated.

agent
object