Skip to main content
PATCH
Update an agent

Authorizations

X-API-Key
string
header
required

[Production] API key for production authentication

Path Parameters

id
string
required

The unique identifier for the agent.

Body

application/json

The agent fields to change.

agentType
enum<string>

The modality that the agent is authored for. Send text or voice to change it. Omit the field or send null to leave it unchanged. An empty string is rejected.

Available options:
text,
voice
description
string

The description of the agent. Omit the field to leave it unchanged.

disabledToolReferenceIds
string[]

The reference identifiers for the tools that are available to the agent but switched off, in UUID format. The runtime doesn't offer these tools to the large language model (LLM), and the tools keep their settings. The reference can point to a tool that is attached directly or to a tool that is bundled in a skill of the agent. The change doesn't edit the bundle of a skill, because every agent that uses the skill shares it. The list replaces the whole set. The API rejects a reference that isn't a valid UUID and removes duplicates. Omit the field to leave it unchanged. Send [] to switch all tools on. A reference that the agent can't reach is stored as sent and ignored at execution time.

guardrails
object

The safety instructions and data privacy settings of the agent. Send an object to set or update the settings. The update replaces each sub-object, not the whole block: sending only dataPrivacy leaves safetySettings unchanged, and the reverse. To change one safety toggle, send the whole safetySettings object. A toggle that you omit from it is stored as off, unlike on create, where it is on by default. Sending {}, omitting the field, or sending null changes nothing, so you can't clear the settings with an update.

hooks
object

The hooks that the platform runs for the agent. Send an object to replace the whole block. Send null or {"preTurn": []} to remove the hooks. Omit the field to leave them unchanged.

image
string

The avatar of the agent, either as a URL or as a base64 data URI. Omit the field or send null to leave it unchanged. Send an empty string to clear the avatar.

imageOptimizedFormat
boolean

true if the avatar is stored in the Cognigy optimized image format; false otherwise. Set it together with image. Omit the field or send null to leave it unchanged.

instructions
string

The instructions that tell the agent how to behave. They can contain CognigyScript. The maximum is 5000 characters, not counting CognigyScript, and 256 KiB stored. A stored value over the limit that you send back unchanged is accepted. Omit the field to leave it unchanged.

knowledge
object

The knowledge settings of the agent. The update merges field by field (RFC 7396 JSON Merge Patch): an omitted field stays unchanged, a field set to null is cleared, and a value replaces the current one.

largeLanguageModelReferenceId
string

The reference identifier for the large language model (LLM) that the agent uses, in UUID format. The model can't be a voice-to-voice (realtime) model. To set a realtime model, use voiceLargeLanguageModelReferenceId. Omit the field to leave it unchanged.

llmConfig
object

The overrides for the LLM parameters of the agent. A parameter that you don't set falls back to the default of the LLM Gateway config set. Send an object to set or replace the overrides. Omitting the field, or sending null, leaves the current overrides unchanged. You can't clear existing overrides with an update.

localeReferenceId
string

The reference identifier for the locale of the agent, in UUID format. Omit the field to leave it unchanged.

name
string

The name of the agent. It can contain CognigyScript. The maximum is 200 bytes, not counting CognigyScript, and 64 KiB stored. The API trims whitespace around the name. The name can't contain the characters \ / : * ? " < > | or ¥ outside CognigyScript. The name must be unique in the project, ignoring case. Omit the field to leave it unchanged.

personaReferenceId
string

The reference identifier for the brand persona of the agent, in UUID format. Omit the field to leave it unchanged.

realtimeVoice
string

The gpt-live-1 voice that the agent uses for voice sessions. The allowed values are alloy, ash, ballad, beacon, bossa, cedar, cinder, coral, delta, echo, gleam, marin, meridian, quartz, ripple, sage, shimmer, stone, tempo, verse, vesper, and willow. Send null to reset it to marin. Omit the field to leave it unchanged. Any other value is rejected with a 400 status.

role
string

The short role of the agent, for example "Customer support specialist". The role opens the default system prompt. It can contain CognigyScript. Whitespace around the role is trimmed. The maximum is 100 characters, not counting CognigyScript, and 64 KiB stored. Omit the field or send null to leave the role unchanged. Send an empty string to clear it.

skillReferenceIds
string[]

