Skip to main content
POST
Create a new agent

Authorizations

X-API-Key
string
header
required

[Production] API key for production authentication

Body

application/json

Agent data

localeReferenceId
string
required
name
string
required

Name may hold CognigyScript. At most 200 characters not counting CognigyScript (64 KiB stored), and none of \ / : * ? " < > | ¥ outside CognigyScript.

projectId
string
required

MongoDB ObjectID represented as a hex string

agentType
enum<string>

AgentType is the modality this agent is authored for: "text" or "voice". Omit it and the agent is created as "voice" — voice-native is what new agents are for. It drives which sections the configuration UI renders and is never consulted by the runtime, which takes its modality from the per-turn channel on ExecuteTurn instead.

Available options:
text,
voice
Example:

"voice"

description
string
guardrails
object

Guardrails configures the agent's safety instructions and data privacy. Every safety toggle defaults to on, as in v1: leave out safetySettings (or the whole block) and all four are on; leave a toggle out of a sent safetySettings and that one is on. Only an explicit false turns a toggle off.

hooks
object

Hooks names the Flow the platform runs before the agent answers each message. Optional; at most one pre-Turn hook.

image
string

Image is the agent's avatar: either a URL or a base64 data URI. Optional — an agent may be created without one, matching AgentPersona.

imageOptimizedFormat
boolean
instructions
string

Instructions may hold CognigyScript. At most 5000 characters not counting CognigyScript (256 KiB stored).

knowledge
object
largeLanguageModelReferenceId
string
llmConfig
object
personaReferenceId
string
realtimeVoice
string

RealtimeVoice is the gpt-live-1 voice; absent means the default ("marin").

role
string

Role is the agent's short role, e.g. "Customer support specialist". It opens the default system prompt. Optional; may hold CognigyScript. Trimmed; at most 100 characters not counting CognigyScript (64 KiB stored).

skillReferenceIds
string[]
toolReferenceIds
string[]
voiceLargeLanguageModelReferenceId
string

VoiceLargeLanguageModelReferenceId links a realtime (V2V) LLM for voice sessions. Optional UUID; text turns never use it.

Response

Created

agentType
enum<string>

AgentType is the modality the agent was authored for. Always present: an agent stored without one — every agent that predates the field — reads back as "text", because it was authored when chat was the only thing an agent could be.

Available options:
text,
voice
Example:

"voice"

createdAt
integer
createdBy
string
Example:

"507f1f77bcf86cd799439011"

description
string
disabledToolReferenceIds
string[]
guardrails
object
hooks
object
id
string
Example:

"507f1f77bcf86cd799439011"

image
string
imageOptimizedFormat
boolean
instructions
string
knowledge
object
largeLanguageModelReferenceId
string
lastChangedAt
integer
lastChangedBy
string
Example:

"507f1f77bcf86cd799439011"

llmConfig
object
localeReferenceId
string
name
string
organisationId
string
Example:

"507f1f77bcf86cd799439011"

personaReferenceId
string
projectId
string
Example:

"507f1f77bcf86cd799439011"

realtimeVoice
string

RealtimeVoice is the gpt-live-1 voice; absent means the default ("marin").

referenceId
string
role
string
skillReferenceIds
string[]
toolReferenceIds
string[]
voiceLargeLanguageModelReferenceId
string

VoiceLargeLanguageModelReferenceId links a realtime (V2V) LLM for voice sessions. Optional UUID; text turns never use it.

voicePromptTemplate
string

VoicePromptTemplate is the agent's own template; absent means the product default.