> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.levrage.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.levrage.ai/_mcp/server.

# Create agent

POST https://api.levrage.ai/v1/agents
Content-Type: application/json

Create a new voice agent.

Required fields: name, agent_type, sector (industry), ai_model.
If prompt is not provided, it will be auto-generated from the agent config.

Reference: https://docs.levrage.ai/api-reference/agents/create-agent

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a CreateAgentRequest.

- `name` (string, required) — Agent name
- `agent_type` (string, required) — Agent type: sales, support, custom
- `sector` (string, required) — Industry sector (e.g. Real Estate, Finance & Banking, Healthcare, E-commerce & Retail)
- `ai_model` (string, required) — AI model: lai-premium-2, lai-premium-3, lai-premium-4
- `language` (string, optional, default: English) — Agent language: English, Hindi, Tamil, Telugu, Bengali, Gujarati, Kannada, Malayalam, Marathi
- `description` (string, optional, nullable) — Agent description
- `custom_description` (string, optional, nullable) — Custom agent description (required if agent_type=custom)
- `start_flow` (string, optional, nullable) — Opening greeting message. Auto-generated if not provided.
- `end_flow` (string, optional, nullable) — Closing message. Auto-generated if not provided.
- `tone` (string, optional, nullable, default: professional) — Agent tone: professional, friendly, casual, formal
- `agent_role` (string, optional, nullable) — Agent role title
- `voice` (string, optional, nullable) — Voice gender: male or female
- `voice_id` (string, optional, nullable) — Specific voice ID for TTS
- `accent` (string, optional, nullable) — Voice accent
- `pronunciations` (map from string to string, optional, nullable) — Custom pronunciation rules \{word: pronunciation}
- `voice_response_settings` (VoiceResponseSettings, optional, nullable) — Voice & response settings
- `background_sounds_enabled` (boolean, optional, nullable) — Office background sound during calls
- `prompt` (string, optional, nullable) — Custom agent prompt/instructions. Auto-generated if not provided.
- `details_to_collect` (list of any, optional, nullable) — Details to collect during call
- `brand_name` (string, optional, nullable) — Company/brand name
- `typed_knowledge` (string, optional, nullable) — Knowledge base text
- `timezone` (string, optional, nullable) — Agent timezone (e.g. Asia/Kolkata)
- `knowledge_base_ids` (list of string, optional, nullable) — Knowledge bases the agent searches during calls (ids from /v1/knowledge-bases)
- `webhook_config` (CreateAgentRequestWebhookConfig, optional, nullable) — Webhook configuration
- `custom_api` (list of CreateAgentRequestCustomApiItems, optional, nullable) — Custom API tool configs
- `lookup_api` (CreateAgentRequestLookupApi, optional, nullable) — Pre-call data lookup config
- `transfer_map` (list of CreateAgentRequestTransferMapItems, optional, nullable) — Human handoff phone numbers
- `other_languages` (list of string, optional, nullable) — Additional languages (e.g. ['Hindi', 'Spanish'])

## Response

### 200

Successful Response

- `data` (AgentDetail, required) — Full agent detail response.
- `request_id` (string, required)
- `timestamp` (datetime, required)
- `success` (boolean, optional, default: true)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### VoiceResponseSettings

Voice detection and response configuration for the agent.

- `listening_sensitivity` (double, optional, nullable) — Voice detection sensitivity. 0.1 = very sensitive, 1 = needs loud/clear voice. Default: 0.5
- `wait_before_responding` (integer, optional, nullable) — Padding (ms) before agent starts speaking. Default: 200ms
- `silence_to_end_turn` (integer, optional, nullable) — Silence duration (ms) to detect end of user turn. Default: 300ms
- `allow_user_to_interrupt` (boolean, optional, nullable) — Allow user to interrupt agent mid-speech. Default: true
- `words_to_interrupt` (integer, optional, nullable) — Minimum words before an interruption is accepted. Default: 2
- `min_response_wait` (double, optional, nullable) — Minimum seconds to wait before responding. Default: 0.15
- `max_response_wait` (double, optional, nullable) — Maximum seconds to wait before responding. Default: 0.3
- `fast_response` (boolean, optional, nullable) — Enable preemptive generation for faster responses. Default: true
- `voice_detection_sensitivity` (double, optional, nullable) — Voice detection threshold for premium models. Default: 0.5
- `quick_response_padding` (integer, optional, nullable) — Response padding (ms) for realtime models. Default: 200ms
- `turn_end_silence` (integer, optional, nullable) — Silence to detect end of turn in realtime models. Default: 300ms
- `vad_type` (string, optional, nullable) — VAD type: 'server_vad' (silence-based) or 'semantic_vad' (AI-based). Default: server_vad
- `eagerness` (string, optional, nullable) — For semantic_vad: 'low', 'medium', 'high', 'auto'. Default: medium
- `remind_on_silence` (boolean, optional, nullable) — Send reminders when user is silent. Default: true
- `silence_before_reminder` (integer, optional, nullable) — Seconds of silence before sending reminder. Default: 8
- `max_reminders` (integer, optional, nullable) — Max reminders before auto-disconnect. Default: 5
- `custom_reminder_messages` (list of string, optional, nullable) — Custom reminder messages. E.g. ['Hello, are you there?', 'Please say something...']
- `detect_ivr_systems` (boolean, optional, nullable) — Auto-detect IVR/voicemail systems for outbound calls. Default: true
- `enable_dtmf_input` (boolean, optional, nullable) — Enable DTMF keypress detection (press 1 for X). Default: false
- `leave_voicemail` (boolean, optional, nullable) — Leave voicemail when answering machine detected. Default: false
- `voicemail_message` (string, optional, nullable) — What to say on a voicemail, word for word. Empty = the agent words it from its instructions.
- `amd_enabled` (boolean, optional, nullable) — Outbound: listen for an answering machine or phone menu in the first seconds. Default: false
- `amd_strategy` (enum, optional, nullable) — How hard to look for a machine: fast, balanced or thorough. Default: balanced
  - Allowed values: `fast`, `balanced`, `thorough`