The reference identifiers for the skills of the agent, in UUID format. Omit the field to leave it unchanged.

toolReferenceIds
string[]

The reference identifiers for the tools that you attach directly to the agent, in UUID format. The list replaces the whole set. The API removes duplicates and entries that aren't valid UUIDs. Omit the field to leave it unchanged.

voiceDelegationTurns
integer

Deprecated and ignored: the voice delegate treats everything said since the previous hand-off as the current request. Still accepted from 1 to 5 and stored. Send null to reset it to the default 2. Omit the field to leave it unchanged. Any other value is rejected with a 400 status.

voiceLargeLanguageModelReferenceId
string

The reference identifier for the realtime voice-to-voice (V2V) large language model (LLM) that the agent uses for voice sessions, in UUID format. The model must be a voice-to-voice model. Text turns never use it. Send a UUID to set it or an empty string to clear it. Omit the field or send null to leave it unchanged.

voicePromptTemplate
string

The realtime voice prompt template of the agent. Send a string to set it, or null to reset it to the product default. Omit the field to leave it unchanged. An empty template, or one over 32 KiB, is rejected with a 400 status.

Response

Returns the updated agent.

agentType
enum<string>

The modality that the agent was authored for: text or voice. The configuration UI uses it to decide which sections to show. The runtime doesn't use it and takes the modality from the channel of each turn. An agent that was stored without a type returns text.

Available options:
text,
voice
Example:

"voice"

createdAt
integer

The time when the agent was created, as a Unix timestamp in seconds.

createdBy
string

The unique identifier for the user who created the agent.

Example:

"507f1f77bcf86cd799439011"

description
string

The description of the agent.

disabledToolReferenceIds
string[]

The reference identifiers for the tools that are available to the agent but switched off, in UUID format. The runtime doesn't offer these tools to the large language model (LLM), and the tools keep their settings.

guardrails
object

The safety instructions and data privacy settings of the agent.

hooks
object

The hooks that the platform runs for the agent.

id
string

The unique identifier for the agent.

Example:

"507f1f77bcf86cd799439011"

image
string

The avatar of the agent, either as a URL or as a base64 data URI.

imageOptimizedFormat
boolean

true if the avatar is stored in the Cognigy optimized image format; false otherwise.

instructions
string

The instructions that tell the agent how to behave.

knowledge
object

The knowledge settings of the agent.

largeLanguageModelReferenceId
string

The reference identifier for the large language model (LLM) that the agent uses, in UUID format.

lastChangedAt
integer

The time when the agent was last changed, as a Unix timestamp in seconds.

lastChangedBy
string

The unique identifier for the user who last changed the agent.

Example:

"507f1f77bcf86cd799439011"

llmConfig
object

The overrides for the LLM parameters of the agent. A parameter that you don't set falls back to the default of the LLM Gateway config set.

localeReferenceId
string

The reference identifier for the locale of the agent, in UUID format.

name
string

The name of the agent.

organisationId
string

The unique identifier for the organization that the agent belongs to.

Example:

"507f1f77bcf86cd799439011"

personaReferenceId
string

The reference identifier for the brand persona of the agent, in UUID format. The value is empty if the agent has no brand persona.

projectId
string

The unique identifier for the project that the agent belongs to.

Example:

"507f1f77bcf86cd799439011"

realtimeVoice
string

The gpt-live-1 voice that the agent uses for voice sessions. If the field is absent, the default voice marin applies.

referenceId
string

The reference identifier for the agent, in UUID format. The API generates it when the agent is created.

role
string

The short role of the agent, for example "Customer support specialist". The role opens the default system prompt.

skillReferenceIds
string[]

The reference identifiers for the skills of the agent, in UUID format.

toolReferenceIds
string[]

The reference identifiers for the tools that you attach directly to the agent, in UUID format.

voiceDelegationTurns
integer

Deprecated and ignored: the voice delegate treats everything said since the previous hand-off as the current request. The stored value, from 1 to 5, is still returned. If the field is absent, the default 2 applies.

voiceLargeLanguageModelReferenceId
string

The reference identifier for the realtime voice-to-voice (V2V) large language model (LLM) that the agent uses for voice sessions, in UUID format. Text turns never use it.

voicePromptTemplate
string

The realtime voice prompt template of the agent. If the agent has no template of its own, the field is absent and the product default applies.