Skip to main content
POST
/
agent
Create an agent
curl --request POST \
  --url https://api.vocobase.com/api/v2/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_name": "Sales Assistant",
  "prompt": "<string>",
  "voice_id": "a0e99841-438c-4a64-b679-ae501e7d6091",
  "language": "en",
  "agent_type": "inbound",
  "intro_message": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "enable_recording": false,
  "kb_threshold": "medium",
  "kb_include_summaries": false,
  "kb_result_format": "<string>",
  "kb_enable_llm_processing": false,
  "kb_llm_system_prompt": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_name": "<string>",
    "prompt": "<string>",
    "voice_id": "<string>",
    "language": "<string>",
    "agent_type": "inbound",
    "intro_message": "<string>",
    "enable_recording": true,
    "kb_threshold": "low",
    "kb_include_summaries": true,
    "kb_result_format": "<string>",
    "kb_enable_llm_processing": true,
    "kb_llm_system_prompt": "<string>",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "document_count": 123,
    "status": "active",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json
agent_name
string
required

Unique agent name.

Maximum string length: 50
Example:

"Sales Assistant"

prompt
string
required

System prompt defining the agent's personality and behavior.

Maximum string length: 120000
voice_id
string
required

Cartesia voice ID from the allowed voices list.

Example:

"a0e99841-438c-4a64-b679-ae501e7d6091"

language
string
required

Language code from the partner's allowed languages.

Example:

"en"

agent_type
enum<string>
required

Whether the agent handles inbound or outbound calls.

Available options:
inbound,
outbound
intro_message
string | null

Optional greeting spoken when a call connects.

Maximum string length: 500
project_id
string<uuid> | null

Assign the agent to a specific project. Defaults to the default project if omitted.

enable_recording
boolean
default:false

Whether to record calls made with this agent.

kb_threshold
enum<string> | null
default:medium

Knowledge base search relevance threshold.

Available options:
low,
medium,
high,
null
kb_include_summaries
boolean
default:false

Include document summaries in KB search results.

kb_result_format
string | null

Custom format template for KB search results.

Maximum string length: 2000
kb_enable_llm_processing
boolean
default:false

Enable LLM post-processing of KB search results.

kb_llm_system_prompt
string | null

System prompt for LLM KB processing.

Maximum string length: 120000

Response

Agent created successfully.

success
boolean
data
object