@retell-ai/mcp-server 5.31.0 → 5.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/code-tool.d.mts.map +1 -1
  2. package/code-tool.d.ts.map +1 -1
  3. package/code-tool.js +2 -53
  4. package/code-tool.js.map +1 -1
  5. package/code-tool.mjs +3 -54
  6. package/code-tool.mjs.map +1 -1
  7. package/docs-search-tool.d.mts.map +1 -1
  8. package/docs-search-tool.d.ts.map +1 -1
  9. package/docs-search-tool.js +1 -41
  10. package/docs-search-tool.js.map +1 -1
  11. package/docs-search-tool.mjs +1 -41
  12. package/docs-search-tool.mjs.map +1 -1
  13. package/instructions.d.mts.map +1 -1
  14. package/instructions.d.ts.map +1 -1
  15. package/instructions.js +2 -18
  16. package/instructions.js.map +1 -1
  17. package/instructions.mjs +2 -18
  18. package/instructions.mjs.map +1 -1
  19. package/local-docs-search.js +8 -8
  20. package/local-docs-search.js.map +1 -1
  21. package/local-docs-search.mjs +8 -8
  22. package/local-docs-search.mjs.map +1 -1
  23. package/methods.js +140 -140
  24. package/methods.js.map +1 -1
  25. package/methods.mjs +140 -140
  26. package/methods.mjs.map +1 -1
  27. package/options.d.mts +2 -2
  28. package/options.d.mts.map +1 -1
  29. package/options.d.ts +2 -2
  30. package/options.d.ts.map +1 -1
  31. package/options.js +6 -6
  32. package/options.js.map +1 -1
  33. package/options.mjs +6 -6
  34. package/options.mjs.map +1 -1
  35. package/package.json +2 -2
  36. package/server.js +1 -1
  37. package/server.js.map +1 -1
  38. package/server.mjs +1 -1
  39. package/server.mjs.map +1 -1
  40. package/src/code-tool.ts +4 -83
  41. package/src/docs-search-tool.ts +2 -61
  42. package/src/instructions.ts +2 -28
  43. package/src/local-docs-search.ts +8 -8
  44. package/src/methods.ts +140 -140
  45. package/src/options.ts +9 -9
  46. package/src/server.ts +1 -1
@@ -609,7 +609,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
609
609
  response:
610
610
  "{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
611
611
  markdown:
