Crear un nuevo agente de IA
const url = 'https://api.matiasimpulso.com/ai-agents';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"modelCatalogId":2,"effort":"low","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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.matiasimpulso.com/ai-agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "modelCatalogId": 2, "effort": "low", "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 } ] }'Authorizations
Sección titulada « Authorizations »Request Bodyrequired
Sección titulada « Request Bodyrequired »object
Modelo del agente (AiModelCatalog.id), el que usa el turno. Se escribe en AiAgentModelConfig en la misma transacción que el agente. Sin él, el agente corre con el modelo por defecto de la plataforma.
Example
2Effort fijo del agente (runtimeConfig.turn.effort, §3.6). null = automático.
object
Example
profesionalExample
respuestas cortasExample
amigableExample
el objetivo siempre es ayudar al clienteExample
Neutral Latin American SpanishExample
trueExample
textoExample
80Example
[ "política", "religión"]Example
trueCustom prompt to add specific business instructions
Example
You have access to our product catalog. When users ask about products, provide detailed information including features and benefits.Enable chain of thought reasoning for better responses
Example
falseobject
Examples of ideal conversation interactions (few-shot learning)
Example
[ { "userMessage": "¿Cuánto cuesta?", "agentResponse": "Para información sobre precios, contáctanos en ventas@empresa.com" }]object
object
object
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.
Example
toolS4: umbral de relevancia de buscar_conocimiento (0..1).
Example
0.35object
object
Example
ChatikProExample
Plataforma de automatización de WhatsApp para empresas LATAMExample
[ "WhatsApp Business API", "Chatbots", "AI Agents"]Example
https://chatikpro.comExample
soporte@chatikpro.comobject
ID del horario existente; null o ausente si es nuevo
Responses
Sección titulada « Responses »Agente creado exitosamente
object
Example generated
{ "id": 1, "name": "example", "slug": "example", "zone": "example", "isEnabled": true, "totalConversations": 1, "totalMessages": 1, "createdAt": "2026-04-15T12:00:00Z"}Datos inválidos o límite de plan alcanzado