Create AI agent
Changed onCreates a custom AI Agent in your SignalWire project. The new agent becomes a reusable Fabric resource for conversational calls and can be reached through resource addresses or assigned as a call handler. Use a Dialogflow Agent for an existing Dialogflow integration, or Create call flow for visual, deterministic call logic.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.
Learn more about API scopes.
Request
- Base URLhttps://{Your_Space_Name}.signalwire.com
- URLhttps://{Your_Space_Name}.signalwire.com/api/fabric/resources/ai_agents
- AuthHTTP basic
Request body
Example request
{
"hints": [
"pizza",
"pepperoni"
],
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "rime.spore"
}
],
"params": {
"ai_model": "gpt-4o-mini",
"wait_for_user": true
},
"post_prompt": {
"text": "Summarize the conversation and provide any follow-up action items."
},
"pronounce": [
{
"replace": "SWML",
"with": "swim-el",
"ignore_case": true
}
],
"prompt": {
"text": "You are a helpful customer support assistant."
},
"SWAIG": {
"native_functions": [
"check_time"
]
},
"name": "My AI Agent"
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"display_name": "Booking Assistant",
"type": "ai_agent",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:20:00Z",
"ai_agent": {
"hints": [
"pizza",
"pepperoni"
],
"languages": [
{
"name": "English",
"code": "en-US",
"voice": "rime.spore"
}
],
"params": {
"ai_model": "gpt-4o-mini",
"wait_for_user": true
},
"post_prompt": {
"text": "Summarize the conversation and provide any follow-up action items."
},
"pronounce": [
{
"replace": "SWML",
"with": "swim-el",
"ignore_case": true
}
],
"prompt": {
"text": "You are a helpful customer support assistant."
},
"SWAIG": {
"native_functions": [
"check_time"
]
},
"name": "My AI Agent"
}
}Changes
- breaking
request property
/list-of-types was narrowed by removing typesobjectfrom media typeapplication/json - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - info
response property
ai_agent/allOf[subschema #1: AI Agent]/hints/items/list-of-types was narrowed by removing typesobjectfrom media typeapplication/jsonof response201
- breaking
- breaking
removed from the
/request propertyanyOflist - breaking
the
request property type changed from no type toobject - breaking
the
request property type changed from no type toobject - breaking
the
request property type changed from no type toobject - breaking
the
request property type changed from no type toobject - breaking
the
request property type changed from no type toobject - breaking
the
request property type changed from no type toobject - breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
added 'unevaluatedProperties' constraint to the request property
- breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
the
//response's property type changed from no type toobjectfor status - breaking
removed the required property
////from the response with the status - breaking
removed the required property
////from the response with the status - breaking
removed the required property
////from the response with the status - breaking
removed the required property
////from the response with the status - breaking
removed the required property
////from the response with the status - warning
removed from the
request propertyallOflist - warning
removed from the
request propertyallOflist - warning
removed from the
request propertyallOflist - warning
removed from the
request propertyallOflist - warning
removed from the
request propertyallOflist - warning
removed from the
request propertyallOflist - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the request property
// - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
////from the response with the status - info
added
subschema #2to the/request propertyanyOflist - info
removed from the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status - info
added
subschema #2to the///response propertyanyOflist for the response status - info
removed from the
///response propertyanyOflist for the response status - info
added 'unevaluatedProperties' constraint to the
//response property for the status - info
added 'unevaluatedProperties' constraint to the
//response property for the status - info
added 'unevaluatedProperties' constraint to the
//response property for the status - info
added 'unevaluatedProperties' constraint to the
//response property for the status - info
added 'unevaluatedProperties' constraint to the
//response property for the status - info
added 'unevaluatedProperties' constraint to the
//response property for the status
- breaking
Some revisions have not been checked yet.