Skip to main content
POST
Create Agent

Overview

Creates a new AI agent that can handle phone calls, SMS messages, and chat conversations. Agents are fully customizable with their own personality, voice, and capabilities.

Request

Headers

string
required
Bearer token — either a Supabase JWT or a mgp_ API key.
string
required
Must be application/json

Body Parameters

string
required
Display name for the agent.Example: "Reception Agent"Constraints:
  • 1-100 characters
string
The message the agent says when answering a call.Example: "Hello, thanks for calling Acme Corp. How can I help you today?"Constraints:
  • Maximum 500 characters
  • Should be under 15 seconds when spoken
string
Instructions that define the agent’s personality, knowledge, and behavior. This is the most important setting for customizing agent responses.Example:
Constraints:
  • Maximum 10,000 characters
  • Supports markdown formatting
string
ID of the voice to use for phone calls. Use the List Voices endpoint to get all available options, including any cloned voices on your account.ElevenLabs voices:OpenAI voices (prefix openai-):Default: EXAVITQu4vr4xnSDxMaL (Sarah)
string
LLM model for conversations. Use the List Models endpoint to get all available options.Default: gpt-4.1
string
Primary language for the agent.Default: en-USSupported: en-US, en-GB, es-ES, fr-FR, de-DE
string
The channel type this agent handles.Default: inbound_voice
string
Name of the organization the agent represents.Example: "Acme Corp"
string
Name of the agent’s owner.Example: "Jane Smith"
string
Description of the agent’s role.Example: "Front desk receptionist"
string
Phone number to transfer calls to when requested.Example: "+14155551234"
boolean
Whether the agent is active and can receive calls.Default: true
number
LLM temperature for response creativity.Default: 0.7Range: 0 to 1
object
Configuration for agent functions (capabilities) the agent can use during calls.

end_call

transfer

Transfer number format:

sms

extract_data

booking

Example:
array
Dynamic variables for extracting structured data from conversations. These are stored separately from the agent config and define what information the AI should capture during calls.Each variable object:
  • name (string, required) — Variable name (e.g., caller_name)
  • description (string) — What to extract
  • var_type (string) — text (default), number, boolean, or enum
  • enum_options (array) — Required when var_type is enum
You can also manage dynamic variables independently via the Dynamic Variables API.

Response

Returns the full agent object wrapped in an agent key.
object

Example Request

Example Response

Error Responses