Ir al contenido

Actualizar agente

PUT
/ai-agents/{id}
curl --request PUT \
--url https://api.matiasimpulso.com/ai-agents/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "effort": "low", "modelCatalogId": 2, "name": "example", "zone": "example", "buffer": 1, "description": "example", "timezone": "example", "color": "example", "isEnabled": true, "showInChat": true, "instructions": { "tone": "profesional", "style": "respuestas cortas", "personality": "amigable", "objective": "el objetivo siempre es ayudar al cliente", "language": "Neutral Latin American Spanish", "emojis": true, "preferredFormat": "texto", "maxWords": 80, "avoidTopics": [ "política", "religión" ], "respondOnlyIfKnows": true, "customPrompt": "You have access to our product catalog. When users ask about products, provide detailed information including features and benefits.", "useChainOfThought": false, "outputFormat": { "requireGreeting": true, "requireClosing": true, "maxSentences": 1, "bulletPoints": true, "numbered": true }, "conversationExamples": [ { "userMessage": "¿Cuánto cuesta?", "agentResponse": "Para información sobre precios, contáctanos en ventas@empresa.com" } ], "maintainToneBetweenMessages": true, "greeting": "example" }, "persona": { "name": "example", "role": "example", "speaksInFirstPerson": true, "isHuman": true }, "rules": { "doNotMentionPrices": true, "doNotDiagnose": true, "doNotRespondOutsideHours": true, "noAnswer": "example", "serviceError": "example", "doNotUnderstand": "example" }, "ragConfig": { "ragMode": "tool", "minScore": 0.35, "enabled": true }, "modelConfig": { "modelId": "example", "temperature": 1, "maxTokens": 1, "topP": 1, "topK": 1 }, "businessContext": { "companyName": "ChatikPro", "businessDescription": "Plataforma de automatización de WhatsApp para empresas LATAM", "products": [ "WhatsApp Business API", "Chatbots", "AI Agents" ], "website": "https://chatikpro.com", "supportEmail": "soporte@chatikpro.com" }, "schedules": [ { "id": 1, "dayOfWeek": 1, "startTime": "example", "endTime": "example", "isActive": true } ] }'
id
required
number
Media type application/json
object
effort

Effort fijo del agente (runtimeConfig.turn.effort, §3.6). null = automático.

string
nullable
Allowed values: low medium high xhigh max
modelCatalogId

Modelo del agente (AiModelCatalog.id). Se escribe con el resto, en una transacción.

number
>= 1

Example

2
name
string
zone
string
buffer
number
>= 3 <= 20
description
string
timezone
string
color
string
/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/
isEnabled
boolean
showInChat
boolean
instructions
object
tone
required
string

Example

profesional
style
string

Example

respuestas cortas
personality
string

Example

amigable
objective
required
string

Example

el objetivo siempre es ayudar al cliente
language
required
string

Example

Neutral Latin American Spanish
emojis
required
boolean

Example

true
preferredFormat
string

Example

texto
maxWords
required
number
>= 20 <= 500

Example

80
avoidTopics
required
Array<string>

Example

[
"política",
"religión"
]
respondOnlyIfKnows
boolean

Example

true
customPrompt

Custom prompt to add specific business instructions

string

Example

You have access to our product catalog. When users ask about products, provide detailed information including features and benefits.
useChainOfThought

Enable chain of thought reasoning for better responses

boolean

Example

false
outputFormat
object
requireGreeting
boolean
requireClosing
boolean
maxSentences
number
bulletPoints
boolean
numbered
boolean
conversationExamples

Examples of ideal conversation interactions (few-shot learning)

array

Example

[
{
"userMessage": "¿Cuánto cuesta?",
"agentResponse": "Para información sobre precios, contáctanos en ventas@empresa.com"
}
]
maintainToneBetweenMessages
boolean
greeting
string
persona
object
name
required
string
role
required
string
speaksInFirstPerson
required
boolean
isHuman
required
boolean
rules
object
doNotMentionPrices
required
boolean
doNotDiagnose
required
boolean
doNotRespondOutsideHours
required
boolean
noAnswer
required
string
serviceError
required
string
doNotUnderstand
required
string
ragConfig
object
ragMode

S4 (§5.3): cómo llega el conocimiento. tool (por defecto) solo por buscar_conocimiento; passive RAG automático en el contexto; both, las dos. updateAgent sustituye ragConfig entero: quien lo guarde debe reenviar estos campos.

string
Allowed values: tool passive both

Example

tool
minScore

S4: umbral de relevancia de buscar_conocimiento (0..1).

number
<= 1

Example

0.35
enabled
required
boolean
modelConfig
object
modelId
required
string
temperature
required
number
<= 1
maxTokens
required
number
>= 100 <= 100000
topP
number
<= 1
topK
number
<= 500
businessContext
object
companyName
required
string

Example

ChatikPro
businessDescription
string

Example

Plataforma de automatización de WhatsApp para empresas LATAM
products
Array<string>

Example

[
"WhatsApp Business API",
"Chatbots",
"AI Agents"
]
website
string format: uri

Example

https://chatikpro.com
supportEmail
string format: email

Example

soporte@chatikpro.com
schedules
Array<object>
object
id

ID del horario existente; null o ausente si es nuevo

number
nullable
dayOfWeek
required
number
<= 6
startTime
required
string
endTime
required
string
isActive
boolean

Agente actualizado

Agente no encontrado