- `amd_max_wait_seconds` (double, optional, nullable) — Give up looking for a machine after this many seconds. Default: 6
- `amd_voicemail_action` (enum, optional, nullable) — On an answering machine: hangup, leave_message (voicemail_message) or continue. Default: hangup
  - Allowed values: `hangup`, `leave_message`, `leave_voicemail`, `continue`
- `amd_ivr_action` (enum, optional, nullable) — On a phone menu: hangup, press (keys) or continue. Default: hangup
  - Allowed values: `hangup`, `press`, `navigate`, `continue`
- `hold_detection` (boolean, optional, nullable) — When put on hold, wait for a person instead of talking to the hold system. Default: true
- `hold_timeout_seconds` (integer, optional, nullable) — Hang up after this long on hold. Default: 90
- `live_call_summary` (boolean, optional, nullable) — On a transfer, brief the person on the call before connecting the caller. Default: false
- `max_call_duration_minutes` (VoiceResponseSettingsMaxCallDurationMinutes, optional, nullable) — Auto-end call N minutes after it is answered; fractions allowed (0.5 = 30 seconds). Default: 60
- `max_duration_farewell` (string, optional, nullable) — Said just before the time limit ends the call. Empty = end without a goodbye.
- `end_call_mode` (enum, optional, nullable) — auto = the agent hangs up itself when it's done; manual = the call ends when the agent says its closing line. Default: auto
  - Allowed values: `auto`, `manual`
- `greeting_delay` (integer, optional, nullable) — Delay (seconds) before agent greets on outbound calls. Default: 0
- `wait_for_user_response` (boolean, optional, nullable) — Outbound: stay quiet until the person speaks, then greet. Default: false
- `answer_wait_timeout` (integer, optional, nullable) — With wait_for_user_response: seconds of silence before the call counts as no answer. Default: 12
- `greeting_allow_interruptions` (boolean, optional, nullable) — The caller can cut the greeting short. Default: true
- `call_analysis_enabled` (boolean, optional, nullable) — Enable post-call AI analysis (sentiment, summary). Default: true
- `qa_enabled` (boolean, optional, nullable) — Quality audit of each finished call. Default: false
- `immediate_transfer` (boolean, optional, nullable) — Immediately transfer call to human without AI interaction. Default: false
- `remember_callers` (boolean, optional, nullable) — Inbound: greet a caller from the last 90 days knowing their name and last call. Default: false
- `callback_missed_calls` (boolean, optional, nullable) — Inbound: ring back callers whose call was missed. Default: false
- `ai_disclosure` (enum, optional, nullable) — Says it is a virtual assistant: if_asked, or at_start (first reply). Unset = its instructions decide.
  - Allowed values: `if_asked`, `at_start`