612
- "## create\n\n`client.phoneNumber.create(allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], area_code?: number, country_code?: 'US' | 'CA', fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, number_provider?: 'twilio' | 'telnyx', outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], phone_number?: string, toll_free?: boolean, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/create-phone-number`\n\nBuy a new phone number & Bind agents\n\n### Parameters\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `area_code?: number`\n Area code of the number to obtain. Format is a 3 digit integer. Currently only supports US area code.\n\n- `country_code?: 'US' | 'CA'`\n The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If left empty, will default to \"US\".\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode or when an inbound call cannot get a concurrency slot before the fallback timeout. Can be either a Retell phone number or an external number. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `number_provider?: 'twilio' | 'telnyx'`\n The provider to purchase the phone number from. Default to twilio.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `phone_number?: string`\n The number you are trying to purchase in E.164 format of the number (+country code then number with no space and no special characters).\n\n- `toll_free?: boolean`\n Whether to purchase a toll-free number. Toll-free numbers incur higher costs.\n\n- `transport?: string`\n Outbound transport protocol to use for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse);\n```",
612
+ "## create\n\n`client.phoneNumber.create(allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], area_code?: number, country_code?: 'US' | 'CA', fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, number_provider?: 'twilio' | 'telnyx', outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], phone_number?: string, toll_free?: boolean, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/create-phone-number`\n\nBuy a new phone number & Bind agents\n\n### Parameters\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `area_code?: number`\n Area code of the number to obtain. Format is a 3 digit integer. Currently only supports US area code.\n\n- `country_code?: 'US' | 'CA'`\n The ISO 3166-1 alpha-2 country code of the number you are trying to purchase. If left empty, will default to \"US\".\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode or when an inbound call cannot get a concurrency slot before the fallback timeout. Can be either a Retell phone number or an external number. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `number_provider?: 'twilio' | 'telnyx'`\n The provider to purchase the phone number from. Default to twilio.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `phone_number?: string`\n The number you are trying to purchase in E.164 format of the number (+country code then number with no space and no special characters).\n\n- `toll_free?: boolean`\n Whether to purchase a toll-free number. Toll-free numbers incur higher costs.\n\n- `transport?: string`\n Outbound transport protocol to use for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.create();\n\nconsole.log(phoneNumberResponse);\n```",
613
613
  perLanguage: {
614
614
  typescript: {
615
615
  method: 'client.phoneNumber.create',
@@ -652,7 +652,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
652
652
  response:
653
653
  "{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
654
654
  markdown:
655
- "## import\n\n`client.phoneNumber.import(phone_number: string, termination_uri: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], ignore_e164_validation?: boolean, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], sip_trunk_auth_password?: string, sip_trunk_auth_username?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/import-phone-number`\n\nImport a phone number from custom telephony & Bind agents\n\n### Parameters\n\n- `phone_number: string`\n The number you are trying to import in E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.\n\n- `termination_uri: string`\n The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with \".pstn.twilio.com\".\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `ignore_e164_validation?: boolean`\n If true, E.164 validation for phone_number is skipped. This is useful for internal pseudo numbers when using custom telephony. If omitted, default is true. Must be a boolean literal; string values like \"true\" or \"false\" are invalid.\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `sip_trunk_auth_password?: string`\n The password used for authentication for the SIP trunk.\n\n- `sip_trunk_auth_username?: string`\n The username used for authentication for the SIP trunk.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.import({ phone_number: '+14157774444', termination_uri: 'someuri.pstn.twilio.com' });\n\nconsole.log(phoneNumberResponse);\n```",
655
+ "## import\n\n`client.phoneNumber.import(phone_number: string, termination_uri: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], ignore_e164_validation?: boolean, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], sip_trunk_auth_password?: string, sip_trunk_auth_username?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**post** `/import-phone-number`\n\nImport a phone number from custom telephony & Bind agents\n\n### Parameters\n\n- `phone_number: string`\n The number you are trying to import in E.164 format of the number (+country code, then number with no space, no special characters), used as the unique identifier for phone number APIs.\n\n- `termination_uri: string`\n The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with \".pstn.twilio.com\".\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `ignore_e164_validation?: boolean`\n If true, E.164 validation for phone_number is skipped. This is useful for internal pseudo numbers when using custom telephony. If omitted, default is true. Must be a boolean literal; string values like \"true\" or \"false\" are invalid.\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `sip_trunk_auth_password?: string`\n The password used for authentication for the SIP trunk.\n\n- `sip_trunk_auth_username?: string`\n The username used for authentication for the SIP trunk.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.import({ phone_number: '+14157774444', termination_uri: 'someuri.pstn.twilio.com' });\n\nconsole.log(phoneNumberResponse);\n```",
656
656
  perLanguage: {
657
657
  typescript: {
658
658
  method: 'client.phoneNumber.import',
@@ -758,7 +758,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
758
758
  response:
759
759
  "{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }",
760
760
  markdown:
761
- "## update\n\n`client.phoneNumber.update(phone_number: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], auth_password?: string, auth_username?: string, fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_webhook_url?: string, inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], termination_uri?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**patch** `/update-phone-number/{phone_number}`\n\nUpdate agent bound to a purchased phone number\n\n### Parameters\n\n- `phone_number: string`\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `auth_password?: string`\n The password used for authentication for the SIP trunk to update for the phone number.\n\n- `auth_username?: string`\n The username used for authentication for the SIP trunk to update for the phone number.\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode or when an inbound call cannot get a concurrency slot before the fallback timeout. Can be either a Retell phone number or an external number. Set to null to remove. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_sms_agent_id.\n\n- `inbound_sms_webhook_url?: string`\n If set, will send a webhook for inbound SMS, where you can override agent id, set dynamic variables and other fields specific to that chat.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_sms_agent_id.\n\n- `termination_uri?: string`\n The termination uri to update for the phone number. This is used for outbound calls.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444');\n\nconsole.log(phoneNumberResponse);\n```",
761
+ "## update\n\n`client.phoneNumber.update(phone_number: string, allowed_inbound_country_list?: string[], allowed_outbound_country_list?: string[], auth_password?: string, auth_username?: string, fallback_number?: string, inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], inbound_sms_webhook_url?: string, inbound_webhook_url?: string, nickname?: string, outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[], termination_uri?: string, transport?: string): { last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: object[]; inbound_sms_agents?: object[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: object[]; outbound_sms_agents?: object[]; phone_number_pretty?: string; sip_outbound_trunk_config?: object; }`\n\n**patch** `/update-phone-number/{phone_number}`\n\nUpdate agent bound to a purchased phone number\n\n### Parameters\n\n- `phone_number: string`\n\n- `allowed_inbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes from which inbound calls are allowed. If not set or empty, calls from all countries are allowed.\n\n- `allowed_outbound_country_list?: string[]`\n List of ISO 3166-1 alpha-2 country codes to which outbound calls are allowed. If not set or empty, calls to all countries are allowed.\n\n- `auth_password?: string`\n The password used for authentication for the SIP trunk to update for the phone number.\n\n- `auth_username?: string`\n The username used for authentication for the SIP trunk to update for the phone number.\n\n- `fallback_number?: string`\n Enterprise only. Phone number to transfer inbound calls to when organization is in outage mode or when an inbound call cannot get a concurrency slot before the fallback timeout. Can be either a Retell phone number or an external number. Set to null to remove. Cannot be the same as this phone number, and cannot be a number that already has its own fallback configured (prevents nested forwarding).\n\n- `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Inbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each inbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to inbound_sms_agent_id.\n\n- `inbound_sms_webhook_url?: string`\n If set, will send a webhook for inbound SMS, where you can override agent id, set dynamic variables and other fields specific to that chat.\n\n- `inbound_webhook_url?: string`\n If set, will send a webhook for inbound calls, where you can override agent id, set dynamic variables and other fields specific to that call.\n\n- `nickname?: string`\n Nickname of the number. This is for your reference only.\n\n- `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound call, with probability proportional to the weight. Total weights must add up to 1.\n\n- `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n Outbound SMS agents to bind to the number with weights. If set and non-empty, one agent will be picked randomly for each outbound SMS, with probability proportional to the weight. Total weights must add up to 1. If not set or empty, fallback to outbound_sms_agent_id.\n\n- `termination_uri?: string`\n The termination uri to update for the phone number. This is used for outbound calls.\n\n- `transport?: string`\n Outbound transport protocol to update for the phone number. Valid values are \"TLS\", \"TCP\" and \"UDP\". Default is \"TCP\".\n\n### Returns\n\n- `{ last_modification_timestamp: number; phone_number: string; phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'; allowed_inbound_country_list?: string[]; allowed_outbound_country_list?: string[]; area_code?: number; fallback_number?: string; inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; inbound_sms_webhook_url?: string; inbound_webhook_url?: string; nickname?: string; outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]; phone_number_pretty?: string; sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }; }`\n\n - `last_modification_timestamp: number`\n - `phone_number: string`\n - `phone_number_type: 'retell-twilio' | 'retell-telnyx' | 'custom'`\n - `allowed_inbound_country_list?: string[]`\n - `allowed_outbound_country_list?: string[]`\n - `area_code?: number`\n - `fallback_number?: string`\n - `inbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `inbound_sms_webhook_url?: string`\n - `inbound_webhook_url?: string`\n - `nickname?: string`\n - `outbound_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `outbound_sms_agents?: { agent_id: string; weight: number; agent_version?: number | string; }[]`\n - `phone_number_pretty?: string`\n - `sip_outbound_trunk_config?: { auth_username?: string; termination_uri?: string; transport?: string; }`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst phoneNumberResponse = await client.phoneNumber.update('+14157774444');\n\nconsole.log(phoneNumberResponse);\n```",
762
762
  perLanguage: {
763
763
  typescript: {
764
764
  method: 'client.phoneNumber.update',
@@ -1744,7 +1744,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
1744
1744
  response:
1745
1745
  "{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; flex_mode?: boolean; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }",
1746
1746
  markdown:
1747
- "## retrieve\n\n`client.conversationFlow.retrieve(conversation_flow_id: string, version?: number): { conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; flex_mode?: boolean; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }`\n\n**get** `/get-conversation-flow/{conversation_flow_id}`\n\nRetrieve details of a specific Conversation Flow\n\n### Parameters\n\n- `conversation_flow_id: string`\n\n- `version?: number`\n Optional version of the conversation flow to retrieve. Default to latest version.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; flex_mode?: boolean; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]; default_dynamic_variables?: object; flex_mode?: boolean; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_id: string`\n - `version: number`\n - `begin_after_user_silence_ms?: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; } | { template: 'info_collection'; type: 'template'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; flex_mode?: boolean; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n - `default_dynamic_variables?: object`\n - `flex_mode?: boolean`\n - `global_prompt?: string`\n - `is_transfer_llm?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n - `model_temperature?: number`\n - `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; } | { template: 'info_collection'; type: 'template'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number | string; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `start_speaker?: 'user' | 'agent'`\n - `tool_call_strict_mode?: boolean`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse);\n```",
1747
+ "## retrieve\n\n`client.conversationFlow.retrieve(conversation_flow_id: string, version?: number): { conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: object; components?: object[]; default_dynamic_variables?: object; flex_mode?: boolean; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: object; knowledge_base_ids?: string[]; mcps?: object[]; model_choice?: object; model_temperature?: number; nodes?: object | object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; notes?: object[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: object | object | object[]; }`\n\n**get** `/get-conversation-flow/{conversation_flow_id}`\n\nRetrieve details of a specific Conversation Flow\n\n### Parameters\n\n- `conversation_flow_id: string`\n\n- `version?: number`\n Optional version of the conversation flow to retrieve. Defaults to the latest version.\n\n### Returns\n\n- `{ conversation_flow_id: string; version: number; begin_after_user_silence_ms?: number; begin_tag_display_position?: { x?: number; y?: number; }; components?: { name: string; nodes: { id: string; instruction: object | object; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; voice_speed?: number; } | { id: string; instruction: object; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: object; display_position?: object; edges?: object[]; finetune_conversation_examples?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; interruption_sensitivity?: number; kb_config?: object; knowledge_base_ids?: string[]; model_choice?: object; name?: string; responsiveness?: number; skip_response_edge?: object; tool_ids?: string[]; tools?: object | object | object | object | object | object | object | object | object | object | object | object | object[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: object; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; display_position?: object; global_node_setting?: object; ignore_e164_validation?: boolean; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: object; type: 'press_digit'; delay_ms?: number; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; else_edge: object; type: 'branch'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; failed_edge: object; instruction: object | object | object; success_edge: object; type: 'sms'; display_position?: object; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: object | object | object | object[]; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; model_choice?: object; name?: string; } | { id: string; agent_id: string; edge: object; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: object; global_node_setting?: object; instruction?: object | object; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: object; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: object; edges?: object[]; else_edge?: object; enable_typing_sound?: boolean; finetune_transition_examples?: object[]; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: object; type: 'component'; display_position?: object; edges?: object[]; finetune_transition_examples?: object[]; global_node_setting?: object; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: object; global_node_setting?: object; instruction?: object | object; model_choice?: object; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; flex_mode?: boolean; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: object; size: object; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]; default_dynamic_variables?: object; flex_mode?: boolean; global_prompt?: string; is_transfer_llm?: boolean; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; model_temperature?: number; nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: object | object | object[]; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: object | object; transfer_option: object | object | object; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: object | object | object; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: object; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: object | object | object | object[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: object | object | object; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: object | object | object[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: object[]; negative_finetune_examples?: object[]; positive_finetune_examples?: object[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; start_speaker?: 'user' | 'agent'; tool_call_strict_mode?: boolean; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }`\n\n - `conversation_flow_id: string`\n - `version: number`\n - `begin_after_user_silence_ms?: number`\n - `begin_tag_display_position?: { x?: number; y?: number; }`\n - `components?: { name: string; nodes: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: object; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: object | object; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: object; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: object | object; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; } | { template: 'info_collection'; type: 'template'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: object | object; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: object | object | object[]; }[]; positive_finetune_examples?: { transcript: object | object | object[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]; begin_tag_display_position?: { x?: number; y?: number; }; flex_mode?: boolean; mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]; notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]; start_node_id?: string; tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]; }[]`\n - `default_dynamic_variables?: object`\n - `flex_mode?: boolean`\n - `global_prompt?: string`\n - `is_transfer_llm?: boolean`\n - `kb_config?: { filter_score?: number; top_k?: number; }`\n - `knowledge_base_ids?: string[]`\n - `mcps?: { name: string; url: string; headers?: object; query_params?: object; timeout_ms?: number; }[]`\n - `model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }`\n - `model_temperature?: number`\n - `nodes?: { id: string; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; type: 'conversation'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; voice_speed?: number; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'subagent'; allow_dtmf_interruption?: boolean; always_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Always'; } | { prompt: 'Always'; type: 'prompt'; }; destination_node_id?: string; }; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_conversation_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; interruption_sensitivity?: number; kb_config?: { filter_score?: number; top_k?: number; }; knowledge_base_ids?: string[]; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; responsiveness?: number; skip_response_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Skip response'; } | { prompt: 'Skip response'; type: 'prompt'; }; destination_node_id?: string; }; tool_ids?: string[]; tools?: { name: string; type: 'end_call'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: object; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; ignore_e164_validation?: boolean; speak_during_execution?: boolean; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; } | { agent_id: string; name: string; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; keep_current_language?: boolean; keep_current_voice?: boolean; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { name: string; type: 'press_digit'; delay_ms?: number; description?: string; } | { name: string; sms_content: { content?: string; type?: 'predefined'; } | { prompt?: string; type?: 'inferred'; } | { template: 'info_collection'; type: 'template'; }; type: 'send_sms'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { code: string; name: string; type: 'code'; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; } | { description: string; name: string; type: 'extract_dynamic_variable'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; enable_typing_sound?: boolean; } | { name: string; type: 'bridge_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { name: string; type: 'cancel_transfer'; description?: string; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; speak_during_execution?: boolean; } | { description: string; name: string; type: 'mcp'; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; input_schema?: object; mcp_id?: string; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; }[]; voice_speed?: number; } | { id: string; type: 'end'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; tool_id: string; tool_type: 'local' | 'shared'; type: 'function'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; code: string; type: 'code'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; timeout_ms?: number; } | { id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; transfer_destination: { number: string; type: 'predefined'; extension?: string; } | { prompt: string; type: 'inferred'; }; transfer_option: { type: 'cold_transfer'; cold_transfer_mode?: 'sip_refer' | 'sip_invite'; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { type: 'warm_transfer'; agent_detection_timeout_ms?: number; enable_bridge_audio_cue?: boolean; ivr_option?: { prompt?: string; type?: 'prompt'; }; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; opt_out_human_detection?: boolean; private_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; } | { agentic_transfer_config: { action_on_timeout?: 'bridge_transfer' | 'cancel_transfer'; transfer_agent?: { agent_id: string; agent_version: number | string; }; transfer_timeout_ms?: number; }; type: 'agentic_warm_transfer'; enable_bridge_audio_cue?: boolean; on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone'; public_handoff_option?: { prompt?: string; type?: 'prompt'; } | { message?: string; type?: 'static_message'; }; show_transferee_as_caller?: boolean; transfer_ring_duration_ms?: number; }; type: 'transfer_call'; custom_sip_headers?: object; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; ignore_e164_validation?: boolean; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; instruction: { text: string; type: 'prompt'; }; type: 'press_digit'; delay_ms?: number; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'branch'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; failed_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Failed to send'; } | { prompt: 'Failed to send'; type: 'prompt'; }; destination_node_id?: string; }; instruction: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; } | { template: 'info_collection'; type: 'template'; }; success_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Sent successfully'; } | { prompt: 'Sent successfully'; type: 'prompt'; }; destination_node_id?: string; }; type: 'sms'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; type: 'extract_dynamic_variables'; variables: { description: string; name: string; type: 'string'; conditional_prompt?: string; examples?: string[]; required?: boolean; } | { choices: string[]; description: string; name: string; type: 'enum'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'boolean'; conditional_prompt?: string; required?: boolean; } | { description: string; name: string; type: 'number'; conditional_prompt?: string; required?: boolean; }[]; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; } | { id: string; agent_id: string; edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Transfer failed'; } | { prompt: 'Transfer failed'; type: 'prompt'; }; destination_node_id?: string; }; post_call_analysis_setting: 'both_agents' | 'only_destination_agent'; type: 'agent_swap'; agent_version?: number | string; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; keep_current_language?: boolean; keep_current_voice?: boolean; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent'; } | { id: string; mcp_id: string; mcp_tool_name: string; type: 'mcp'; wait_for_result: boolean; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; else_edge?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; enable_typing_sound?: boolean; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; response_variables?: object; speak_during_execution?: boolean; } | { id: string; component_id: string; component_type: 'local' | 'shared'; else_edge: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; prompt?: 'Else'; } | { prompt: 'Else'; type: 'prompt'; }; destination_node_id?: string; }; type: 'component'; display_position?: { x?: number; y?: number; }; edges?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: { left: string; operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist'; right?: string; }[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; finetune_transition_examples?: { id: string; transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; destination_node_id?: string; }[]; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; name?: string; } | { id: string; type: 'bridge_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; } | { id: string; type: 'cancel_transfer'; display_position?: { x?: number; y?: number; }; global_node_setting?: { condition: string; cool_down?: number; go_back_conditions?: { id: string; transition_condition: { prompt: string; type: 'prompt'; } | { equations: object[]; operator: '||' | '&&'; type: 'equation'; }; destination_node_id?: string; }[]; negative_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; positive_finetune_examples?: { transcript: { content: string; role: 'agent' | 'user'; } | { arguments: string; name: string; role: 'tool_call_invocation'; tool_call_id: string; } | { content: string; role: 'tool_call_result'; tool_call_id: string; }[]; }[]; }; instruction?: { text: string; type: 'prompt'; } | { text: string; type: 'static_text'; }; model_choice?: { model: string; type: 'cascading'; high_priority?: boolean; }; name?: string; speak_during_execution?: boolean; }[]`\n - `notes?: { id: string; content: string; display_position: { x?: number; y?: number; }; size: { height?: number; width?: number; }; }[]`\n - `start_node_id?: string`\n - `start_speaker?: 'user' | 'agent'`\n - `tool_call_strict_mode?: boolean`\n - `tools?: { name: string; type: 'custom'; url: string; args_at_root?: boolean; description?: string; enable_typing_sound?: boolean; execution_message_description?: string; execution_message_type?: 'prompt' | 'static_text'; headers?: object; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; parameters?: { properties: object; type: 'object'; required?: string[]; }; query_params?: object; response_variables?: object; speak_after_execution?: boolean; speak_during_execution?: boolean; timeout_ms?: number; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'check_availability_cal'; description?: string; timezone?: string; tool_id?: string; } | { cal_api_key: string; event_type_id: number | string; name: string; type: 'book_appointment_cal'; description?: string; timezone?: string; tool_id?: string; }[]`\n\n### Example\n\n```typescript\nimport Retell from 'retell-sdk';\n\nconst client = new Retell();\n\nconst conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id');\n\nconsole.log(conversationFlowResponse);\n```",
1748
1748
  perLanguage: {
1749
1749
  typescript: {
1750
1750
  method: 'client.conversationFlow.retrieve',
@@ -2890,14 +2890,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2890
2890
 
2891
2891
  const EMBEDDED_READMES: { language: string; content: string }[] = [
2892
2892
  {
2893
- language: 'python',
2893
+ language: 'typescript',
2894
2894
  content:
2895
- '# Retell Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/retell-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/retell-sdk/)\n\nThe Retell Python library provides convenient access to the Retell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install retell-sdk\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `RETELL_API_KEY="YOUR_RETELL_API_KEY"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncRetell` instead of `Retell` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom retell import AsyncRetell\n\nclient = AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install retell-sdk[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom retell import DefaultAioHttpClient\nfrom retell import AsyncRetell\n\nasync def main() -> None:\n async with AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom retell import Retell\n\nclient = Retell()\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n call_screening_option={\n "agent_identity": "Acme Health scheduling team",\n "call_purpose": "confirming your appointment for tomorrow",\n },\n)\nprint(agent_response.call_screening_option)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `retell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `retell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `retell.APIError`.\n\n```python\nimport retell\nfrom retell import Retell\n\nclient = Retell()\n\ntry:\n client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\nexcept retell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept retell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept retell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Retell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `RETELL_LOG` to `info`.\n\n```shell\n$ export RETELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom retell import Retell\n\nclient = Retell()\nresponse = client.agent.with_raw_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nagent = response.parse() # get the object that `agent.create()` would have returned\nprint(agent.agent_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.agent.with_streaming_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom retell import Retell, DefaultHttpxClient\n\nclient = Retell(\n # Or use the `RETELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom retell import Retell\n\nwith Retell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport retell\nprint(retell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2895
+ "# Retell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/retell-sdk.svg?label=npm%20(stable))](https://npmjs.org/package/retell-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/retell-sdk)\n\nThis library provides convenient access to the Retell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install retell-sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Retell.AgentCreateParams = {\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n};\nconst agentResponse: Retell.AgentResponse = await client.agent.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst agentResponse = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .catch(async (err) => {\n if (err instanceof Retell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Retell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Retell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Retell();\n\nconst response = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: agentResponse, response: raw } = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(agentResponse.agent_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `RETELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Retell from 'retell-sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Retell({\n logger: logger.child({ name: 'Retell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.agent.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Retell from 'retell-sdk';\nimport fetch from 'my-fetch';\n\nconst client = new Retell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Retell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Retell from 'npm:retell-sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Retell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-typescript-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
2896
2896
  },
2897
2897
  {
2898
- language: 'typescript',
2898
+ language: 'python',
2899
2899
  content:
2900
- "# Retell TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/retell-sdk.svg?label=npm%20(stable))](https://npmjs.org/package/retell-sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/retell-sdk)\n\nThis library provides convenient access to the Retell REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install retell-sdk\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentResponse = await client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n});\n\nconsole.log(agentResponse.agent_id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: Retell.AgentCreateParams = {\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n};\nconst agentResponse: Retell.AgentResponse = await client.agent.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst agentResponse = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .catch(async (err) => {\n if (err instanceof Retell.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new Retell({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new Retell({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.agent.create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new Retell();\n\nconst response = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: agentResponse, response: raw } = await client.agent\n .create({\n response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },\n voice_id: 'retell-Cimo',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(agentResponse.agent_id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `RETELL_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Retell from 'retell-sdk';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Retell({\n logger: logger.child({ name: 'Retell' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.agent.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Retell from 'retell-sdk';\nimport fetch from 'my-fetch';\n\nconst client = new Retell({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Retell({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport Retell from 'retell-sdk';\n\nconst client = new Retell({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport Retell from 'npm:retell-sdk';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Retell({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-typescript-sdk/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
2900
+ '# Retell Python API library\n\n<!-- prettier-ignore -->\n[![PyPI version](https://img.shields.io/pypi/v/retell-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/retell-sdk/)\n\nThe Retell Python library provides convenient access to the Retell REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\n\n\n## MCP Server\n\nUse the Retell MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40retell-ai%2Fmcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkByZXRlbGwtYWkvbWNwLXNlcnZlciJdLCJlbnYiOnsiUkVURUxMX0FQSV9LRVkiOiJZT1VSX1JFVEVMTF9BUElfS0VZIn19)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40retell-ai%2Fmcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40retell-ai%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22RETELL_API_KEY%22%3A%22YOUR_RETELL_API_KEY%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.retellai.com](https://docs.retellai.com/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install retell-sdk\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom retell import Retell\n\nclient = Retell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(agent_response.agent_id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `RETELL_API_KEY="YOUR_RETELL_API_KEY"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncRetell` instead of `Retell` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom retell import AsyncRetell\n\nclient = AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install retell-sdk[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom retell import DefaultAioHttpClient\nfrom retell import AsyncRetell\n\nasync def main() -> None:\n async with AsyncRetell(\n api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n agent_response = await client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\n print(agent_response.agent_id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom retell import Retell\n\nclient = Retell()\n\nagent_response = client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n call_screening_option={\n "agent_identity": "Acme Health scheduling team",\n "call_purpose": "confirming your appointment for tomorrow",\n },\n)\nprint(agent_response.call_screening_option)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `retell.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `retell.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `retell.APIError`.\n\n```python\nimport retell\nfrom retell import Retell\n\nclient = Retell()\n\ntry:\n client.agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n )\nexcept retell.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept retell.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept retell.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom retell import Retell\n\n# Configure the default for all requests:\nclient = Retell(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Retell(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).agent.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `RETELL_LOG` to `info`.\n\n```shell\n$ export RETELL_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom retell import Retell\n\nclient = Retell()\nresponse = client.agent.with_raw_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nagent = response.parse() # get the object that `agent.create()` would have returned\nprint(agent.agent_id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/RetellAI/retell-python-sdk/tree/main/src/retell/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.agent.with_streaming_response.create(\n response_engine={\n "llm_id": "llm_234sdertfsdsfsdf",\n "type": "retell-llm",\n },\n voice_id="retell-Cimo",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom retell import Retell, DefaultHttpxClient\n\nclient = Retell(\n # Or use the `RETELL_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom retell import Retell\n\nwith Retell() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/RetellAI/retell-python-sdk/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport retell\nprint(retell.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
2901
2901
  },
2902
2902
  ];
2903
2903