Create an Agent
POST/conversation-ai/agents
Creates a new AI agent for the location. The agent will be created with the specified configuration including name, role, actions, and behavior settings.
Request
API Version
v3- application/json
- Body
- Example (auto)
Bodyrequired
Name of the agent.
Name of the business the agent represents.
Mode of operation - OFF, SUGGESTIVE, or AUTO_PILOT
offsuggestiveauto-pilotCommunication channels the agent can operate on
IGFBSMSWebChatWhatsAppLive_ChatEmailIndicates if this agent is a primary agent.
falseWait time before agent responds (max 5 for minutes, 300 for seconds)
2Unit for wait time - SECONDS or MINUTES
minutessecondsIndicates if sleep functionality is enabled.
falseEnable sleep when a manual outbound message is sent.
Enable sleep when a workflow outbound message is sent.
Duration of sleep period (required if sleepEnabled is true). Set to null for indefinite sleep. (max 2880 for minutes, 172800 for seconds, 48 for hours)
Unit of sleep time - HOURS, MINUTES, or SECONDS (required if sleepEnabled is true). Set to null for indefinite sleep.
hoursminutessecondsPersonality traits of the agent.
The goal of the agent.
Instructions for the agent.
Complete agent prompt. When set and non-empty, used as the source of truth at generation time instead of personality, goal, and instructions.
Maximum number of messages in auto-pilot mode before requiring human intervention. (max: 100, min: 1)
75Array of knowledge base IDs associated with this agent.
Allow agent to respond to images
falseAllow agent to respond to audio
false{
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat",
"WhatsApp"
],
"isPrimary": true,
"waitTime": 2,
"waitTimeUnit": "seconds",
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"personality": "Friendly and helpful",
"goal": "Assist customers with inquiries.",
"instructions": "Provide customer service.",
"fullPrompt": "string",
"autoPilotMaxMessages": 75,
"knowledgeBaseIds": [
"kb_abc123",
"kb_def456"
],
"respondToImages": true,
"respondToAudio": true
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
Unique identifier for the agent.
Name of the agent.
Name of the business the agent represents.
Current operating mode of the agent.
offsuggestiveauto-pilotCommunication channels the agent operates on.
IGFBSMSWebChatWhatsAppLive_ChatEmailWait time before agent responds.
Unit for wait time.
minutessecondsIndicates if sleep functionality is enabled.
Whether the bot sleeps on manual outbound messages.
Whether the bot sleeps on workflow outbound messages.
Duration of sleep period.
Unit of sleep time.
hoursminutessecondsEmail-specific wait time (max 12 hours).
Unit for email wait time.
secondsminuteshoursEmail channel formatting settings.
List of actions associated with this agent.
Indicates if this agent is a primary agent.
Maximum number of messages in auto-pilot mode before requiring human intervention.
The goal of the agent.
Personality traits of the agent.
Instructions for the agent.
Complete agent prompt when stored; when set and non-empty, used as the source of truth at generation time.
Array of knowledge base IDs associated with this agent.
Knowledge base trigger configurations
Working-hours schedule for this agent, or null when not configured. Manage it via the /working-hours routes.
{
"id": "emp_123",
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"emailWaitTime": 1,
"emailWaitTimeUnit": "hours",
"emailSettings": {},
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"fullPrompt": "string",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
],
"knowledgeBaseTriggers": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mode": "all",
"knowledgeBaseIds": [
"kb_001"
],
"triggerCondition": "When the customer asks about pricing or billing",
"priority": 2
}
],
"workingHours": {
"enabled": false,
"channels": [
"SMS",
"WhatsApp"
],
"timezoneMode": "contact",
"schedule": {
"mon": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"tue": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"wed": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"thu": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"fri": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"sat": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
},
"sun": {
"enabled": true,
"slots": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 0
}
]
}
},
"continueConversations": {
"enabled": true,
"inactivityTimeout": {
"value": 15,
"unit": "minutes"
}
},
"offHoursAutoReply": {
"enabled": false,
"message": "Thanks for reaching out! We're currently outside of business hours.",
"sendNotification": false,
"notificationConfig": {
"emailNotification": {
"enabled": false,
"notifyAdmins": false,
"notifyAllUsers": false,
"notifyAssignedUser": false,
"notifySpecificUsers": false,
"specificUserIds": [],
"notifyCustomEmail": false,
"customEmail": ""
},
"contactTags": []
}
},
"followUp": {
"enabled": false,
"message": "Hi {{contact.name}}, we're here now and happy to help."
},
"employeeId": "wK36brxPYCOikC85FkbA",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z"
}
}