- `adaptive_interruption` (boolean, optional, nullable) — Keep talking through 'haan', 'hmm', 'ok' while the caller listens. Default: true
- `repeat_when_unclear` (boolean, optional, nullable) — Ask the caller to repeat when their audio breaks up. Default: on
- `unclear_audio_threshold` (double, optional, nullable) — How unsure (0.3–0.95) before asking to repeat. Default: 0.7
- `noise_cancellation` (boolean, optional, nullable) — Filter background noise from the caller's audio. Default: false
- `backchannel_enabled` (boolean, optional, nullable) — Short acknowledgements ('mm-hmm') while the caller talks at length. Default: false
- `backchannel_phrases` (list of string, optional, nullable) — The acknowledgements to use.
- `voice_speed` (double, optional, nullable) — Speaking speed: 0.8 slower, 1.0 normal, 1.2 faster. Default: 1.0
- `remove_filler_words` (list of string, optional, nullable) — Words dropped from what the caller said before the agent reads it, e.g. ['umm', 'like'].
- `background_sound_volume` (double, optional, nullable) — Office background sound volume, 0 to 1 (agent's background_sounds_enabled turns it on). Default: 0.8
- `thinking_sound_volume` (double, optional, nullable) — Keyboard sound while the agent looks something up, 0 to 1. Default: 0.3
- `multilingual` (boolean, optional, nullable) — Reply in whichever of the agent's languages the caller speaks. Off = always the main language.
- `language_switch_mode` (enum, optional, nullable) — mirror = follow the caller turn by turn; fixed = ask once, then keep to it. Default: mirror
  - Allowed values: `mirror`, `fixed`
- `number_language` (enum, optional, nullable) — Numbers in English words, or in the language being spoken. Unset = English.
  - Allowed values: `english`, `native`
- `dialects` (map from string to string, optional, nullable) — Regional words per language, e.g. \{'telugu': 'telangana'}.
- `natural_code_mixing` (boolean, optional, nullable) — Keep everyday English words (payment, OTP) the way people say them. Default: false
- `advanced_intelligence` (boolean, optional, nullable) — Work out what the caller meant before replying. Default: false
- `response_creativity` (double, optional, nullable) — Response creativity. 0 = focused, 1 = creative. Default: 0.8
- `turn_detection` (string, optional, nullable) — Turn detection mode: 'vad', 'stt', 'semantic', 'english'. Default: vad
- `frontend_actions` (list of VoiceResponseSettingsFrontendActionsItems, optional, nullable) — List of UI actions the agent can trigger on the frontend.
- `copilot_mode` (boolean, optional, nullable) — Enable Co-Pilot mode to monitor and intervene in website sessions.
- `copilot_critical_events` (list of VoiceResponseSettingsCopilotCriticalEventsItems, optional, nullable) — List of critical user events for Co-Pilot intervention.
- `skills` (SkillsConfig, optional, nullable) — Skills the agent is built from (see GET /skills).

### CreateAgentRequestWebhookConfig

Webhook configuration

### CreateAgentRequestCustomApiItems

### CreateAgentRequestLookupApi

Pre-call data lookup config

### CreateAgentRequestTransferMapItems

### AgentDetail

Full agent detail response.

- `id` (string, required) — Agent ID
- `name` (string, required) — Agent name
- `language` (string, required) — Agent language
- `agent_type` (string, required) — Agent type: sales, support, custom
- `description` (string, optional, nullable) — Agent description
- `custom_description` (string, optional, nullable) — Custom agent description
- `sector` (string, optional, nullable) — Industry sector
- `tone` (string, optional, nullable) — Agent tone
- `agent_role` (string, optional, nullable) — Agent role
- `ai_model` (string, optional, nullable) — AI model: lai-premium-2, lai-premium-3, lai-premium-4
- `voice` (string, optional, nullable) — Voice gender (male/female)
- `voice_id` (string, optional, nullable) — Specific voice ID for TTS
- `accent` (string, optional, nullable) — Voice accent
- `pronunciations` (map from string to string, optional, nullable) — Custom pronunciation rules
- `voice_response_settings` (VoiceResponseSettings, optional, nullable) — Voice & response settings
- `background_sounds_enabled` (boolean, optional, nullable) — Office background sound during calls (volume: voice_response_settings.background_sound_volume)
- `prompt` (string, optional, nullable) — Agent instructions/prompt
- `start_flow` (string, optional, nullable) — Opening greeting
- `end_flow` (string, optional, nullable) — Closing message
- `details_to_collect` (list of any, optional, nullable) — Details to collect during call
- `brand_name` (string, optional, nullable) — Company/brand name
- `typed_knowledge` (string, optional, nullable) — Knowledge base text
- `knowledge_base_ids` (list of string, optional) — Knowledge bases the agent searches during calls
- `timezone` (string, optional, nullable) — Agent timezone
- `other_languages` (list of string, optional, nullable) — Additional languages the agent supports
- `webhook_config` (AgentDetailWebhookConfig, optional, nullable) — Webhook configuration
- `custom_api` (list of AgentDetailCustomApiItems, optional, nullable) — Custom API tool configs
- `lookup_api` (AgentDetailLookupApi, optional, nullable) — Pre-call data lookup config
- `transfer_map` (list of AgentDetailTransferMapItems, optional, nullable) — Human handoff numbers
- `conversation_flow_id` (string, optional, nullable) — The call flow the agent follows (GET /v1/flows/\{id}), when one is on
- `is_active` (boolean, optional, default: true) — Whether agent is active
- `created_at` (datetime, optional, nullable) — Creation timestamp
- `updated_at` (datetime, optional, nullable) — Last update timestamp

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### VoiceResponseSettingsMaxCallDurationMinutes

Auto-end call N minutes after it is answered; fractions allowed (0.5 = 30 seconds). Default: 60

- integer
- double

### VoiceResponseSettingsFrontendActionsItems

### VoiceResponseSettingsCopilotCriticalEventsItems

### SkillsConfig

Skills installed on the agent (GET /skills lists them). The agent's instructions are built from these on every call or chat; its own prompt is kept as notes.

- `enabled` (boolean, optional, nullable) — Build the agent from its skills.
- `installed` (list of string, optional, nullable) — Skill names, the main one first, e.g. ['payment-reminder', 'human-handoff'].
- `settings` (map from string to string, optional, nullable) — Each skill's settings by name (GET /skills shows them).
- `tools` (map from string to string, optional, nullable) — Your system's URL for a skill step, by tool name, e.g. \{'send\_payment\_link': 'https\://…'}.
- `additions` (map from string to SkillsConfigAdditions, optional, nullable) — Your own lines inside a skill, by skill name: \{steps: \{'STEP 3': text}, if\_caller\_says: \[\{says, do}], rules: \[text], collect: \[\{ask, at}]}.
- `role` (string, optional, nullable) — Job title the agent introduces itself with.

### AgentDetailWebhookConfig

Webhook configuration

### AgentDetailCustomApiItems

### AgentDetailLookupApi

Pre-call data lookup config

### AgentDetailTransferMapItems

### ValidationErrorLocItems

- string
- integer

### SkillsConfigAdditions

## Examples

**Request**

```json
{
  "name": "Acme Sales Agent",
  "agent_type": "sales",
  "sector": "Finance & Banking",
  "ai_model": "lai-premium-2",
  "language": "English",
  "start_flow": "Hello! I'm calling from Acme Finance. Am I speaking with the right person?",
  "end_flow": "Thank you for your time! Have a great day.",
  "tone": "professional",
  "voice": "female",
  "voice_response_settings": {
    "allow_user_to_interrupt": true,
    "words_to_interrupt": 2,
    "fast_response": true,
    "remind_on_silence": true,
    "silence_before_reminder": 10,
    "max_reminders": 3,
    "max_call_duration_minutes": 15,
    "response_creativity": 0.8
  },
  "details_to_collect": [
    {
      "key": "full_name",
      "type": "text",
      "description": "Customer's full name"
    },
    {
      "key": "monthly_income",
      "type": "number",
      "description": "Monthly income in INR"
    },
    {
      "key": "email",
      "type": "email",
      "description": "Email address for follow-up"
    }
  ],
  "brand_name": "Acme Finance",
  "typed_knowledge": "Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.",
  "timezone": "Asia/Kolkata",
  "webhook_config": {
    "url": "https://api.yourcompany.com/webhooks/levrage",
    "events": [
      "call.completed",
      "call.failed"
    ]
  },
  "lookup_api": {
    "enabled": true,
    "api_name": "Customer CRM Lookup",
    "api_url": "https://api.yourcompany.com/customers",
    "method": "GET",
    "query_params": [
      {
        "key": "phone",
        "value": "{number}",
        "is_variable": true
      }
    ],
    "headers": [
      {
        "key": "Authorization",
        "value": "Bearer your_crm_api_key",
        "is_variable": false
      }
    ],
    "timeout_seconds": 10,
    "retry_count": 1
  },
  "transfer_map": [
    {
      "name": "Sales Manager",
      "number": "9876543210",
      "country_code": "+91",
      "category": "escalation"
    }
  ],
  "other_languages": [
    "Hindi"
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Sales Agent",
    "language": "English",
    "agent_type": "sales",
    "description": null,
    "custom_description": null,
    "sector": "Finance & Banking",
    "tone": "professional",
    "agent_role": null,
    "ai_model": "lai-premium-2",
    "voice": "female",
    "voice_id": null,
    "accent": null,
    "pronunciations": null,
    "voice_response_settings": {
      "listening_sensitivity": 0.5,
      "wait_before_responding": 200,
      "silence_to_end_turn": 300,
      "allow_user_to_interrupt": true,
      "words_to_interrupt": 2,
      "min_response_wait": 0.15,
      "max_response_wait": 0.3,
      "fast_response": true,
      "voice_detection_sensitivity": 0.5,
      "quick_response_padding": 200,
      "turn_end_silence": 300,
      "vad_type": "server_vad",
      "eagerness": "medium",
      "remind_on_silence": true,
      "silence_before_reminder": 10,
      "max_reminders": 3,
      "custom_reminder_messages": null,
      "detect_ivr_systems": true,
      "enable_dtmf_input": false,
      "leave_voicemail": false,
      "max_call_duration_minutes": 15,
      "greeting_delay": 0,
      "call_analysis_enabled": true,
      "immediate_transfer": false,
      "response_creativity": 0.8,
      "turn_detection": "vad"
    },
    "prompt": "You are an AI sales agent for Acme Finance. Greet the customer warmly, qualify their interest in personal loans, and collect their details for follow-up.",
    "start_flow": "Hello! I'm calling from Acme Finance. Am I speaking with the right person?",
    "end_flow": "Thank you for your time! Have a great day.",
    "details_to_collect": [
      {
        "key": "full_name",
        "type": "text",
        "description": "Customer's full name"
      },
      {
        "key": "monthly_income",
        "type": "number",
        "description": "Monthly income in INR"
      },
      {
        "key": "email",
        "type": "email",
        "description": "Email address for follow-up"
      }
    ],
    "brand_name": "Acme Finance",
    "typed_knowledge": "Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.",
    "timezone": "Asia/Kolkata",
    "other_languages": [
      "Hindi"
    ],
    "webhook_config": {
      "url": "https://api.yourcompany.com/webhooks/levrage",
      "events": [
        "call.completed",
        "call.failed"
      ]
    },
    "custom_api": [],
    "lookup_api": {
      "enabled": true,
      "api_name": "Customer CRM Lookup",
      "api_url": "https://api.yourcompany.com/customers",
      "method": "GET",
      "query_params": [
        {
          "key": "phone",
          "value": "{number}",
          "is_variable": true
        }
      ],
      "headers": [
        {
          "key": "Authorization",
          "value": "Bearer your_crm_api_key",
          "is_variable": false
        }
      ],
      "timeout_seconds": 10,
      "retry_count": 1
    },
    "transfer_map": [
      {
        "name": "Sales Manager",
        "number": "9876543210",
        "country_code": "+91",
        "category": "escalation"
      }
    ],
    "is_active": true,
    "created_at": "2026-01-15T09:30:00+05:30",
    "updated_at": "2026-01-15T09:30:00+05:30"
  },
  "request_id": "req_a1b2c3d4e5f6",
  "timestamp": "2026-01-15T09:30:00+05:30",
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://api.levrage.ai/v1/agents"

payload = {
    "name": "Acme Sales Agent",
    "agent_type": "sales",
    "sector": "Finance & Banking",
    "ai_model": "lai-premium-2",
    "language": "English",
    "start_flow": "Hello! I'm calling from Acme Finance. Am I speaking with the right person?",
    "end_flow": "Thank you for your time! Have a great day.",
    "tone": "professional",
    "voice": "female",
    "voice_response_settings": {
        "allow_user_to_interrupt": True,
        "words_to_interrupt": 2,
        "fast_response": True,
        "remind_on_silence": True,
        "silence_before_reminder": 10,
        "max_reminders": 3,
        "max_call_duration_minutes": 15,
        "response_creativity": 0.8
    },
    "details_to_collect": [
        {
            "key": "full_name",
            "type": "text",
            "description": "Customer's full name"
        },
        {
            "key": "monthly_income",
            "type": "number",
            "description": "Monthly income in INR"
        },
        {
            "key": "email",
            "type": "email",
            "description": "Email address for follow-up"
        }
    ],
    "brand_name": "Acme Finance",
    "typed_knowledge": "Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.",
    "timezone": "Asia/Kolkata",
    "webhook_config": {
        "url": "https://api.yourcompany.com/webhooks/levrage",
        "events": ["call.completed", "call.failed"]
    },
    "lookup_api": {
        "enabled": True,
        "api_name": "Customer CRM Lookup",
        "api_url": "https://api.yourcompany.com/customers",
        "method": "GET",
        "query_params": [
            {
                "key": "phone",
                "value": "{number}",
                "is_variable": True
            }
        ],
        "headers": [
            {
                "key": "Authorization",
                "value": "Bearer your_crm_api_key",
                "is_variable": False
            }
        ],
        "timeout_seconds": 10,
        "retry_count": 1
    },
    "transfer_map": [
        {
            "name": "Sales Manager",
            "number": "9876543210",
            "country_code": "+91",
            "category": "escalation"
        }
    ],
    "other_languages": ["Hindi"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.levrage.ai/v1/agents';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Acme Sales Agent","agent_type":"sales","sector":"Finance & Banking","ai_model":"lai-premium-2","language":"English","start_flow":"Hello! I\'m calling from Acme Finance. Am I speaking with the right person?","end_flow":"Thank you for your time! Have a great day.","tone":"professional","voice":"female","voice_response_settings":{"allow_user_to_interrupt":true,"words_to_interrupt":2,"fast_response":true,"remind_on_silence":true,"silence_before_reminder":10,"max_reminders":3,"max_call_duration_minutes":15,"response_creativity":0.8},"details_to_collect":[{"key":"full_name","type":"text","description":"Customer\'s full name"},{"key":"monthly_income","type":"number","description":"Monthly income in INR"},{"key":"email","type":"email","description":"Email address for follow-up"}],"brand_name":"Acme Finance","typed_knowledge":"Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.","timezone":"Asia/Kolkata","webhook_config":{"url":"https://api.yourcompany.com/webhooks/levrage","events":["call.completed","call.failed"]},"lookup_api":{"enabled":true,"api_name":"Customer CRM Lookup","api_url":"https://api.yourcompany.com/customers","method":"GET","query_params":[{"key":"phone","value":"{number}","is_variable":true}],"headers":[{"key":"Authorization","value":"Bearer your_crm_api_key","is_variable":false}],"timeout_seconds":10,"retry_count":1},"transfer_map":[{"name":"Sales Manager","number":"9876543210","country_code":"+91","category":"escalation"}],"other_languages":["Hindi"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.levrage.ai/v1/agents"

	payload := strings.NewReader("{\n  \"name\": \"Acme Sales Agent\",\n  \"agent_type\": \"sales\",\n  \"sector\": \"Finance & Banking\",\n  \"ai_model\": \"lai-premium-2\",\n  \"language\": \"English\",\n  \"start_flow\": \"Hello! I'm calling from Acme Finance. Am I speaking with the right person?\",\n  \"end_flow\": \"Thank you for your time! Have a great day.\",\n  \"tone\": \"professional\",\n  \"voice\": \"female\",\n  \"voice_response_settings\": {\n    \"allow_user_to_interrupt\": true,\n    \"words_to_interrupt\": 2,\n    \"fast_response\": true,\n    \"remind_on_silence\": true,\n    \"silence_before_reminder\": 10,\n    \"max_reminders\": 3,\n    \"max_call_duration_minutes\": 15,\n    \"response_creativity\": 0.8\n  },\n  \"details_to_collect\": [\n    {\n      \"key\": \"full_name\",\n      \"type\": \"text\",\n      \"description\": \"Customer's full name\"\n    },\n    {\n      \"key\": \"monthly_income\",\n      \"type\": \"number\",\n      \"description\": \"Monthly income in INR\"\n    },\n    {\n      \"key\": \"email\",\n      \"type\": \"email\",\n      \"description\": \"Email address for follow-up\"\n    }\n  ],\n  \"brand_name\": \"Acme Finance\",\n  \"typed_knowledge\": \"Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.\",\n  \"timezone\": \"Asia/Kolkata\",\n  \"webhook_config\": {\n    \"url\": \"https://api.yourcompany.com/webhooks/levrage\",\n    \"events\": [\n      \"call.completed\",\n      \"call.failed\"\n    ]\n  },\n  \"lookup_api\": {\n    \"enabled\": true,\n    \"api_name\": \"Customer CRM Lookup\",\n    \"api_url\": \"https://api.yourcompany.com/customers\",\n    \"method\": \"GET\",\n    \"query_params\": [\n      {\n        \"key\": \"phone\",\n        \"value\": \"{number}\",\n        \"is_variable\": true\n      }\n    ],\n    \"headers\": [\n      {\n        \"key\": \"Authorization\",\n        \"value\": \"Bearer your_crm_api_key\",\n        \"is_variable\": false\n      }\n    ],\n    \"timeout_seconds\": 10,\n    \"retry_count\": 1\n  },\n  \"transfer_map\": [\n    {\n      \"name\": \"Sales Manager\",\n      \"number\": \"9876543210\",\n      \"country_code\": \"+91\",\n      \"category\": \"escalation\"\n    }\n  ],\n  \"other_languages\": [\n    \"Hindi\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.levrage.ai/v1/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Acme Sales Agent\",\n  \"agent_type\": \"sales\",\n  \"sector\": \"Finance & Banking\",\n  \"ai_model\": \"lai-premium-2\",\n  \"language\": \"English\",\n  \"start_flow\": \"Hello! I'm calling from Acme Finance. Am I speaking with the right person?\",\n  \"end_flow\": \"Thank you for your time! Have a great day.\",\n  \"tone\": \"professional\",\n  \"voice\": \"female\",\n  \"voice_response_settings\": {\n    \"allow_user_to_interrupt\": true,\n    \"words_to_interrupt\": 2,\n    \"fast_response\": true,\n    \"remind_on_silence\": true,\n    \"silence_before_reminder\": 10,\n    \"max_reminders\": 3,\n    \"max_call_duration_minutes\": 15,\n    \"response_creativity\": 0.8\n  },\n  \"details_to_collect\": [\n    {\n      \"key\": \"full_name\",\n      \"type\": \"text\",\n      \"description\": \"Customer's full name\"\n    },\n    {\n      \"key\": \"monthly_income\",\n      \"type\": \"number\",\n      \"description\": \"Monthly income in INR\"\n    },\n    {\n      \"key\": \"email\",\n      \"type\": \"email\",\n      \"description\": \"Email address for follow-up\"\n    }\n  ],\n  \"brand_name\": \"Acme Finance\",\n  \"typed_knowledge\": \"Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.\",\n  \"timezone\": \"Asia/Kolkata\",\n  \"webhook_config\": {\n    \"url\": \"https://api.yourcompany.com/webhooks/levrage\",\n    \"events\": [\n      \"call.completed\",\n      \"call.failed\"\n    ]\n  },\n  \"lookup_api\": {\n    \"enabled\": true,\n    \"api_name\": \"Customer CRM Lookup\",\n    \"api_url\": \"https://api.yourcompany.com/customers\",\n    \"method\": \"GET\",\n    \"query_params\": [\n      {\n        \"key\": \"phone\",\n        \"value\": \"{number}\",\n        \"is_variable\": true\n      }\n    ],\n    \"headers\": [\n      {\n        \"key\": \"Authorization\",\n        \"value\": \"Bearer your_crm_api_key\",\n        \"is_variable\": false\n      }\n    ],\n    \"timeout_seconds\": 10,\n    \"retry_count\": 1\n  },\n  \"transfer_map\": [\n    {\n      \"name\": \"Sales Manager\",\n      \"number\": \"9876543210\",\n      \"country_code\": \"+91\",\n      \"category\": \"escalation\"\n    }\n  ],\n  \"other_languages\": [\n    \"Hindi\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.levrage.ai/v1/agents")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Acme Sales Agent\",\n  \"agent_type\": \"sales\",\n  \"sector\": \"Finance & Banking\",\n  \"ai_model\": \"lai-premium-2\",\n  \"language\": \"English\",\n  \"start_flow\": \"Hello! I'm calling from Acme Finance. Am I speaking with the right person?\",\n  \"end_flow\": \"Thank you for your time! Have a great day.\",\n  \"tone\": \"professional\",\n  \"voice\": \"female\",\n  \"voice_response_settings\": {\n    \"allow_user_to_interrupt\": true,\n    \"words_to_interrupt\": 2,\n    \"fast_response\": true,\n    \"remind_on_silence\": true,\n    \"silence_before_reminder\": 10,\n    \"max_reminders\": 3,\n    \"max_call_duration_minutes\": 15,\n    \"response_creativity\": 0.8\n  },\n  \"details_to_collect\": [\n    {\n      \"key\": \"full_name\",\n      \"type\": \"text\",\n      \"description\": \"Customer's full name\"\n    },\n    {\n      \"key\": \"monthly_income\",\n      \"type\": \"number\",\n      \"description\": \"Monthly income in INR\"\n    },\n    {\n      \"key\": \"email\",\n      \"type\": \"email\",\n      \"description\": \"Email address for follow-up\"\n    }\n  ],\n  \"brand_name\": \"Acme Finance\",\n  \"typed_knowledge\": \"Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.\",\n  \"timezone\": \"Asia/Kolkata\",\n  \"webhook_config\": {\n    \"url\": \"https://api.yourcompany.com/webhooks/levrage\",\n    \"events\": [\n      \"call.completed\",\n      \"call.failed\"\n    ]\n  },\n  \"lookup_api\": {\n    \"enabled\": true,\n    \"api_name\": \"Customer CRM Lookup\",\n    \"api_url\": \"https://api.yourcompany.com/customers\",\n    \"method\": \"GET\",\n    \"query_params\": [\n      {\n        \"key\": \"phone\",\n        \"value\": \"{number}\",\n        \"is_variable\": true\n      }\n    ],\n    \"headers\": [\n      {\n        \"key\": \"Authorization\",\n        \"value\": \"Bearer your_crm_api_key\",\n        \"is_variable\": false\n      }\n    ],\n    \"timeout_seconds\": 10,\n    \"retry_count\": 1\n  },\n  \"transfer_map\": [\n    {\n      \"name\": \"Sales Manager\",\n      \"number\": \"9876543210\",\n      \"country_code\": \"+91\",\n      \"category\": \"escalation\"\n    }\n  ],\n  \"other_languages\": [\n    \"Hindi\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.levrage.ai/v1/agents', [
  'body' => '{
  "name": "Acme Sales Agent",
  "agent_type": "sales",
  "sector": "Finance & Banking",
  "ai_model": "lai-premium-2",
  "language": "English",
  "start_flow": "Hello! I\'m calling from Acme Finance. Am I speaking with the right person?",
  "end_flow": "Thank you for your time! Have a great day.",
  "tone": "professional",
  "voice": "female",
  "voice_response_settings": {
    "allow_user_to_interrupt": true,
    "words_to_interrupt": 2,
    "fast_response": true,
    "remind_on_silence": true,
    "silence_before_reminder": 10,
    "max_reminders": 3,
    "max_call_duration_minutes": 15,
    "response_creativity": 0.8
  },
  "details_to_collect": [
    {
      "key": "full_name",
      "type": "text",
      "description": "Customer\'s full name"
    },
    {
      "key": "monthly_income",
      "type": "number",
      "description": "Monthly income in INR"
    },
    {
      "key": "email",
      "type": "email",
      "description": "Email address for follow-up"
    }
  ],
  "brand_name": "Acme Finance",
  "typed_knowledge": "Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.",
  "timezone": "Asia/Kolkata",
  "webhook_config": {
    "url": "https://api.yourcompany.com/webhooks/levrage",
    "events": [
      "call.completed",
      "call.failed"
    ]
  },
  "lookup_api": {
    "enabled": true,
    "api_name": "Customer CRM Lookup",
    "api_url": "https://api.yourcompany.com/customers",
    "method": "GET",
    "query_params": [
      {
        "key": "phone",
        "value": "{number}",
        "is_variable": true
      }
    ],
    "headers": [
      {
        "key": "Authorization",
        "value": "Bearer your_crm_api_key",
        "is_variable": false
      }
    ],
    "timeout_seconds": 10,
    "retry_count": 1
  },
  "transfer_map": [
    {
      "name": "Sales Manager",
      "number": "9876543210",
      "country_code": "+91",
      "category": "escalation"
    }
  ],
  "other_languages": [
    "Hindi"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.levrage.ai/v1/agents");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Acme Sales Agent\",\n  \"agent_type\": \"sales\",\n  \"sector\": \"Finance & Banking\",\n  \"ai_model\": \"lai-premium-2\",\n  \"language\": \"English\",\n  \"start_flow\": \"Hello! I'm calling from Acme Finance. Am I speaking with the right person?\",\n  \"end_flow\": \"Thank you for your time! Have a great day.\",\n  \"tone\": \"professional\",\n  \"voice\": \"female\",\n  \"voice_response_settings\": {\n    \"allow_user_to_interrupt\": true,\n    \"words_to_interrupt\": 2,\n    \"fast_response\": true,\n    \"remind_on_silence\": true,\n    \"silence_before_reminder\": 10,\n    \"max_reminders\": 3,\n    \"max_call_duration_minutes\": 15,\n    \"response_creativity\": 0.8\n  },\n  \"details_to_collect\": [\n    {\n      \"key\": \"full_name\",\n      \"type\": \"text\",\n      \"description\": \"Customer's full name\"\n    },\n    {\n      \"key\": \"monthly_income\",\n      \"type\": \"number\",\n      \"description\": \"Monthly income in INR\"\n    },\n    {\n      \"key\": \"email\",\n      \"type\": \"email\",\n      \"description\": \"Email address for follow-up\"\n    }\n  ],\n  \"brand_name\": \"Acme Finance\",\n  \"typed_knowledge\": \"Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.\",\n  \"timezone\": \"Asia/Kolkata\",\n  \"webhook_config\": {\n    \"url\": \"https://api.yourcompany.com/webhooks/levrage\",\n    \"events\": [\n      \"call.completed\",\n      \"call.failed\"\n    ]\n  },\n  \"lookup_api\": {\n    \"enabled\": true,\n    \"api_name\": \"Customer CRM Lookup\",\n    \"api_url\": \"https://api.yourcompany.com/customers\",\n    \"method\": \"GET\",\n    \"query_params\": [\n      {\n        \"key\": \"phone\",\n        \"value\": \"{number}\",\n        \"is_variable\": true\n      }\n    ],\n    \"headers\": [\n      {\n        \"key\": \"Authorization\",\n        \"value\": \"Bearer your_crm_api_key\",\n        \"is_variable\": false\n      }\n    ],\n    \"timeout_seconds\": 10,\n    \"retry_count\": 1\n  },\n  \"transfer_map\": [\n    {\n      \"name\": \"Sales Manager\",\n      \"number\": \"9876543210\",\n      \"country_code\": \"+91\",\n      \"category\": \"escalation\"\n    }\n  ],\n  \"other_languages\": [\n    \"Hindi\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Acme Sales Agent",
  "agent_type": "sales",
  "sector": "Finance & Banking",
  "ai_model": "lai-premium-2",
  "language": "English",
  "start_flow": "Hello! I'm calling from Acme Finance. Am I speaking with the right person?",
  "end_flow": "Thank you for your time! Have a great day.",
  "tone": "professional",
  "voice": "female",
  "voice_response_settings": [
    "allow_user_to_interrupt": true,
    "words_to_interrupt": 2,
    "fast_response": true,
    "remind_on_silence": true,
    "silence_before_reminder": 10,
    "max_reminders": 3,
    "max_call_duration_minutes": 15,
    "response_creativity": 0.8
  ],
  "details_to_collect": [
    [
      "key": "full_name",
      "type": "text",
      "description": "Customer's full name"
    ],
    [
      "key": "monthly_income",
      "type": "number",
      "description": "Monthly income in INR"
    ],
    [
      "key": "email",
      "type": "email",
      "description": "Email address for follow-up"
    ]
  ],
  "brand_name": "Acme Finance",
  "typed_knowledge": "Personal loan products from 50,000 to 25,00,000 INR. Interest rates starting at 10.5% p.a.",
  "timezone": "Asia/Kolkata",
  "webhook_config": [
    "url": "https://api.yourcompany.com/webhooks/levrage",
    "events": ["call.completed", "call.failed"]
  ],
  "lookup_api": [
    "enabled": true,
    "api_name": "Customer CRM Lookup",
    "api_url": "https://api.yourcompany.com/customers",
    "method": "GET",
    "query_params": [
      [
        "key": "phone",
        "value": "{number}",
        "is_variable": true
      ]
    ],
    "headers": [
      [
        "key": "Authorization",
        "value": "Bearer your_crm_api_key",
        "is_variable": false
      ]
    ],
    "timeout_seconds": 10,
    "retry_count": 1
  ],
  "transfer_map": [
    [
      "name": "Sales Manager",
      "number": "9876543210",
      "country_code": "+91",
      "category": "escalation"
    ]
  ],
  "other_languages": ["Hindi"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.levrage.ai/v1/agents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```