Skip to navigation

Update AI agent

View as MarkdownOpen in Claude

Updates how an existing custom AI Agent behaves in conversations. Use it for an agent configured directly in your SignalWire project; update a linked Dialogflow resource with Update Dialogflow agent.

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.

Authentication

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Path parameters

idstringRequiredformat: "uuid"
Unique ID of an AI Agent.

Request

This endpoint expects an object.
hintslist of stringsOptional

Words and phrases that help the agent understand what the caller says. Each string is passed to speech recognition as a hint, making that word or phrase more likely to be recognized. Hints don’t change how the agent speaks; use pronounce for that.

See ai.hints in the SWML reference.

languageslist of objectsOptional

An array of JSON objects defining supported languages in the conversation. Mutually exclusive with multilingual: if both are set, multilingual is used and this array is ignored.

See ai.languages in the SWML reference.

paramsobjectOptional

A JSON object containing parameters as key-value pairs.

See ai.params in the SWML reference.

post_promptobjectOptional

The final set of instructions and configuration settings to send to the agent.

See ai.post_prompt in the SWML reference.

pronouncelist of objectsOptional

An array of JSON objects to clarify the AI’s pronunciation of words or expressions.

See ai.pronounce in the SWML reference.

promptobjectOptional

Defines the AI agent’s personality, goals, behaviors, and instructions for handling conversations. The prompt establishes how the agent should interact with callers, what information it should gather, and how it should respond to various scenarios. It is recommended to write prompts using markdown formatting.

See ai.prompt in the SWML reference.

SWAIGobjectOptional

An object that configures the functions the agent can call during the dialogue: user-defined functions, shared defaults, includes, native_functions, mcp_servers, and internal_fillers.

See ai.SWAIG in the SWML reference.

namestringOptional
Name of the AI Agent.

Response

The request has succeeded.
idstringformat: "uuid"
Unique ID of the AIAgent.
project_idstringformat: "uuid"
Unique ID of the Project.
display_namestring
Display name of the AIAgent Fabric Resource
typeenum
Type of the Fabric Resource
Allowed values:
created_atdatetime
Date and time when the resource was created.
updated_atdatetime
Date and time when the resource was updated.
ai_agentobject
AIAgent data.

Errors

422
Unprocessable Entity Error
500
Internal Server Error