PUT
/
v1
/
api
/
agents
/
{agentId}
curl --request PUT \
  --url https://api.trillet.ai/v1/api/agents/{agentId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "name": "<string>",
  "llmModel": "<string>",
  "ttsModel": {
    "provider": "<string>",
    "voiceId": "<string>"
  }
}'
{
  "_id": "agentIdExample",
  "workspaceId": "workspaceIdExample",
  "userId": "userIdExample",
  "name": "Agent Smith",
  "ttsModel": {
    "provider": "openai",
    "voiceId": "voice123",
    "name": "Standard",
    "language": "en"
  },
  "llmModel": "gpt-4o",
  "type": "voice",
  "phoneNumberId": "phoneNumberIdExample",
  "activeSessions": [
    {
      "roomName": "SupportSession",
      "participantId": "participant123",
      "startTime": "2025-01-01T09:00:00Z",
      "status": "active"
    }
  ],
  "settings": {},
  "status": "ready",
  "currentNode": "node123",
  "variables": {},
  "createdAt": "2025-01-01T08:00:00Z",
  "updatedAt": "2025-01-02T09:00:00Z"
}

Headers

x-api-key
string
required

API key used for authenticating requests to the API.

x-workspace-id
string
required

Workspace identifier for the API.

Path Parameters

agentId
string
required

The unique identifier of the agent to update

Request Body

name
string

New name for the agent

llmModel
string

New language model to use

ttsModel
object

Response Fields

_id
string

The unique identifier of the agent.

workspaceId
string

The workspace identifier to which the agent belongs.

userId
string

The user identifier associated with the agent, if applicable.

name
string

The name assigned to the agent.

ttsModel
object

The configuration of the text-to-speech model used by the agent.

provider
string

The provider of the TTS service.

voiceId
string

The specific voice ID used in the TTS model.

name
string

The name of the TTS model configuration.

language
string

The language set for the TTS model.

llmModel
string

The large language model used by the agent.

type
string

The type of agent, such as “voice” or “chat”.

phoneNumberId
string

The phone number ID associated with the agent.

activeSessions
array

A list of active sessions associated with the agent.

roomName
string

The name of the room for the session.

participantId
string

The participant identifier in the session.

startTime
date

The start time of the session.

status
string

The status of the session.

settings
object

Any custom settings configured for the agent.

status
string

The current status of the agent, such as “pending”, “ready”, or “error”.

currentNode
string

The current node or state within the agent’s flow or logic.

variables
object

Custom variables stored for the agent.

createdAt
string

Timestamp when the conversation was created.

updatedAt
string

Timestamp when the conversation was last updated.

{
  "_id": "agentIdExample",
  "workspaceId": "workspaceIdExample",
  "userId": "userIdExample",
  "name": "Agent Smith",
  "ttsModel": {
    "provider": "openai",
    "voiceId": "voice123",
    "name": "Standard",
    "language": "en"
  },
  "llmModel": "gpt-4o",
  "type": "voice",
  "phoneNumberId": "phoneNumberIdExample",
  "activeSessions": [
    {
      "roomName": "SupportSession",
      "participantId": "participant123",
      "startTime": "2025-01-01T09:00:00Z",
      "status": "active"
    }
  ],
  "settings": {},
  "status": "ready",
  "currentNode": "node123",
  "variables": {},
  "createdAt": "2025-01-01T08:00:00Z",
  "updatedAt": "2025-01-02T09:00:00Z"
}