AI agent configuration, assignments, handoff rules, knowledge, products, orchestration, evaluations, and testing
List all AI agents
List all AI agents › Responses
Array of AI agents
idnamesystem_promptmodeltemperaturemax_tokensis_activecreated_atupdated_atwelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsCreate a new AI agent
Requires settings.manage permission.
Create a new AI agent › Request Body
namesystem_promptmodeltemperaturemax_tokenswelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsCreate a new AI agent › Responses
Created AI agent
idnamesystem_promptmodeltemperaturemax_tokensis_activecreated_atupdated_atwelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsGet an AI agent by ID
path Parameters
idGet an AI agent by ID › Responses
AI agent details
idnamesystem_promptmodeltemperaturemax_tokensis_activecreated_atupdated_atwelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsUpdate an AI agent
Requires settings.manage permission.
path Parameters
idUpdate an AI agent › Request Body
namesystem_promptmodeltemperaturemax_tokenswelcome_messageis_activeparent_agent_iddaily_token_limitmax_conversation_turnsUpdate an AI agent › Responses
Updated AI agent
idnamesystem_promptmodeltemperaturemax_tokensis_activecreated_atupdated_atwelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsToggle AI agent active state
Flips is_active to the opposite value. Requires settings.manage permission.
path Parameters
idToggle AI agent active state › Responses
Updated AI agent with toggled state
idnamesystem_promptmodeltemperaturemax_tokensis_activecreated_atupdated_atwelcome_messageparent_agent_iddaily_token_limitmax_conversation_turnsList AI agent assignments
path Parameters
idAI agent ID
List AI agent assignments › Responses
Array of assignments
idai_agent_idpriorityis_activechanneldivision_idCreate an AI agent assignment
Requires settings.manage permission. Valid channels are whatsapp, instagram, email, messenger.
path Parameters
idAI agent ID
Create an AI agent assignment › Request Body
channeldivision_idpriorityCreate an AI agent assignment › Responses
Created assignment
idai_agent_idpriorityis_activechanneldivision_idUpdate an AI agent assignment
Requires settings.manage permission.
path Parameters
idAI agent ID
aidAssignment ID
Update an AI agent assignment › Request Body
channeldivision_idpriorityis_activeUpdate an AI agent assignment › Responses
Updated assignment
idai_agent_idpriorityis_activechanneldivision_idList handoff rules for an AI agent
path Parameters
idAI agent ID
List handoff rules for an AI agent › Responses
Array of handoff rules
idai_agent_idrule_typeconfigRule-specific configuration (e.g. keywords list, threshold)
stop_ai_after_handoffis_activetarget_division_idCreate a handoff rule
Requires settings.manage permission. Valid rule types are:
keyword, message_count, sentiment, explicit_request, location, topic.
path Parameters
idAI agent ID
Create a handoff rule › Request Body
rule_typeconfigtarget_division_idstop_ai_after_handoffCreate a handoff rule › Responses
Created handoff rule
idai_agent_idrule_typeconfigRule-specific configuration (e.g. keywords list, threshold)
stop_ai_after_handoffis_activetarget_division_idUpdate a handoff rule
Requires settings.manage permission.
path Parameters
idAI agent ID
hidHandoff rule ID
Update a handoff rule › Request Body
rule_typeconfigtarget_division_idstop_ai_after_handoffis_activeUpdate a handoff rule › Responses
Updated handoff rule
idai_agent_idrule_typeconfigRule-specific configuration (e.g. keywords list, threshold)
stop_ai_after_handoffis_activetarget_division_idGet daily usage stats for an AI agent
Requires settings.manage permission.
path Parameters
idAI agent ID
query Parameters
fromStart date (YYYY-MM-DD)
toEnd date (YYYY-MM-DD)
Get daily usage stats for an AI agent › Responses
Array of daily usage summaries
dateprompt_tokenscompletion_tokenstotal_tokenstotal_costEstimated cost in USD
request_countList knowledge sources for an AI agent
path Parameters
idAI agent ID
List knowledge sources for an AI agent › Responses
Array of knowledge sources
idai_agent_idnamesource_typechunk_countstatuscreated_atcontentfile_urloriginal_filenamewebsite_urlstatus_messageAdd a knowledge source
Requires settings.manage permission. Valid source types are:
text, file, website, qna, product.
path Parameters
idAI agent ID
Add a knowledge source › Request Body
namesource_typecontentfile_urloriginal_filenamewebsite_urlAdd a knowledge source › Responses
Created knowledge source (status=pending)
idai_agent_idnamesource_typechunk_countstatuscreated_atcontentfile_urloriginal_filenamewebsite_urlstatus_messageReprocess a knowledge source
Resets status to pending for re-processing. Requires settings.manage permission.
path Parameters
idAI agent ID
kidKnowledge source ID
Reprocess a knowledge source › Responses
Knowledge source reset to pending
idai_agent_idnamesource_typechunk_countstatuscreated_atcontentfile_urloriginal_filenamewebsite_urlstatus_messageAdd a QnA pair
List products for an AI agent
path Parameters
idAI agent ID
List products for an AI agent › Responses
Array of products
idai_agent_idnamemetadataArbitrary JSON metadata for the product
is_activecreated_atdescriptionpriceProduct price as a decimal string
weightProduct weight as a decimal string
Create a product
Requires settings.manage permission.
path Parameters
idAI agent ID
Create a product › Request Body
namedescriptionpriceweightmetadataCreate a product › Responses
Created product
idai_agent_idnamemetadataArbitrary JSON metadata for the product
is_activecreated_atdescriptionpriceProduct price as a decimal string
weightProduct weight as a decimal string
Bulk import products
Import an array of products in one request. Requires settings.manage permission.
path Parameters
idAI agent ID
Bulk import products › Request Body
namedescriptionpriceweightmetadataBulk import products › Responses
Array of created products
idai_agent_idnamemetadataArbitrary JSON metadata for the product
is_activecreated_atdescriptionpriceProduct price as a decimal string
weightProduct weight as a decimal string
Update a product
Requires settings.manage permission.
path Parameters
idAI agent ID
pidProduct ID
Update a product › Request Body
namedescriptionpriceweightmetadatais_activeUpdate a product › Responses
Updated product
idai_agent_idnamemetadataArbitrary JSON metadata for the product
is_activecreated_atdescriptionpriceProduct price as a decimal string
weightProduct weight as a decimal string
List orchestration rules
path Parameters
idParent AI agent ID
List orchestration rules › Responses
Array of orchestration rules
idparent_agent_idtarget_agent_idcondition_promptPrompt evaluated to decide whether to route to target agent
priorityis_activeCreate an orchestration rule
Requires settings.manage permission.
path Parameters
idParent AI agent ID
Create an orchestration rule › Request Body
target_agent_idcondition_promptpriorityCreate an orchestration rule › Responses
Created orchestration rule
idparent_agent_idtarget_agent_idcondition_promptPrompt evaluated to decide whether to route to target agent
priorityis_activeUpdate an orchestration rule
Requires settings.manage permission.
path Parameters
idParent AI agent ID
ridOrchestration rule ID
Update an orchestration rule › Request Body
target_agent_idcondition_promptpriorityis_activeUpdate an orchestration rule › Responses
Updated orchestration rule
idparent_agent_idtarget_agent_idcondition_promptPrompt evaluated to decide whether to route to target agent
priorityis_activeList evaluations for an AI agent
path Parameters
idAI agent ID
List evaluations for an AI agent › Responses
Array of evaluations
idconversation_idmessage_idMongoDB message ID
original_responsecorrected_responsecontext_message_idsIDs of messages used as evaluation context
evaluated_byAgent who performed the evaluation
created_atCreate an AI response evaluation
Submit a human correction of an AI response. Requires settings.manage permission.
Create an AI response evaluation › Request Body
conversation_idmessage_idoriginal_responsecorrected_responsecontext_message_idsCreate an AI response evaluation › Responses
Created evaluation
idconversation_idmessage_idMongoDB message ID
original_responsecorrected_responsecontext_message_idsIDs of messages used as evaluation context
evaluated_byAgent who performed the evaluation
created_atUpdate an AI evaluation
Requires settings.manage permission.
path Parameters
eidEvaluation ID
Update an AI evaluation › Responses
Updated evaluation
idconversation_idmessage_idMongoDB message ID
original_responsecorrected_responsecontext_message_idsIDs of messages used as evaluation context
evaluated_byAgent who performed the evaluation
created_atGet aggregated AI usage summary
Aggregated daily usage across all AI agents. Requires settings.manage permission.
query Parameters
fromtoGet aggregated AI usage summary › Responses
Array of daily usage summaries
dateprompt_tokenscompletion_tokenstotal_tokenstotal_costEstimated cost in USD
request_count