retell-sdk 5.10.3 → 5.12.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 (52) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +6 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/agent.d.mts +316 -3
  13. package/resources/agent.d.mts.map +1 -1
  14. package/resources/agent.d.ts +316 -3
  15. package/resources/agent.d.ts.map +1 -1
  16. package/resources/batch-call.d.mts +105 -1
  17. package/resources/batch-call.d.mts.map +1 -1
  18. package/resources/batch-call.d.ts +105 -1
  19. package/resources/batch-call.d.ts.map +1 -1
  20. package/resources/call.d.mts +315 -3
  21. package/resources/call.d.mts.map +1 -1
  22. package/resources/call.d.ts +315 -3
  23. package/resources/call.d.ts.map +1 -1
  24. package/resources/chat-agent.d.mts +255 -3
  25. package/resources/chat-agent.d.mts.map +1 -1
  26. package/resources/chat-agent.d.ts +255 -3
  27. package/resources/chat-agent.d.ts.map +1 -1
  28. package/resources/conversation-flow-component.d.mts +2164 -730
  29. package/resources/conversation-flow-component.d.mts.map +1 -1
  30. package/resources/conversation-flow-component.d.ts +2164 -730
  31. package/resources/conversation-flow-component.d.ts.map +1 -1
  32. package/resources/conversation-flow.d.mts +13562 -10694
  33. package/resources/conversation-flow.d.mts.map +1 -1
  34. package/resources/conversation-flow.d.ts +13562 -10694
  35. package/resources/conversation-flow.d.ts.map +1 -1
  36. package/resources/llm.d.mts +246 -0
  37. package/resources/llm.d.mts.map +1 -1
  38. package/resources/llm.d.ts +246 -0
  39. package/resources/llm.d.ts.map +1 -1
  40. package/src/client.ts +11 -4
  41. package/src/resources/agent.ts +376 -0
  42. package/src/resources/batch-call.ts +125 -0
  43. package/src/resources/call.ts +375 -0
  44. package/src/resources/chat-agent.ts +300 -0
  45. package/src/resources/conversation-flow-component.ts +8295 -6198
  46. package/src/resources/conversation-flow.ts +9667 -5473
  47. package/src/resources/llm.ts +288 -0
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -83,7 +83,7 @@ export interface ConversationFlowComponentResponse {
83
83
  /**
84
84
  * Nodes that make up the component
85
85
  */
86
- nodes: Array<ConversationFlowComponentResponse.ConversationNode | ConversationFlowComponentResponse.EndNode | ConversationFlowComponentResponse.FunctionNode | ConversationFlowComponentResponse.CodeNode | ConversationFlowComponentResponse.TransferCallNode | ConversationFlowComponentResponse.PressDigitNode | ConversationFlowComponentResponse.BranchNode | ConversationFlowComponentResponse.SMSNode | ConversationFlowComponentResponse.ExtractDynamicVariablesNode | ConversationFlowComponentResponse.AgentSwapNode | ConversationFlowComponentResponse.McpNode | ConversationFlowComponentResponse.ComponentNode | ConversationFlowComponentResponse.BridgeTransferNode | ConversationFlowComponentResponse.CancelTransferNode>;
86
+ nodes: Array<ConversationFlowComponentResponse.ConversationNode | ConversationFlowComponentResponse.SubagentNode | ConversationFlowComponentResponse.EndNode | ConversationFlowComponentResponse.FunctionNode | ConversationFlowComponentResponse.CodeNode | ConversationFlowComponentResponse.TransferCallNode | ConversationFlowComponentResponse.PressDigitNode | ConversationFlowComponentResponse.BranchNode | ConversationFlowComponentResponse.SMSNode | ConversationFlowComponentResponse.ExtractDynamicVariablesNode | ConversationFlowComponentResponse.AgentSwapNode | ConversationFlowComponentResponse.McpNode | ConversationFlowComponentResponse.ComponentNode | ConversationFlowComponentResponse.BridgeTransferNode | ConversationFlowComponentResponse.CancelTransferNode>;
87
87
  /**
88
88
  * Timestamp of last user modification
89
89
  */
@@ -100,6 +100,10 @@ export interface ConversationFlowComponentResponse {
100
100
  * A list of MCP server configurations to use for this component
101
101
  */
102
102
  mcps?: Array<ConversationFlowComponentResponse.Mcp> | null;
103
+ /**
104
+ * Visual annotations displayed on the flow canvas.
105
+ */
106
+ notes?: Array<ConversationFlowComponentResponse.Note> | null;
103
107
  /**
104
108
  * ID of the starting node
105
109
  */
@@ -141,16 +145,6 @@ export declare namespace ConversationFlowComponentResponse {
141
145
  name?: string;
142
146
  responsiveness?: number | null;
143
147
  skip_response_edge?: ConversationNode.SkipResponseEdge;
144
- /**
145
- * The tool ids of the tools defined in main conversation flow or component that
146
- * can be used in this conversation node.
147
- */
148
- tool_ids?: Array<string> | null;
149
- /**
150
- * The tools owned by this conversation node. This includes other tool types like
151
- * transfer_call, agent_swap, etc.
152
- */
153
- tools?: Array<ConversationNode.EndCallTool | ConversationNode.TransferCallTool | ConversationNode.CheckAvailabilityCalTool | ConversationNode.BookAppointmentCalTool | ConversationNode.AgentSwapTool | ConversationNode.PressDigitTool | ConversationNode.SendSMSTool | ConversationNode.CustomTool | ConversationNode.CodeTool | ConversationNode.ExtractDynamicVariableTool | ConversationNode.BridgeTransferTool | ConversationNode.CancelTransferTool | ConversationNode.McpTool> | null;
154
148
  voice_speed?: number | null;
155
149
  }
156
150
  namespace ConversationNode {
@@ -503,86 +497,470 @@ export declare namespace ConversationFlowComponentResponse {
503
497
  type: 'prompt';
504
498
  }
505
499
  }
506
- interface EndCallTool {
500
+ }
501
+ interface SubagentNode {
502
+ /**
503
+ * Unique identifier for the node
504
+ */
505
+ id: string;
506
+ instruction: SubagentNode.Instruction;
507
+ /**
508
+ * Type of the node
509
+ */
510
+ type: 'subagent';
511
+ always_edge?: SubagentNode.AlwaysEdge;
512
+ /**
513
+ * Position for frontend display
514
+ */
515
+ display_position?: SubagentNode.DisplayPosition;
516
+ edges?: Array<SubagentNode.Edge>;
517
+ finetune_conversation_examples?: Array<SubagentNode.FinetuneConversationExample>;
518
+ finetune_transition_examples?: Array<SubagentNode.FinetuneTransitionExample>;
519
+ global_node_setting?: SubagentNode.GlobalNodeSetting;
520
+ interruption_sensitivity?: number | null;
521
+ /**
522
+ * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
523
+ */
524
+ knowledge_base_ids?: Array<string> | null;
525
+ model_choice?: SubagentNode.ModelChoice;
526
+ /**
527
+ * Optional name for display purposes
528
+ */
529
+ name?: string;
530
+ responsiveness?: number | null;
531
+ skip_response_edge?: SubagentNode.SkipResponseEdge;
532
+ /**
533
+ * The tool ids of the tools defined in main conversation flow or component that
534
+ * can be used in this subagent node.
535
+ */
536
+ tool_ids?: Array<string> | null;
537
+ /**
538
+ * The tools owned by this subagent node. This includes other tool types like
539
+ * transfer_call, agent_swap, etc.
540
+ */
541
+ tools?: Array<SubagentNode.EndCallTool | SubagentNode.TransferCallTool | SubagentNode.CheckAvailabilityCalTool | SubagentNode.BookAppointmentCalTool | SubagentNode.AgentSwapTool | SubagentNode.PressDigitTool | SubagentNode.SendSMSTool | SubagentNode.CustomTool | SubagentNode.CodeTool | SubagentNode.ExtractDynamicVariableTool | SubagentNode.BridgeTransferTool | SubagentNode.CancelTransferTool | SubagentNode.McpTool> | null;
542
+ voice_speed?: number | null;
543
+ }
544
+ namespace SubagentNode {
545
+ interface Instruction {
507
546
  /**
508
- * Name of the tool. Must be unique within all tools available to LLM at any given
509
- * time (general tools + state tools + state transitions). Must be consisted of
510
- * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
511
- * (no space allowed).
547
+ * The prompt text for the instruction
512
548
  */
513
- name: string;
514
- type: 'end_call';
549
+ text: string;
515
550
  /**
516
- * Describes what the tool does, sometimes can also include information about when
517
- * to call the tool.
551
+ * Type of instruction
518
552
  */
519
- description?: string;
553
+ type: 'prompt';
554
+ }
555
+ interface AlwaysEdge {
520
556
  /**
521
- * Describes what to say to user when ending the call. Only applicable when
522
- * speak_during_execution is true.
557
+ * Unique identifier for the edge
523
558
  */
524
- execution_message_description?: string;
559
+ id: string;
560
+ transition_condition: AlwaysEdge.PromptCondition | AlwaysEdge.EquationCondition | AlwaysEdge.UnionMember2;
525
561
  /**
526
- * Type of execution message. "prompt" means the agent will use
527
- * execution_message_description as a prompt to generate the message. "static_text"
528
- * means the agent will speak the execution_message_description directly. Defaults
529
- * to "prompt".
562
+ * ID of the destination node
530
563
  */
531
- execution_message_type?: 'prompt' | 'static_text';
564
+ destination_node_id?: string;
565
+ }
566
+ namespace AlwaysEdge {
567
+ interface PromptCondition {
568
+ /**
569
+ * Prompt condition text
570
+ */
571
+ prompt: string;
572
+ type: 'prompt';
573
+ }
574
+ interface EquationCondition {
575
+ equations: Array<EquationCondition.Equation>;
576
+ operator: '||' | '&&';
577
+ type: 'equation';
578
+ /**
579
+ * Must be "Always" for always edge
580
+ */
581
+ prompt?: 'Always';
582
+ }
583
+ namespace EquationCondition {
584
+ interface Equation {
585
+ /**
586
+ * Left side of the equation
587
+ */
588
+ left: string;
589
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
590
+ /**
591
+ * Right side of the equation. The right side of the equation not required when
592
+ * "exists" or "not_exist" are selected.
593
+ */
594
+ right?: string;
595
+ }
596
+ }
597
+ interface UnionMember2 {
598
+ /**
599
+ * Must be "Always" for always edge
600
+ */
601
+ prompt: 'Always';
602
+ type: 'prompt';
603
+ }
604
+ }
605
+ /**
606
+ * Position for frontend display
607
+ */
608
+ interface DisplayPosition {
609
+ x?: number;
610
+ y?: number;
611
+ }
612
+ interface Edge {
532
613
  /**
533
- * If true, will speak during execution.
614
+ * Unique identifier for the edge
534
615
  */
535
- speak_during_execution?: boolean;
616
+ id: string;
617
+ transition_condition: Edge.PromptCondition | Edge.EquationCondition;
618
+ /**
619
+ * ID of the destination node
620
+ */
621
+ destination_node_id?: string;
536
622
  }
537
- interface TransferCallTool {
623
+ namespace Edge {
624
+ interface PromptCondition {
625
+ /**
626
+ * Prompt condition text
627
+ */
628
+ prompt: string;
629
+ type: 'prompt';
630
+ }
631
+ interface EquationCondition {
632
+ equations: Array<EquationCondition.Equation>;
633
+ operator: '||' | '&&';
634
+ type: 'equation';
635
+ }
636
+ namespace EquationCondition {
637
+ interface Equation {
638
+ /**
639
+ * Left side of the equation
640
+ */
641
+ left: string;
642
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
643
+ /**
644
+ * Right side of the equation. The right side of the equation not required when
645
+ * "exists" or "not_exist" are selected.
646
+ */
647
+ right?: string;
648
+ }
649
+ }
650
+ }
651
+ interface FinetuneConversationExample {
538
652
  /**
539
- * Name of the tool. Must be unique within all tools available to LLM at any given
540
- * time (general tools + state tools + state edges).
653
+ * Unique identifier for the example
541
654
  */
542
- name: string;
543
- transfer_destination: TransferCallTool.TransferDestinationPredefined | TransferCallTool.TransferDestinationInferred;
544
- transfer_option: TransferCallTool.TransferOptionColdTransfer | TransferCallTool.TransferOptionWarmTransfer | TransferCallTool.TransferOptionAgenticWarmTransfer;
545
- type: 'transfer_call';
655
+ id: string;
546
656
  /**
547
- * Custom SIP headers to be added to the call.
657
+ * The example transcript to finetune how the conversation should be.
548
658
  */
549
- custom_sip_headers?: {
550
- [key: string]: string;
551
- };
659
+ transcript: Array<FinetuneConversationExample.UnionMember0 | FinetuneConversationExample.UnionMember1 | FinetuneConversationExample.UnionMember2>;
660
+ }
661
+ namespace FinetuneConversationExample {
662
+ interface UnionMember0 {
663
+ content: string;
664
+ role: 'agent' | 'user';
665
+ }
666
+ interface UnionMember1 {
667
+ arguments: string;
668
+ name: string;
669
+ role: 'tool_call_invocation';
670
+ tool_call_id: string;
671
+ }
672
+ interface UnionMember2 {
673
+ content: string;
674
+ role: 'tool_call_result';
675
+ tool_call_id: string;
676
+ }
677
+ }
678
+ interface FinetuneTransitionExample {
552
679
  /**
553
- * Describes what the tool does, sometimes can also include information about when
554
- * to call the tool.
680
+ * Unique identifier for the example
555
681
  */
556
- description?: string;
682
+ id: string;
557
683
  /**
558
- * Describes what to say to user when transferring the call. Only applicable when
559
- * speak_during_execution is true.
684
+ * The example transcript to finetune how the node should transition.
560
685
  */
561
- execution_message_description?: string;
686
+ transcript: Array<FinetuneTransitionExample.UnionMember0 | FinetuneTransitionExample.UnionMember1 | FinetuneTransitionExample.UnionMember2>;
562
687
  /**
563
- * Type of execution message. "prompt" means the agent will use
564
- * execution_message_description as a prompt to generate the message. "static_text"
565
- * means the agent will speak the execution_message_description directly. Defaults
566
- * to "prompt".
688
+ * Optional destination node ID
567
689
  */
568
- execution_message_type?: 'prompt' | 'static_text';
690
+ destination_node_id?: string;
691
+ }
692
+ namespace FinetuneTransitionExample {
693
+ interface UnionMember0 {
694
+ content: string;
695
+ role: 'agent' | 'user';
696
+ }
697
+ interface UnionMember1 {
698
+ arguments: string;
699
+ name: string;
700
+ role: 'tool_call_invocation';
701
+ tool_call_id: string;
702
+ }
703
+ interface UnionMember2 {
704
+ content: string;
705
+ role: 'tool_call_result';
706
+ tool_call_id: string;
707
+ }
708
+ }
709
+ interface GlobalNodeSetting {
569
710
  /**
570
- * If true, the e.164 validation will be ignored for the from_number. This can be
571
- * useful when you want to dial to internal pseudo numbers. This only applies when
572
- * you are using custom telephony and does not apply when you are using Retell
573
- * Telephony. If omitted, the default value is false.
711
+ * Condition for global node activation, cannot be empty
574
712
  */
575
- ignore_e164_validation?: boolean;
713
+ condition: string;
576
714
  /**
577
- * If true, will speak during execution.
715
+ * The same global node won't be triggered again within the next N node
716
+ * transitions.
578
717
  */
579
- speak_during_execution?: boolean;
718
+ cool_down?: number;
719
+ /**
720
+ * The conditions for global node go back. There would be no destination_node_id
721
+ * for these edges.
722
+ */
723
+ go_back_conditions?: Array<GlobalNodeSetting.GoBackCondition>;
724
+ /**
725
+ * Don't transition to this node
726
+ */
727
+ negative_finetune_examples?: Array<GlobalNodeSetting.NegativeFinetuneExample>;
728
+ /**
729
+ * Transition to this node
730
+ */
731
+ positive_finetune_examples?: Array<GlobalNodeSetting.PositiveFinetuneExample>;
580
732
  }
581
- namespace TransferCallTool {
582
- interface TransferDestinationPredefined {
733
+ namespace GlobalNodeSetting {
734
+ interface GoBackCondition {
583
735
  /**
584
- * The number to transfer to in E.164 format or a dynamic variable like
585
- * {{transfer_number}}.
736
+ * Unique identifier for the edge
737
+ */
738
+ id: string;
739
+ transition_condition: GoBackCondition.PromptCondition | GoBackCondition.EquationCondition;
740
+ /**
741
+ * ID of the destination node
742
+ */
743
+ destination_node_id?: string;
744
+ }
745
+ namespace GoBackCondition {
746
+ interface PromptCondition {
747
+ /**
748
+ * Prompt condition text
749
+ */
750
+ prompt: string;
751
+ type: 'prompt';
752
+ }
753
+ interface EquationCondition {
754
+ equations: Array<EquationCondition.Equation>;
755
+ operator: '||' | '&&';
756
+ type: 'equation';
757
+ }
758
+ namespace EquationCondition {
759
+ interface Equation {
760
+ /**
761
+ * Left side of the equation
762
+ */
763
+ left: string;
764
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
765
+ /**
766
+ * Right side of the equation. The right side of the equation not required when
767
+ * "exists" or "not_exist" are selected.
768
+ */
769
+ right?: string;
770
+ }
771
+ }
772
+ }
773
+ interface NegativeFinetuneExample {
774
+ /**
775
+ * Find tune the transition condition to this global node
776
+ */
777
+ transcript: Array<NegativeFinetuneExample.UnionMember0 | NegativeFinetuneExample.UnionMember1 | NegativeFinetuneExample.UnionMember2>;
778
+ }
779
+ namespace NegativeFinetuneExample {
780
+ interface UnionMember0 {
781
+ content: string;
782
+ role: 'agent' | 'user';
783
+ }
784
+ interface UnionMember1 {
785
+ arguments: string;
786
+ name: string;
787
+ role: 'tool_call_invocation';
788
+ tool_call_id: string;
789
+ }
790
+ interface UnionMember2 {
791
+ content: string;
792
+ role: 'tool_call_result';
793
+ tool_call_id: string;
794
+ }
795
+ }
796
+ interface PositiveFinetuneExample {
797
+ /**
798
+ * Find tune the transition condition to this global node
799
+ */
800
+ transcript: Array<PositiveFinetuneExample.UnionMember0 | PositiveFinetuneExample.UnionMember1 | PositiveFinetuneExample.UnionMember2>;
801
+ }
802
+ namespace PositiveFinetuneExample {
803
+ interface UnionMember0 {
804
+ content: string;
805
+ role: 'agent' | 'user';
806
+ }
807
+ interface UnionMember1 {
808
+ arguments: string;
809
+ name: string;
810
+ role: 'tool_call_invocation';
811
+ tool_call_id: string;
812
+ }
813
+ interface UnionMember2 {
814
+ content: string;
815
+ role: 'tool_call_result';
816
+ tool_call_id: string;
817
+ }
818
+ }
819
+ }
820
+ interface ModelChoice {
821
+ /**
822
+ * The LLM model to use
823
+ */
824
+ model: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash';
825
+ /**
826
+ * Type of model choice
827
+ */
828
+ type: 'cascading';
829
+ /**
830
+ * Whether to use high priority pool with more dedicated resource, default false
831
+ */
832
+ high_priority?: boolean;
833
+ }
834
+ interface SkipResponseEdge {
835
+ /**
836
+ * Unique identifier for the edge
837
+ */
838
+ id: string;
839
+ transition_condition: SkipResponseEdge.PromptCondition | SkipResponseEdge.EquationCondition | SkipResponseEdge.UnionMember2;
840
+ /**
841
+ * ID of the destination node
842
+ */
843
+ destination_node_id?: string;
844
+ }
845
+ namespace SkipResponseEdge {
846
+ interface PromptCondition {
847
+ /**
848
+ * Prompt condition text
849
+ */
850
+ prompt: string;
851
+ type: 'prompt';
852
+ }
853
+ interface EquationCondition {
854
+ equations: Array<EquationCondition.Equation>;
855
+ operator: '||' | '&&';
856
+ type: 'equation';
857
+ /**
858
+ * Must be "Skip response" for skip response edge
859
+ */
860
+ prompt?: 'Skip response';
861
+ }
862
+ namespace EquationCondition {
863
+ interface Equation {
864
+ /**
865
+ * Left side of the equation
866
+ */
867
+ left: string;
868
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
869
+ /**
870
+ * Right side of the equation. The right side of the equation not required when
871
+ * "exists" or "not_exist" are selected.
872
+ */
873
+ right?: string;
874
+ }
875
+ }
876
+ interface UnionMember2 {
877
+ /**
878
+ * Must be "Skip response" for skip response edge
879
+ */
880
+ prompt: 'Skip response';
881
+ type: 'prompt';
882
+ }
883
+ }
884
+ interface EndCallTool {
885
+ /**
886
+ * Name of the tool. Must be unique within all tools available to LLM at any given
887
+ * time (general tools + state tools + state transitions). Must be consisted of
888
+ * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
889
+ * (no space allowed).
890
+ */
891
+ name: string;
892
+ type: 'end_call';
893
+ /**
894
+ * Describes what the tool does, sometimes can also include information about when
895
+ * to call the tool.
896
+ */
897
+ description?: string;
898
+ /**
899
+ * Describes what to say to user when ending the call. Only applicable when
900
+ * speak_during_execution is true.
901
+ */
902
+ execution_message_description?: string;
903
+ /**
904
+ * Type of execution message. "prompt" means the agent will use
905
+ * execution_message_description as a prompt to generate the message. "static_text"
906
+ * means the agent will speak the execution_message_description directly. Defaults
907
+ * to "prompt".
908
+ */
909
+ execution_message_type?: 'prompt' | 'static_text';
910
+ /**
911
+ * If true, will speak during execution.
912
+ */
913
+ speak_during_execution?: boolean;
914
+ }
915
+ interface TransferCallTool {
916
+ /**
917
+ * Name of the tool. Must be unique within all tools available to LLM at any given
918
+ * time (general tools + state tools + state edges).
919
+ */
920
+ name: string;
921
+ transfer_destination: TransferCallTool.TransferDestinationPredefined | TransferCallTool.TransferDestinationInferred;
922
+ transfer_option: TransferCallTool.TransferOptionColdTransfer | TransferCallTool.TransferOptionWarmTransfer | TransferCallTool.TransferOptionAgenticWarmTransfer;
923
+ type: 'transfer_call';
924
+ /**
925
+ * Custom SIP headers to be added to the call.
926
+ */
927
+ custom_sip_headers?: {
928
+ [key: string]: string;
929
+ };
930
+ /**
931
+ * Describes what the tool does, sometimes can also include information about when
932
+ * to call the tool.
933
+ */
934
+ description?: string;
935
+ /**
936
+ * Describes what to say to user when transferring the call. Only applicable when
937
+ * speak_during_execution is true.
938
+ */
939
+ execution_message_description?: string;
940
+ /**
941
+ * Type of execution message. "prompt" means the agent will use
942
+ * execution_message_description as a prompt to generate the message. "static_text"
943
+ * means the agent will speak the execution_message_description directly. Defaults
944
+ * to "prompt".
945
+ */
946
+ execution_message_type?: 'prompt' | 'static_text';
947
+ /**
948
+ * If true, the e.164 validation will be ignored for the from_number. This can be
949
+ * useful when you want to dial to internal pseudo numbers. This only applies when
950
+ * you are using custom telephony and does not apply when you are using Retell
951
+ * Telephony. If omitted, the default value is false.
952
+ */
953
+ ignore_e164_validation?: boolean;
954
+ /**
955
+ * If true, will speak during execution.
956
+ */
957
+ speak_during_execution?: boolean;
958
+ }
959
+ namespace TransferCallTool {
960
+ interface TransferDestinationPredefined {
961
+ /**
962
+ * The number to transfer to in E.164 format or a dynamic variable like
963
+ * {{transfer_number}}.
586
964
  */
587
965
  number: string;
588
966
  /**
@@ -965,6 +1343,23 @@ export declare namespace ConversationFlowComponentResponse {
965
1343
  * to call the tool.
966
1344
  */
967
1345
  description?: string;
1346
+ /**
1347
+ * Describes what to say before sending the SMS. Only applicable when
1348
+ * speak_during_execution is true.
1349
+ */
1350
+ execution_message_description?: string;
1351
+ /**
1352
+ * Type of execution message. "prompt" means the agent will use
1353
+ * execution_message_description as a prompt to generate the message. "static_text"
1354
+ * means the agent will speak the execution_message_description directly. Defaults
1355
+ * to "prompt".
1356
+ */
1357
+ execution_message_type?: 'prompt' | 'static_text';
1358
+ /**
1359
+ * If true, the agent will speak a short line before sending the SMS. If omitted,
1360
+ * defaults to true (same as end_call / transfer_call tools).
1361
+ */
1362
+ speak_during_execution?: boolean;
968
1363
  }
969
1364
  namespace SendSMSTool {
970
1365
  interface SMSContentPredefined {
@@ -1185,6 +1580,12 @@ export declare namespace ConversationFlowComponentResponse {
1185
1580
  * Type of the variable to extract.
1186
1581
  */
1187
1582
  type: 'string';
1583
+ /**
1584
+ * Optional instruction to help decide whether this field needs to be populated in
1585
+ * the analysis. If not set, the field is always included. If required is true,
1586
+ * this is ignored.
1587
+ */
1588
+ conditional_prompt?: string;
1188
1589
  /**
1189
1590
  * Examples of the variable value to teach model the style and syntax.
1190
1591
  */
@@ -1212,6 +1613,12 @@ export declare namespace ConversationFlowComponentResponse {
1212
1613
  * Type of the variable to extract.
1213
1614
  */
1214
1615
  type: 'enum';
1616
+ /**
1617
+ * Optional instruction to help decide whether this field needs to be populated in
1618
+ * the analysis. If not set, the field is always included. If required is true,
1619
+ * this is ignored.
1620
+ */
1621
+ conditional_prompt?: string;
1215
1622
  /**
1216
1623
  * Whether this data is required. If true and the data is not extracted, the call
1217
1624
  * will be marked as unsuccessful.
@@ -1231,6 +1638,12 @@ export declare namespace ConversationFlowComponentResponse {
1231
1638
  * Type of the variable to extract.
1232
1639
  */
1233
1640
  type: 'boolean';
1641
+ /**
1642
+ * Optional instruction to help decide whether this field needs to be populated in
1643
+ * the analysis. If not set, the field is always included. If required is true,
1644
+ * this is ignored.
1645
+ */
1646
+ conditional_prompt?: string;
1234
1647
  /**
1235
1648
  * Whether this data is required. If true and the data is not extracted, the call
1236
1649
  * will be marked as unsuccessful.
@@ -1250,6 +1663,12 @@ export declare namespace ConversationFlowComponentResponse {
1250
1663
  * Type of the variable to extract.
1251
1664
  */
1252
1665
  type: 'number';
1666
+ /**
1667
+ * Optional instruction to help decide whether this field needs to be populated in
1668
+ * the analysis. If not set, the field is always included. If required is true,
1669
+ * this is ignored.
1670
+ */
1671
+ conditional_prompt?: string;
1253
1672
  /**
1254
1673
  * Whether this data is required. If true and the data is not extracted, the call
1255
1674
  * will be marked as unsuccessful.
@@ -3511,6 +3930,12 @@ export declare namespace ConversationFlowComponentResponse {
3511
3930
  * Type of the variable to extract.
3512
3931
  */
3513
3932
  type: 'string';
3933
+ /**
3934
+ * Optional instruction to help decide whether this field needs to be populated in
3935
+ * the analysis. If not set, the field is always included. If required is true,
3936
+ * this is ignored.
3937
+ */
3938
+ conditional_prompt?: string;
3514
3939
  /**
3515
3940
  * Examples of the variable value to teach model the style and syntax.
3516
3941
  */
@@ -3538,6 +3963,12 @@ export declare namespace ConversationFlowComponentResponse {
3538
3963
  * Type of the variable to extract.
3539
3964
  */
3540
3965
  type: 'enum';
3966
+ /**
3967
+ * Optional instruction to help decide whether this field needs to be populated in
3968
+ * the analysis. If not set, the field is always included. If required is true,
3969
+ * this is ignored.
3970
+ */
3971
+ conditional_prompt?: string;
3541
3972
  /**
3542
3973
  * Whether this data is required. If true and the data is not extracted, the call
3543
3974
  * will be marked as unsuccessful.
@@ -3557,6 +3988,12 @@ export declare namespace ConversationFlowComponentResponse {
3557
3988
  * Type of the variable to extract.
3558
3989
  */
3559
3990
  type: 'boolean';
3991
+ /**
3992
+ * Optional instruction to help decide whether this field needs to be populated in
3993
+ * the analysis. If not set, the field is always included. If required is true,
3994
+ * this is ignored.
3995
+ */
3996
+ conditional_prompt?: string;
3560
3997
  /**
3561
3998
  * Whether this data is required. If true and the data is not extracted, the call
3562
3999
  * will be marked as unsuccessful.
@@ -3576,6 +4013,12 @@ export declare namespace ConversationFlowComponentResponse {
3576
4013
  * Type of the variable to extract.
3577
4014
  */
3578
4015
  type: 'number';
4016
+ /**
4017
+ * Optional instruction to help decide whether this field needs to be populated in
4018
+ * the analysis. If not set, the field is always included. If required is true,
4019
+ * this is ignored.
4020
+ */
4021
+ conditional_prompt?: string;
3579
4022
  /**
3580
4023
  * Whether this data is required. If true and the data is not extracted, the call
3581
4024
  * will be marked as unsuccessful.
@@ -5102,6 +5545,41 @@ export declare namespace ConversationFlowComponentResponse {
5102
5545
  */
5103
5546
  timeout_ms?: number;
5104
5547
  }
5548
+ interface Note {
5549
+ /**
5550
+ * Unique identifier for the note.
5551
+ */
5552
+ id: string;
5553
+ /**
5554
+ * Text content of the note, can contain refs to images in the format
5555
+ * "<image:asset_id>"
5556
+ */
5557
+ content: string;
5558
+ /**
5559
+ * Position of the note on the canvas.
5560
+ */
5561
+ display_position: Note.DisplayPosition;
5562
+ /**
5563
+ * Dimensions of the note on the canvas.
5564
+ */
5565
+ size: Note.Size;
5566
+ }
5567
+ namespace Note {
5568
+ /**
5569
+ * Position of the note on the canvas.
5570
+ */
5571
+ interface DisplayPosition {
5572
+ x?: number;
5573
+ y?: number;
5574
+ }
5575
+ /**
5576
+ * Dimensions of the note on the canvas.
5577
+ */
5578
+ interface Size {
5579
+ height?: number;
5580
+ width?: number;
5581
+ }
5582
+ }
5105
5583
  interface CustomTool {
5106
5584
  /**
5107
5585
  * Name of the tool. Must be unique within all tools available to LLM at any given
@@ -5308,7 +5786,7 @@ export interface ConversationFlowComponentCreateParams {
5308
5786
  /**
5309
5787
  * Nodes that make up the component
5310
5788
  */
5311
- nodes: Array<ConversationFlowComponentCreateParams.ConversationNode | ConversationFlowComponentCreateParams.EndNode | ConversationFlowComponentCreateParams.FunctionNode | ConversationFlowComponentCreateParams.CodeNode | ConversationFlowComponentCreateParams.TransferCallNode | ConversationFlowComponentCreateParams.PressDigitNode | ConversationFlowComponentCreateParams.BranchNode | ConversationFlowComponentCreateParams.SMSNode | ConversationFlowComponentCreateParams.ExtractDynamicVariablesNode | ConversationFlowComponentCreateParams.AgentSwapNode | ConversationFlowComponentCreateParams.McpNode | ConversationFlowComponentCreateParams.ComponentNode | ConversationFlowComponentCreateParams.BridgeTransferNode | ConversationFlowComponentCreateParams.CancelTransferNode>;
5789
+ nodes: Array<ConversationFlowComponentCreateParams.ConversationNode | ConversationFlowComponentCreateParams.SubagentNode | ConversationFlowComponentCreateParams.EndNode | ConversationFlowComponentCreateParams.FunctionNode | ConversationFlowComponentCreateParams.CodeNode | ConversationFlowComponentCreateParams.TransferCallNode | ConversationFlowComponentCreateParams.PressDigitNode | ConversationFlowComponentCreateParams.BranchNode | ConversationFlowComponentCreateParams.SMSNode | ConversationFlowComponentCreateParams.ExtractDynamicVariablesNode | ConversationFlowComponentCreateParams.AgentSwapNode | ConversationFlowComponentCreateParams.McpNode | ConversationFlowComponentCreateParams.ComponentNode | ConversationFlowComponentCreateParams.BridgeTransferNode | ConversationFlowComponentCreateParams.CancelTransferNode>;
5312
5790
  /**
5313
5791
  * Display position for the begin tag in the frontend
5314
5792
  */
@@ -5317,6 +5795,10 @@ export interface ConversationFlowComponentCreateParams {
5317
5795
  * A list of MCP server configurations to use for this component
5318
5796
  */
5319
5797
  mcps?: Array<ConversationFlowComponentCreateParams.Mcp> | null;
5798
+ /**
5799
+ * Visual annotations displayed on the flow canvas.
5800
+ */
5801
+ notes?: Array<ConversationFlowComponentCreateParams.Note> | null;
5320
5802
  /**
5321
5803
  * ID of the starting node
5322
5804
  */
@@ -5358,16 +5840,6 @@ export declare namespace ConversationFlowComponentCreateParams {
5358
5840
  name?: string;
5359
5841
  responsiveness?: number | null;
5360
5842
  skip_response_edge?: ConversationNode.SkipResponseEdge;
5361
- /**
5362
- * The tool ids of the tools defined in main conversation flow or component that
5363
- * can be used in this conversation node.
5364
- */
5365
- tool_ids?: Array<string> | null;
5366
- /**
5367
- * The tools owned by this conversation node. This includes other tool types like
5368
- * transfer_call, agent_swap, etc.
5369
- */
5370
- tools?: Array<ConversationNode.EndCallTool | ConversationNode.TransferCallTool | ConversationNode.CheckAvailabilityCalTool | ConversationNode.BookAppointmentCalTool | ConversationNode.AgentSwapTool | ConversationNode.PressDigitTool | ConversationNode.SendSMSTool | ConversationNode.CustomTool | ConversationNode.CodeTool | ConversationNode.ExtractDynamicVariableTool | ConversationNode.BridgeTransferTool | ConversationNode.CancelTransferTool | ConversationNode.McpTool> | null;
5371
5843
  voice_speed?: number | null;
5372
5844
  }
5373
5845
  namespace ConversationNode {
@@ -5720,217 +6192,601 @@ export declare namespace ConversationFlowComponentCreateParams {
5720
6192
  type: 'prompt';
5721
6193
  }
5722
6194
  }
5723
- interface EndCallTool {
5724
- /**
5725
- * Name of the tool. Must be unique within all tools available to LLM at any given
5726
- * time (general tools + state tools + state transitions). Must be consisted of
5727
- * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
5728
- * (no space allowed).
5729
- */
5730
- name: string;
5731
- type: 'end_call';
6195
+ }
6196
+ interface SubagentNode {
6197
+ /**
6198
+ * Unique identifier for the node
6199
+ */
6200
+ id: string;
6201
+ instruction: SubagentNode.Instruction;
6202
+ /**
6203
+ * Type of the node
6204
+ */
6205
+ type: 'subagent';
6206
+ always_edge?: SubagentNode.AlwaysEdge;
6207
+ /**
6208
+ * Position for frontend display
6209
+ */
6210
+ display_position?: SubagentNode.DisplayPosition;
6211
+ edges?: Array<SubagentNode.Edge>;
6212
+ finetune_conversation_examples?: Array<SubagentNode.FinetuneConversationExample>;
6213
+ finetune_transition_examples?: Array<SubagentNode.FinetuneTransitionExample>;
6214
+ global_node_setting?: SubagentNode.GlobalNodeSetting;
6215
+ interruption_sensitivity?: number | null;
6216
+ /**
6217
+ * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
6218
+ */
6219
+ knowledge_base_ids?: Array<string> | null;
6220
+ model_choice?: SubagentNode.ModelChoice;
6221
+ /**
6222
+ * Optional name for display purposes
6223
+ */
6224
+ name?: string;
6225
+ responsiveness?: number | null;
6226
+ skip_response_edge?: SubagentNode.SkipResponseEdge;
6227
+ /**
6228
+ * The tool ids of the tools defined in main conversation flow or component that
6229
+ * can be used in this subagent node.
6230
+ */
6231
+ tool_ids?: Array<string> | null;
6232
+ /**
6233
+ * The tools owned by this subagent node. This includes other tool types like
6234
+ * transfer_call, agent_swap, etc.
6235
+ */
6236
+ tools?: Array<SubagentNode.EndCallTool | SubagentNode.TransferCallTool | SubagentNode.CheckAvailabilityCalTool | SubagentNode.BookAppointmentCalTool | SubagentNode.AgentSwapTool | SubagentNode.PressDigitTool | SubagentNode.SendSMSTool | SubagentNode.CustomTool | SubagentNode.CodeTool | SubagentNode.ExtractDynamicVariableTool | SubagentNode.BridgeTransferTool | SubagentNode.CancelTransferTool | SubagentNode.McpTool> | null;
6237
+ voice_speed?: number | null;
6238
+ }
6239
+ namespace SubagentNode {
6240
+ interface Instruction {
5732
6241
  /**
5733
- * Describes what the tool does, sometimes can also include information about when
5734
- * to call the tool.
6242
+ * The prompt text for the instruction
5735
6243
  */
5736
- description?: string;
6244
+ text: string;
5737
6245
  /**
5738
- * Describes what to say to user when ending the call. Only applicable when
5739
- * speak_during_execution is true.
6246
+ * Type of instruction
5740
6247
  */
5741
- execution_message_description?: string;
6248
+ type: 'prompt';
6249
+ }
6250
+ interface AlwaysEdge {
5742
6251
  /**
5743
- * Type of execution message. "prompt" means the agent will use
5744
- * execution_message_description as a prompt to generate the message. "static_text"
5745
- * means the agent will speak the execution_message_description directly. Defaults
5746
- * to "prompt".
6252
+ * Unique identifier for the edge
5747
6253
  */
5748
- execution_message_type?: 'prompt' | 'static_text';
6254
+ id: string;
6255
+ transition_condition: AlwaysEdge.PromptCondition | AlwaysEdge.EquationCondition | AlwaysEdge.UnionMember2;
5749
6256
  /**
5750
- * If true, will speak during execution.
6257
+ * ID of the destination node
5751
6258
  */
5752
- speak_during_execution?: boolean;
6259
+ destination_node_id?: string;
5753
6260
  }
5754
- interface TransferCallTool {
6261
+ namespace AlwaysEdge {
6262
+ interface PromptCondition {
6263
+ /**
6264
+ * Prompt condition text
6265
+ */
6266
+ prompt: string;
6267
+ type: 'prompt';
6268
+ }
6269
+ interface EquationCondition {
6270
+ equations: Array<EquationCondition.Equation>;
6271
+ operator: '||' | '&&';
6272
+ type: 'equation';
6273
+ /**
6274
+ * Must be "Always" for always edge
6275
+ */
6276
+ prompt?: 'Always';
6277
+ }
6278
+ namespace EquationCondition {
6279
+ interface Equation {
6280
+ /**
6281
+ * Left side of the equation
6282
+ */
6283
+ left: string;
6284
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
6285
+ /**
6286
+ * Right side of the equation. The right side of the equation not required when
6287
+ * "exists" or "not_exist" are selected.
6288
+ */
6289
+ right?: string;
6290
+ }
6291
+ }
6292
+ interface UnionMember2 {
6293
+ /**
6294
+ * Must be "Always" for always edge
6295
+ */
6296
+ prompt: 'Always';
6297
+ type: 'prompt';
6298
+ }
6299
+ }
6300
+ /**
6301
+ * Position for frontend display
6302
+ */
6303
+ interface DisplayPosition {
6304
+ x?: number;
6305
+ y?: number;
6306
+ }
6307
+ interface Edge {
5755
6308
  /**
5756
- * Name of the tool. Must be unique within all tools available to LLM at any given
5757
- * time (general tools + state tools + state edges).
6309
+ * Unique identifier for the edge
5758
6310
  */
5759
- name: string;
5760
- transfer_destination: TransferCallTool.TransferDestinationPredefined | TransferCallTool.TransferDestinationInferred;
5761
- transfer_option: TransferCallTool.TransferOptionColdTransfer | TransferCallTool.TransferOptionWarmTransfer | TransferCallTool.TransferOptionAgenticWarmTransfer;
5762
- type: 'transfer_call';
6311
+ id: string;
6312
+ transition_condition: Edge.PromptCondition | Edge.EquationCondition;
5763
6313
  /**
5764
- * Custom SIP headers to be added to the call.
6314
+ * ID of the destination node
5765
6315
  */
5766
- custom_sip_headers?: {
5767
- [key: string]: string;
5768
- };
6316
+ destination_node_id?: string;
6317
+ }
6318
+ namespace Edge {
6319
+ interface PromptCondition {
6320
+ /**
6321
+ * Prompt condition text
6322
+ */
6323
+ prompt: string;
6324
+ type: 'prompt';
6325
+ }
6326
+ interface EquationCondition {
6327
+ equations: Array<EquationCondition.Equation>;
6328
+ operator: '||' | '&&';
6329
+ type: 'equation';
6330
+ }
6331
+ namespace EquationCondition {
6332
+ interface Equation {
6333
+ /**
6334
+ * Left side of the equation
6335
+ */
6336
+ left: string;
6337
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
6338
+ /**
6339
+ * Right side of the equation. The right side of the equation not required when
6340
+ * "exists" or "not_exist" are selected.
6341
+ */
6342
+ right?: string;
6343
+ }
6344
+ }
6345
+ }
6346
+ interface FinetuneConversationExample {
5769
6347
  /**
5770
- * Describes what the tool does, sometimes can also include information about when
5771
- * to call the tool.
6348
+ * Unique identifier for the example
5772
6349
  */
5773
- description?: string;
6350
+ id: string;
5774
6351
  /**
5775
- * Describes what to say to user when transferring the call. Only applicable when
5776
- * speak_during_execution is true.
6352
+ * The example transcript to finetune how the conversation should be.
5777
6353
  */
5778
- execution_message_description?: string;
6354
+ transcript: Array<FinetuneConversationExample.UnionMember0 | FinetuneConversationExample.UnionMember1 | FinetuneConversationExample.UnionMember2>;
6355
+ }
6356
+ namespace FinetuneConversationExample {
6357
+ interface UnionMember0 {
6358
+ content: string;
6359
+ role: 'agent' | 'user';
6360
+ }
6361
+ interface UnionMember1 {
6362
+ arguments: string;
6363
+ name: string;
6364
+ role: 'tool_call_invocation';
6365
+ tool_call_id: string;
6366
+ }
6367
+ interface UnionMember2 {
6368
+ content: string;
6369
+ role: 'tool_call_result';
6370
+ tool_call_id: string;
6371
+ }
6372
+ }
6373
+ interface FinetuneTransitionExample {
5779
6374
  /**
5780
- * Type of execution message. "prompt" means the agent will use
5781
- * execution_message_description as a prompt to generate the message. "static_text"
5782
- * means the agent will speak the execution_message_description directly. Defaults
5783
- * to "prompt".
6375
+ * Unique identifier for the example
5784
6376
  */
5785
- execution_message_type?: 'prompt' | 'static_text';
6377
+ id: string;
5786
6378
  /**
5787
- * If true, the e.164 validation will be ignored for the from_number. This can be
5788
- * useful when you want to dial to internal pseudo numbers. This only applies when
5789
- * you are using custom telephony and does not apply when you are using Retell
5790
- * Telephony. If omitted, the default value is false.
6379
+ * The example transcript to finetune how the node should transition.
5791
6380
  */
5792
- ignore_e164_validation?: boolean;
6381
+ transcript: Array<FinetuneTransitionExample.UnionMember0 | FinetuneTransitionExample.UnionMember1 | FinetuneTransitionExample.UnionMember2>;
5793
6382
  /**
5794
- * If true, will speak during execution.
6383
+ * Optional destination node ID
5795
6384
  */
5796
- speak_during_execution?: boolean;
6385
+ destination_node_id?: string;
5797
6386
  }
5798
- namespace TransferCallTool {
5799
- interface TransferDestinationPredefined {
5800
- /**
5801
- * The number to transfer to in E.164 format or a dynamic variable like
5802
- * {{transfer_number}}.
5803
- */
5804
- number: string;
5805
- /**
5806
- * The type of transfer destination.
5807
- */
5808
- type: 'predefined';
5809
- /**
5810
- * Extension digits to dial after the main number connects. Sent via DTMF. Allow
5811
- * digits, '\*', '#', or a dynamic variable like {{extension}}.
5812
- */
5813
- extension?: string;
6387
+ namespace FinetuneTransitionExample {
6388
+ interface UnionMember0 {
6389
+ content: string;
6390
+ role: 'agent' | 'user';
5814
6391
  }
5815
- interface TransferDestinationInferred {
5816
- /**
5817
- * The prompt to be used to help infer the transfer destination. The model will
5818
- * take the global prompt, the call transcript, and this prompt together to deduce
5819
- * the right number to transfer to. Can contain dynamic variables.
5820
- */
5821
- prompt: string;
5822
- /**
5823
- * The type of transfer destination.
5824
- */
5825
- type: 'inferred';
6392
+ interface UnionMember1 {
6393
+ arguments: string;
6394
+ name: string;
6395
+ role: 'tool_call_invocation';
6396
+ tool_call_id: string;
5826
6397
  }
5827
- interface TransferOptionColdTransfer {
5828
- /**
5829
- * The type of the transfer.
5830
- */
5831
- type: 'cold_transfer';
5832
- /**
5833
- * The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
5834
- * transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
5835
- * call.
5836
- */
5837
- cold_transfer_mode?: 'sip_refer' | 'sip_invite';
5838
- /**
5839
- * If set to true, will show transferee (the user, not the AI agent) as caller when
5840
- * transferring. Requires the telephony side to support caller id override. Retell
5841
- * Twilio numbers support this option. This parameter takes effect only when
5842
- * `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
5843
- * is not available. Retell Twilio numbers always use user's number as the caller
5844
- * id when using `sip refer` cold transfer mode.
5845
- */
5846
- show_transferee_as_caller?: boolean;
5847
- /**
5848
- * Override the ring duration for this specific transfer, in milliseconds. If not
5849
- * set, falls back to the agent-level `ring_duration_ms`.
5850
- */
5851
- transfer_ring_duration_ms?: number;
6398
+ interface UnionMember2 {
6399
+ content: string;
6400
+ role: 'tool_call_result';
6401
+ tool_call_id: string;
5852
6402
  }
5853
- interface TransferOptionWarmTransfer {
5854
- /**
5855
- * The type of the transfer.
5856
- */
5857
- type: 'warm_transfer';
5858
- /**
5859
- * The time to wait before considering transfer fails.
5860
- */
5861
- agent_detection_timeout_ms?: number;
5862
- /**
5863
- * Whether to play an audio cue when bridging the call. Defaults to true.
5864
- */
5865
- enable_bridge_audio_cue?: boolean;
5866
- /**
5867
- * IVR navigation option to run when doing human detection. This prompt will guide
5868
- * the AI on how to navigate the IVR system.
5869
- */
5870
- ivr_option?: TransferOptionWarmTransfer.IvrOption;
5871
- /**
5872
- * The music to play while the caller is being transferred.
5873
- */
5874
- on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
6403
+ }
6404
+ interface GlobalNodeSetting {
6405
+ /**
6406
+ * Condition for global node activation, cannot be empty
6407
+ */
6408
+ condition: string;
6409
+ /**
6410
+ * The same global node won't be triggered again within the next N node
6411
+ * transitions.
6412
+ */
6413
+ cool_down?: number;
6414
+ /**
6415
+ * The conditions for global node go back. There would be no destination_node_id
6416
+ * for these edges.
6417
+ */
6418
+ go_back_conditions?: Array<GlobalNodeSetting.GoBackCondition>;
6419
+ /**
6420
+ * Don't transition to this node
6421
+ */
6422
+ negative_finetune_examples?: Array<GlobalNodeSetting.NegativeFinetuneExample>;
6423
+ /**
6424
+ * Transition to this node
6425
+ */
6426
+ positive_finetune_examples?: Array<GlobalNodeSetting.PositiveFinetuneExample>;
6427
+ }
6428
+ namespace GlobalNodeSetting {
6429
+ interface GoBackCondition {
5875
6430
  /**
5876
- * If set to true, will not perform human detection for the transfer. Default to
5877
- * false.
6431
+ * Unique identifier for the edge
5878
6432
  */
5879
- opt_out_human_detection?: boolean;
6433
+ id: string;
6434
+ transition_condition: GoBackCondition.PromptCondition | GoBackCondition.EquationCondition;
5880
6435
  /**
5881
- * If set, when transfer is connected, will say the handoff message only to the
5882
- * agent receiving the transfer. Can leave either a static message or a dynamic one
5883
- * based on prompt. Set to null to disable warm handoff.
6436
+ * ID of the destination node
5884
6437
  */
5885
- private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
6438
+ destination_node_id?: string;
6439
+ }
6440
+ namespace GoBackCondition {
6441
+ interface PromptCondition {
6442
+ /**
6443
+ * Prompt condition text
6444
+ */
6445
+ prompt: string;
6446
+ type: 'prompt';
6447
+ }
6448
+ interface EquationCondition {
6449
+ equations: Array<EquationCondition.Equation>;
6450
+ operator: '||' | '&&';
6451
+ type: 'equation';
6452
+ }
6453
+ namespace EquationCondition {
6454
+ interface Equation {
6455
+ /**
6456
+ * Left side of the equation
6457
+ */
6458
+ left: string;
6459
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
6460
+ /**
6461
+ * Right side of the equation. The right side of the equation not required when
6462
+ * "exists" or "not_exist" are selected.
6463
+ */
6464
+ right?: string;
6465
+ }
6466
+ }
6467
+ }
6468
+ interface NegativeFinetuneExample {
5886
6469
  /**
5887
- * If set, when transfer is successful, will say the handoff message to both the
5888
- * transferee and the agent receiving the transfer. Can leave either a static
5889
- * message or a dynamic one based on prompt. Set to null to disable warm handoff.
6470
+ * Find tune the transition condition to this global node
5890
6471
  */
5891
- public_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
6472
+ transcript: Array<NegativeFinetuneExample.UnionMember0 | NegativeFinetuneExample.UnionMember1 | NegativeFinetuneExample.UnionMember2>;
6473
+ }
6474
+ namespace NegativeFinetuneExample {
6475
+ interface UnionMember0 {
6476
+ content: string;
6477
+ role: 'agent' | 'user';
6478
+ }
6479
+ interface UnionMember1 {
6480
+ arguments: string;
6481
+ name: string;
6482
+ role: 'tool_call_invocation';
6483
+ tool_call_id: string;
6484
+ }
6485
+ interface UnionMember2 {
6486
+ content: string;
6487
+ role: 'tool_call_result';
6488
+ tool_call_id: string;
6489
+ }
6490
+ }
6491
+ interface PositiveFinetuneExample {
5892
6492
  /**
5893
- * If set to true, will show transferee (the user, not the AI agent) as caller when
5894
- * transferring, requires the telephony side to support caller id override. Retell
5895
- * Twilio numbers support this option.
6493
+ * Find tune the transition condition to this global node
5896
6494
  */
5897
- show_transferee_as_caller?: boolean;
6495
+ transcript: Array<PositiveFinetuneExample.UnionMember0 | PositiveFinetuneExample.UnionMember1 | PositiveFinetuneExample.UnionMember2>;
6496
+ }
6497
+ namespace PositiveFinetuneExample {
6498
+ interface UnionMember0 {
6499
+ content: string;
6500
+ role: 'agent' | 'user';
6501
+ }
6502
+ interface UnionMember1 {
6503
+ arguments: string;
6504
+ name: string;
6505
+ role: 'tool_call_invocation';
6506
+ tool_call_id: string;
6507
+ }
6508
+ interface UnionMember2 {
6509
+ content: string;
6510
+ role: 'tool_call_result';
6511
+ tool_call_id: string;
6512
+ }
6513
+ }
6514
+ }
6515
+ interface ModelChoice {
6516
+ /**
6517
+ * The LLM model to use
6518
+ */
6519
+ model: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash';
6520
+ /**
6521
+ * Type of model choice
6522
+ */
6523
+ type: 'cascading';
6524
+ /**
6525
+ * Whether to use high priority pool with more dedicated resource, default false
6526
+ */
6527
+ high_priority?: boolean;
6528
+ }
6529
+ interface SkipResponseEdge {
6530
+ /**
6531
+ * Unique identifier for the edge
6532
+ */
6533
+ id: string;
6534
+ transition_condition: SkipResponseEdge.PromptCondition | SkipResponseEdge.EquationCondition | SkipResponseEdge.UnionMember2;
6535
+ /**
6536
+ * ID of the destination node
6537
+ */
6538
+ destination_node_id?: string;
6539
+ }
6540
+ namespace SkipResponseEdge {
6541
+ interface PromptCondition {
5898
6542
  /**
5899
- * Override the ring duration for this specific transfer, in milliseconds. If not
5900
- * set, falls back to the agent-level `ring_duration_ms`.
6543
+ * Prompt condition text
5901
6544
  */
5902
- transfer_ring_duration_ms?: number;
6545
+ prompt: string;
6546
+ type: 'prompt';
5903
6547
  }
5904
- namespace TransferOptionWarmTransfer {
6548
+ interface EquationCondition {
6549
+ equations: Array<EquationCondition.Equation>;
6550
+ operator: '||' | '&&';
6551
+ type: 'equation';
5905
6552
  /**
5906
- * IVR navigation option to run when doing human detection. This prompt will guide
5907
- * the AI on how to navigate the IVR system.
6553
+ * Must be "Skip response" for skip response edge
5908
6554
  */
5909
- interface IvrOption {
5910
- /**
5911
- * The prompt to be used for warm handoff. Can contain dynamic variables.
5912
- */
5913
- prompt?: string;
5914
- type?: 'prompt';
5915
- }
5916
- interface WarmTransferPrompt {
6555
+ prompt?: 'Skip response';
6556
+ }
6557
+ namespace EquationCondition {
6558
+ interface Equation {
5917
6559
  /**
5918
- * The prompt to be used for warm handoff. Can contain dynamic variables.
6560
+ * Left side of the equation
5919
6561
  */
5920
- prompt?: string;
5921
- type?: 'prompt';
5922
- }
5923
- interface WarmTransferStaticMessage {
6562
+ left: string;
6563
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
5924
6564
  /**
5925
- * The static message to be used for warm handoff. Can contain dynamic variables.
6565
+ * Right side of the equation. The right side of the equation not required when
6566
+ * "exists" or "not_exist" are selected.
5926
6567
  */
5927
- message?: string;
5928
- type?: 'static_message';
6568
+ right?: string;
5929
6569
  }
5930
- interface WarmTransferPrompt {
5931
- /**
5932
- * The prompt to be used for warm handoff. Can contain dynamic variables.
5933
- */
6570
+ }
6571
+ interface UnionMember2 {
6572
+ /**
6573
+ * Must be "Skip response" for skip response edge
6574
+ */
6575
+ prompt: 'Skip response';
6576
+ type: 'prompt';
6577
+ }
6578
+ }
6579
+ interface EndCallTool {
6580
+ /**
6581
+ * Name of the tool. Must be unique within all tools available to LLM at any given
6582
+ * time (general tools + state tools + state transitions). Must be consisted of
6583
+ * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
6584
+ * (no space allowed).
6585
+ */
6586
+ name: string;
6587
+ type: 'end_call';
6588
+ /**
6589
+ * Describes what the tool does, sometimes can also include information about when
6590
+ * to call the tool.
6591
+ */
6592
+ description?: string;
6593
+ /**
6594
+ * Describes what to say to user when ending the call. Only applicable when
6595
+ * speak_during_execution is true.
6596
+ */
6597
+ execution_message_description?: string;
6598
+ /**
6599
+ * Type of execution message. "prompt" means the agent will use
6600
+ * execution_message_description as a prompt to generate the message. "static_text"
6601
+ * means the agent will speak the execution_message_description directly. Defaults
6602
+ * to "prompt".
6603
+ */
6604
+ execution_message_type?: 'prompt' | 'static_text';
6605
+ /**
6606
+ * If true, will speak during execution.
6607
+ */
6608
+ speak_during_execution?: boolean;
6609
+ }
6610
+ interface TransferCallTool {
6611
+ /**
6612
+ * Name of the tool. Must be unique within all tools available to LLM at any given
6613
+ * time (general tools + state tools + state edges).
6614
+ */
6615
+ name: string;
6616
+ transfer_destination: TransferCallTool.TransferDestinationPredefined | TransferCallTool.TransferDestinationInferred;
6617
+ transfer_option: TransferCallTool.TransferOptionColdTransfer | TransferCallTool.TransferOptionWarmTransfer | TransferCallTool.TransferOptionAgenticWarmTransfer;
6618
+ type: 'transfer_call';
6619
+ /**
6620
+ * Custom SIP headers to be added to the call.
6621
+ */
6622
+ custom_sip_headers?: {
6623
+ [key: string]: string;
6624
+ };
6625
+ /**
6626
+ * Describes what the tool does, sometimes can also include information about when
6627
+ * to call the tool.
6628
+ */
6629
+ description?: string;
6630
+ /**
6631
+ * Describes what to say to user when transferring the call. Only applicable when
6632
+ * speak_during_execution is true.
6633
+ */
6634
+ execution_message_description?: string;
6635
+ /**
6636
+ * Type of execution message. "prompt" means the agent will use
6637
+ * execution_message_description as a prompt to generate the message. "static_text"
6638
+ * means the agent will speak the execution_message_description directly. Defaults
6639
+ * to "prompt".
6640
+ */
6641
+ execution_message_type?: 'prompt' | 'static_text';
6642
+ /**
6643
+ * If true, the e.164 validation will be ignored for the from_number. This can be
6644
+ * useful when you want to dial to internal pseudo numbers. This only applies when
6645
+ * you are using custom telephony and does not apply when you are using Retell
6646
+ * Telephony. If omitted, the default value is false.
6647
+ */
6648
+ ignore_e164_validation?: boolean;
6649
+ /**
6650
+ * If true, will speak during execution.
6651
+ */
6652
+ speak_during_execution?: boolean;
6653
+ }
6654
+ namespace TransferCallTool {
6655
+ interface TransferDestinationPredefined {
6656
+ /**
6657
+ * The number to transfer to in E.164 format or a dynamic variable like
6658
+ * {{transfer_number}}.
6659
+ */
6660
+ number: string;
6661
+ /**
6662
+ * The type of transfer destination.
6663
+ */
6664
+ type: 'predefined';
6665
+ /**
6666
+ * Extension digits to dial after the main number connects. Sent via DTMF. Allow
6667
+ * digits, '\*', '#', or a dynamic variable like {{extension}}.
6668
+ */
6669
+ extension?: string;
6670
+ }
6671
+ interface TransferDestinationInferred {
6672
+ /**
6673
+ * The prompt to be used to help infer the transfer destination. The model will
6674
+ * take the global prompt, the call transcript, and this prompt together to deduce
6675
+ * the right number to transfer to. Can contain dynamic variables.
6676
+ */
6677
+ prompt: string;
6678
+ /**
6679
+ * The type of transfer destination.
6680
+ */
6681
+ type: 'inferred';
6682
+ }
6683
+ interface TransferOptionColdTransfer {
6684
+ /**
6685
+ * The type of the transfer.
6686
+ */
6687
+ type: 'cold_transfer';
6688
+ /**
6689
+ * The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
6690
+ * transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
6691
+ * call.
6692
+ */
6693
+ cold_transfer_mode?: 'sip_refer' | 'sip_invite';
6694
+ /**
6695
+ * If set to true, will show transferee (the user, not the AI agent) as caller when
6696
+ * transferring. Requires the telephony side to support caller id override. Retell
6697
+ * Twilio numbers support this option. This parameter takes effect only when
6698
+ * `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
6699
+ * is not available. Retell Twilio numbers always use user's number as the caller
6700
+ * id when using `sip refer` cold transfer mode.
6701
+ */
6702
+ show_transferee_as_caller?: boolean;
6703
+ /**
6704
+ * Override the ring duration for this specific transfer, in milliseconds. If not
6705
+ * set, falls back to the agent-level `ring_duration_ms`.
6706
+ */
6707
+ transfer_ring_duration_ms?: number;
6708
+ }
6709
+ interface TransferOptionWarmTransfer {
6710
+ /**
6711
+ * The type of the transfer.
6712
+ */
6713
+ type: 'warm_transfer';
6714
+ /**
6715
+ * The time to wait before considering transfer fails.
6716
+ */
6717
+ agent_detection_timeout_ms?: number;
6718
+ /**
6719
+ * Whether to play an audio cue when bridging the call. Defaults to true.
6720
+ */
6721
+ enable_bridge_audio_cue?: boolean;
6722
+ /**
6723
+ * IVR navigation option to run when doing human detection. This prompt will guide
6724
+ * the AI on how to navigate the IVR system.
6725
+ */
6726
+ ivr_option?: TransferOptionWarmTransfer.IvrOption;
6727
+ /**
6728
+ * The music to play while the caller is being transferred.
6729
+ */
6730
+ on_hold_music?: 'none' | 'relaxing_sound' | 'uplifting_beats' | 'ringtone';
6731
+ /**
6732
+ * If set to true, will not perform human detection for the transfer. Default to
6733
+ * false.
6734
+ */
6735
+ opt_out_human_detection?: boolean;
6736
+ /**
6737
+ * If set, when transfer is connected, will say the handoff message only to the
6738
+ * agent receiving the transfer. Can leave either a static message or a dynamic one
6739
+ * based on prompt. Set to null to disable warm handoff.
6740
+ */
6741
+ private_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
6742
+ /**
6743
+ * If set, when transfer is successful, will say the handoff message to both the
6744
+ * transferee and the agent receiving the transfer. Can leave either a static
6745
+ * message or a dynamic one based on prompt. Set to null to disable warm handoff.
6746
+ */
6747
+ public_handoff_option?: TransferOptionWarmTransfer.WarmTransferPrompt | TransferOptionWarmTransfer.WarmTransferStaticMessage;
6748
+ /**
6749
+ * If set to true, will show transferee (the user, not the AI agent) as caller when
6750
+ * transferring, requires the telephony side to support caller id override. Retell
6751
+ * Twilio numbers support this option.
6752
+ */
6753
+ show_transferee_as_caller?: boolean;
6754
+ /**
6755
+ * Override the ring duration for this specific transfer, in milliseconds. If not
6756
+ * set, falls back to the agent-level `ring_duration_ms`.
6757
+ */
6758
+ transfer_ring_duration_ms?: number;
6759
+ }
6760
+ namespace TransferOptionWarmTransfer {
6761
+ /**
6762
+ * IVR navigation option to run when doing human detection. This prompt will guide
6763
+ * the AI on how to navigate the IVR system.
6764
+ */
6765
+ interface IvrOption {
6766
+ /**
6767
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
6768
+ */
6769
+ prompt?: string;
6770
+ type?: 'prompt';
6771
+ }
6772
+ interface WarmTransferPrompt {
6773
+ /**
6774
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
6775
+ */
6776
+ prompt?: string;
6777
+ type?: 'prompt';
6778
+ }
6779
+ interface WarmTransferStaticMessage {
6780
+ /**
6781
+ * The static message to be used for warm handoff. Can contain dynamic variables.
6782
+ */
6783
+ message?: string;
6784
+ type?: 'static_message';
6785
+ }
6786
+ interface WarmTransferPrompt {
6787
+ /**
6788
+ * The prompt to be used for warm handoff. Can contain dynamic variables.
6789
+ */
5934
6790
  prompt?: string;
5935
6791
  type?: 'prompt';
5936
6792
  }
@@ -6182,6 +7038,23 @@ export declare namespace ConversationFlowComponentCreateParams {
6182
7038
  * to call the tool.
6183
7039
  */
6184
7040
  description?: string;
7041
+ /**
7042
+ * Describes what to say before sending the SMS. Only applicable when
7043
+ * speak_during_execution is true.
7044
+ */
7045
+ execution_message_description?: string;
7046
+ /**
7047
+ * Type of execution message. "prompt" means the agent will use
7048
+ * execution_message_description as a prompt to generate the message. "static_text"
7049
+ * means the agent will speak the execution_message_description directly. Defaults
7050
+ * to "prompt".
7051
+ */
7052
+ execution_message_type?: 'prompt' | 'static_text';
7053
+ /**
7054
+ * If true, the agent will speak a short line before sending the SMS. If omitted,
7055
+ * defaults to true (same as end_call / transfer_call tools).
7056
+ */
7057
+ speak_during_execution?: boolean;
6185
7058
  }
6186
7059
  namespace SendSMSTool {
6187
7060
  interface SMSContentPredefined {
@@ -6402,6 +7275,12 @@ export declare namespace ConversationFlowComponentCreateParams {
6402
7275
  * Type of the variable to extract.
6403
7276
  */
6404
7277
  type: 'string';
7278
+ /**
7279
+ * Optional instruction to help decide whether this field needs to be populated in
7280
+ * the analysis. If not set, the field is always included. If required is true,
7281
+ * this is ignored.
7282
+ */
7283
+ conditional_prompt?: string;
6405
7284
  /**
6406
7285
  * Examples of the variable value to teach model the style and syntax.
6407
7286
  */
@@ -6429,6 +7308,12 @@ export declare namespace ConversationFlowComponentCreateParams {
6429
7308
  * Type of the variable to extract.
6430
7309
  */
6431
7310
  type: 'enum';
7311
+ /**
7312
+ * Optional instruction to help decide whether this field needs to be populated in
7313
+ * the analysis. If not set, the field is always included. If required is true,
7314
+ * this is ignored.
7315
+ */
7316
+ conditional_prompt?: string;
6432
7317
  /**
6433
7318
  * Whether this data is required. If true and the data is not extracted, the call
6434
7319
  * will be marked as unsuccessful.
@@ -6448,6 +7333,12 @@ export declare namespace ConversationFlowComponentCreateParams {
6448
7333
  * Type of the variable to extract.
6449
7334
  */
6450
7335
  type: 'boolean';
7336
+ /**
7337
+ * Optional instruction to help decide whether this field needs to be populated in
7338
+ * the analysis. If not set, the field is always included. If required is true,
7339
+ * this is ignored.
7340
+ */
7341
+ conditional_prompt?: string;
6451
7342
  /**
6452
7343
  * Whether this data is required. If true and the data is not extracted, the call
6453
7344
  * will be marked as unsuccessful.
@@ -6467,6 +7358,12 @@ export declare namespace ConversationFlowComponentCreateParams {
6467
7358
  * Type of the variable to extract.
6468
7359
  */
6469
7360
  type: 'number';
7361
+ /**
7362
+ * Optional instruction to help decide whether this field needs to be populated in
7363
+ * the analysis. If not set, the field is always included. If required is true,
7364
+ * this is ignored.
7365
+ */
7366
+ conditional_prompt?: string;
6470
7367
  /**
6471
7368
  * Whether this data is required. If true and the data is not extracted, the call
6472
7369
  * will be marked as unsuccessful.
@@ -8728,6 +9625,12 @@ export declare namespace ConversationFlowComponentCreateParams {
8728
9625
  * Type of the variable to extract.
8729
9626
  */
8730
9627
  type: 'string';
9628
+ /**
9629
+ * Optional instruction to help decide whether this field needs to be populated in
9630
+ * the analysis. If not set, the field is always included. If required is true,
9631
+ * this is ignored.
9632
+ */
9633
+ conditional_prompt?: string;
8731
9634
  /**
8732
9635
  * Examples of the variable value to teach model the style and syntax.
8733
9636
  */
@@ -8755,6 +9658,12 @@ export declare namespace ConversationFlowComponentCreateParams {
8755
9658
  * Type of the variable to extract.
8756
9659
  */
8757
9660
  type: 'enum';
9661
+ /**
9662
+ * Optional instruction to help decide whether this field needs to be populated in
9663
+ * the analysis. If not set, the field is always included. If required is true,
9664
+ * this is ignored.
9665
+ */
9666
+ conditional_prompt?: string;
8758
9667
  /**
8759
9668
  * Whether this data is required. If true and the data is not extracted, the call
8760
9669
  * will be marked as unsuccessful.
@@ -8774,6 +9683,12 @@ export declare namespace ConversationFlowComponentCreateParams {
8774
9683
  * Type of the variable to extract.
8775
9684
  */
8776
9685
  type: 'boolean';
9686
+ /**
9687
+ * Optional instruction to help decide whether this field needs to be populated in
9688
+ * the analysis. If not set, the field is always included. If required is true,
9689
+ * this is ignored.
9690
+ */
9691
+ conditional_prompt?: string;
8777
9692
  /**
8778
9693
  * Whether this data is required. If true and the data is not extracted, the call
8779
9694
  * will be marked as unsuccessful.
@@ -8793,6 +9708,12 @@ export declare namespace ConversationFlowComponentCreateParams {
8793
9708
  * Type of the variable to extract.
8794
9709
  */
8795
9710
  type: 'number';
9711
+ /**
9712
+ * Optional instruction to help decide whether this field needs to be populated in
9713
+ * the analysis. If not set, the field is always included. If required is true,
9714
+ * this is ignored.
9715
+ */
9716
+ conditional_prompt?: string;
8796
9717
  /**
8797
9718
  * Whether this data is required. If true and the data is not extracted, the call
8798
9719
  * will be marked as unsuccessful.
@@ -9922,225 +10843,904 @@ export declare namespace ConversationFlowComponentCreateParams {
9922
10843
  }
9923
10844
  }
9924
10845
  }
9925
- interface BridgeTransferNode {
10846
+ interface BridgeTransferNode {
10847
+ /**
10848
+ * Unique identifier for the node
10849
+ */
10850
+ id: string;
10851
+ /**
10852
+ * Type of the node - initiates a warm transfer by bridging the call
10853
+ */
10854
+ type: 'bridge_transfer';
10855
+ /**
10856
+ * Position for frontend display
10857
+ */
10858
+ display_position?: BridgeTransferNode.DisplayPosition;
10859
+ global_node_setting?: BridgeTransferNode.GlobalNodeSetting;
10860
+ /**
10861
+ * Describes what to say to user when bridging the transfer. Only applicable when
10862
+ * speak_during_execution is true.
10863
+ */
10864
+ instruction?: BridgeTransferNode.NodeInstructionPrompt | BridgeTransferNode.NodeInstructionStaticText;
10865
+ model_choice?: BridgeTransferNode.ModelChoice;
10866
+ /**
10867
+ * Optional name for display purposes
10868
+ */
10869
+ name?: string;
10870
+ /**
10871
+ * If true, will speak during execution
10872
+ */
10873
+ speak_during_execution?: boolean;
10874
+ }
10875
+ namespace BridgeTransferNode {
10876
+ /**
10877
+ * Position for frontend display
10878
+ */
10879
+ interface DisplayPosition {
10880
+ x?: number;
10881
+ y?: number;
10882
+ }
10883
+ interface GlobalNodeSetting {
10884
+ /**
10885
+ * Condition for global node activation, cannot be empty
10886
+ */
10887
+ condition: string;
10888
+ /**
10889
+ * The same global node won't be triggered again within the next N node
10890
+ * transitions.
10891
+ */
10892
+ cool_down?: number;
10893
+ /**
10894
+ * The conditions for global node go back. There would be no destination_node_id
10895
+ * for these edges.
10896
+ */
10897
+ go_back_conditions?: Array<GlobalNodeSetting.GoBackCondition>;
10898
+ /**
10899
+ * Don't transition to this node
10900
+ */
10901
+ negative_finetune_examples?: Array<GlobalNodeSetting.NegativeFinetuneExample>;
10902
+ /**
10903
+ * Transition to this node
10904
+ */
10905
+ positive_finetune_examples?: Array<GlobalNodeSetting.PositiveFinetuneExample>;
10906
+ }
10907
+ namespace GlobalNodeSetting {
10908
+ interface GoBackCondition {
10909
+ /**
10910
+ * Unique identifier for the edge
10911
+ */
10912
+ id: string;
10913
+ transition_condition: GoBackCondition.PromptCondition | GoBackCondition.EquationCondition;
10914
+ /**
10915
+ * ID of the destination node
10916
+ */
10917
+ destination_node_id?: string;
10918
+ }
10919
+ namespace GoBackCondition {
10920
+ interface PromptCondition {
10921
+ /**
10922
+ * Prompt condition text
10923
+ */
10924
+ prompt: string;
10925
+ type: 'prompt';
10926
+ }
10927
+ interface EquationCondition {
10928
+ equations: Array<EquationCondition.Equation>;
10929
+ operator: '||' | '&&';
10930
+ type: 'equation';
10931
+ }
10932
+ namespace EquationCondition {
10933
+ interface Equation {
10934
+ /**
10935
+ * Left side of the equation
10936
+ */
10937
+ left: string;
10938
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
10939
+ /**
10940
+ * Right side of the equation. The right side of the equation not required when
10941
+ * "exists" or "not_exist" are selected.
10942
+ */
10943
+ right?: string;
10944
+ }
10945
+ }
10946
+ }
10947
+ interface NegativeFinetuneExample {
10948
+ /**
10949
+ * Find tune the transition condition to this global node
10950
+ */
10951
+ transcript: Array<NegativeFinetuneExample.UnionMember0 | NegativeFinetuneExample.UnionMember1 | NegativeFinetuneExample.UnionMember2>;
10952
+ }
10953
+ namespace NegativeFinetuneExample {
10954
+ interface UnionMember0 {
10955
+ content: string;
10956
+ role: 'agent' | 'user';
10957
+ }
10958
+ interface UnionMember1 {
10959
+ arguments: string;
10960
+ name: string;
10961
+ role: 'tool_call_invocation';
10962
+ tool_call_id: string;
10963
+ }
10964
+ interface UnionMember2 {
10965
+ content: string;
10966
+ role: 'tool_call_result';
10967
+ tool_call_id: string;
10968
+ }
10969
+ }
10970
+ interface PositiveFinetuneExample {
10971
+ /**
10972
+ * Find tune the transition condition to this global node
10973
+ */
10974
+ transcript: Array<PositiveFinetuneExample.UnionMember0 | PositiveFinetuneExample.UnionMember1 | PositiveFinetuneExample.UnionMember2>;
10975
+ }
10976
+ namespace PositiveFinetuneExample {
10977
+ interface UnionMember0 {
10978
+ content: string;
10979
+ role: 'agent' | 'user';
10980
+ }
10981
+ interface UnionMember1 {
10982
+ arguments: string;
10983
+ name: string;
10984
+ role: 'tool_call_invocation';
10985
+ tool_call_id: string;
10986
+ }
10987
+ interface UnionMember2 {
10988
+ content: string;
10989
+ role: 'tool_call_result';
10990
+ tool_call_id: string;
10991
+ }
10992
+ }
10993
+ }
10994
+ interface NodeInstructionPrompt {
10995
+ /**
10996
+ * The prompt text for the instruction
10997
+ */
10998
+ text: string;
10999
+ /**
11000
+ * Type of instruction
11001
+ */
11002
+ type: 'prompt';
11003
+ }
11004
+ interface NodeInstructionStaticText {
11005
+ /**
11006
+ * The static text for the instruction
11007
+ */
11008
+ text: string;
11009
+ /**
11010
+ * Type of instruction
11011
+ */
11012
+ type: 'static_text';
11013
+ }
11014
+ interface ModelChoice {
11015
+ /**
11016
+ * The LLM model to use
11017
+ */
11018
+ model: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash';
11019
+ /**
11020
+ * Type of model choice
11021
+ */
11022
+ type: 'cascading';
11023
+ /**
11024
+ * Whether to use high priority pool with more dedicated resource, default false
11025
+ */
11026
+ high_priority?: boolean;
11027
+ }
11028
+ }
11029
+ interface CancelTransferNode {
11030
+ /**
11031
+ * Unique identifier for the node
11032
+ */
11033
+ id: string;
11034
+ /**
11035
+ * Type of the node - cancels the warm transfer and ends the transfer agent call
11036
+ */
11037
+ type: 'cancel_transfer';
11038
+ /**
11039
+ * Position for frontend display
11040
+ */
11041
+ display_position?: CancelTransferNode.DisplayPosition;
11042
+ global_node_setting?: CancelTransferNode.GlobalNodeSetting;
11043
+ /**
11044
+ * Describes what to say to user when cancelling the transfer. Only applicable when
11045
+ * speak_during_execution is true.
11046
+ */
11047
+ instruction?: CancelTransferNode.NodeInstructionPrompt | CancelTransferNode.NodeInstructionStaticText;
11048
+ model_choice?: CancelTransferNode.ModelChoice;
11049
+ /**
11050
+ * Optional name for display purposes
11051
+ */
11052
+ name?: string;
11053
+ /**
11054
+ * If true, will speak during execution
11055
+ */
11056
+ speak_during_execution?: boolean;
11057
+ }
11058
+ namespace CancelTransferNode {
11059
+ /**
11060
+ * Position for frontend display
11061
+ */
11062
+ interface DisplayPosition {
11063
+ x?: number;
11064
+ y?: number;
11065
+ }
11066
+ interface GlobalNodeSetting {
11067
+ /**
11068
+ * Condition for global node activation, cannot be empty
11069
+ */
11070
+ condition: string;
11071
+ /**
11072
+ * The same global node won't be triggered again within the next N node
11073
+ * transitions.
11074
+ */
11075
+ cool_down?: number;
11076
+ /**
11077
+ * The conditions for global node go back. There would be no destination_node_id
11078
+ * for these edges.
11079
+ */
11080
+ go_back_conditions?: Array<GlobalNodeSetting.GoBackCondition>;
11081
+ /**
11082
+ * Don't transition to this node
11083
+ */
11084
+ negative_finetune_examples?: Array<GlobalNodeSetting.NegativeFinetuneExample>;
11085
+ /**
11086
+ * Transition to this node
11087
+ */
11088
+ positive_finetune_examples?: Array<GlobalNodeSetting.PositiveFinetuneExample>;
11089
+ }
11090
+ namespace GlobalNodeSetting {
11091
+ interface GoBackCondition {
11092
+ /**
11093
+ * Unique identifier for the edge
11094
+ */
11095
+ id: string;
11096
+ transition_condition: GoBackCondition.PromptCondition | GoBackCondition.EquationCondition;
11097
+ /**
11098
+ * ID of the destination node
11099
+ */
11100
+ destination_node_id?: string;
11101
+ }
11102
+ namespace GoBackCondition {
11103
+ interface PromptCondition {
11104
+ /**
11105
+ * Prompt condition text
11106
+ */
11107
+ prompt: string;
11108
+ type: 'prompt';
11109
+ }
11110
+ interface EquationCondition {
11111
+ equations: Array<EquationCondition.Equation>;
11112
+ operator: '||' | '&&';
11113
+ type: 'equation';
11114
+ }
11115
+ namespace EquationCondition {
11116
+ interface Equation {
11117
+ /**
11118
+ * Left side of the equation
11119
+ */
11120
+ left: string;
11121
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
11122
+ /**
11123
+ * Right side of the equation. The right side of the equation not required when
11124
+ * "exists" or "not_exist" are selected.
11125
+ */
11126
+ right?: string;
11127
+ }
11128
+ }
11129
+ }
11130
+ interface NegativeFinetuneExample {
11131
+ /**
11132
+ * Find tune the transition condition to this global node
11133
+ */
11134
+ transcript: Array<NegativeFinetuneExample.UnionMember0 | NegativeFinetuneExample.UnionMember1 | NegativeFinetuneExample.UnionMember2>;
11135
+ }
11136
+ namespace NegativeFinetuneExample {
11137
+ interface UnionMember0 {
11138
+ content: string;
11139
+ role: 'agent' | 'user';
11140
+ }
11141
+ interface UnionMember1 {
11142
+ arguments: string;
11143
+ name: string;
11144
+ role: 'tool_call_invocation';
11145
+ tool_call_id: string;
11146
+ }
11147
+ interface UnionMember2 {
11148
+ content: string;
11149
+ role: 'tool_call_result';
11150
+ tool_call_id: string;
11151
+ }
11152
+ }
11153
+ interface PositiveFinetuneExample {
11154
+ /**
11155
+ * Find tune the transition condition to this global node
11156
+ */
11157
+ transcript: Array<PositiveFinetuneExample.UnionMember0 | PositiveFinetuneExample.UnionMember1 | PositiveFinetuneExample.UnionMember2>;
11158
+ }
11159
+ namespace PositiveFinetuneExample {
11160
+ interface UnionMember0 {
11161
+ content: string;
11162
+ role: 'agent' | 'user';
11163
+ }
11164
+ interface UnionMember1 {
11165
+ arguments: string;
11166
+ name: string;
11167
+ role: 'tool_call_invocation';
11168
+ tool_call_id: string;
11169
+ }
11170
+ interface UnionMember2 {
11171
+ content: string;
11172
+ role: 'tool_call_result';
11173
+ tool_call_id: string;
11174
+ }
11175
+ }
11176
+ }
11177
+ interface NodeInstructionPrompt {
11178
+ /**
11179
+ * The prompt text for the instruction
11180
+ */
11181
+ text: string;
11182
+ /**
11183
+ * Type of instruction
11184
+ */
11185
+ type: 'prompt';
11186
+ }
11187
+ interface NodeInstructionStaticText {
11188
+ /**
11189
+ * The static text for the instruction
11190
+ */
11191
+ text: string;
11192
+ /**
11193
+ * Type of instruction
11194
+ */
11195
+ type: 'static_text';
11196
+ }
11197
+ interface ModelChoice {
11198
+ /**
11199
+ * The LLM model to use
11200
+ */
11201
+ model: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash';
11202
+ /**
11203
+ * Type of model choice
11204
+ */
11205
+ type: 'cascading';
11206
+ /**
11207
+ * Whether to use high priority pool with more dedicated resource, default false
11208
+ */
11209
+ high_priority?: boolean;
11210
+ }
11211
+ }
11212
+ /**
11213
+ * Display position for the begin tag in the frontend
11214
+ */
11215
+ interface BeginTagDisplayPosition {
11216
+ x?: number;
11217
+ y?: number;
11218
+ }
11219
+ interface Mcp {
11220
+ name: string;
11221
+ /**
11222
+ * The URL of the MCP server.
11223
+ */
11224
+ url: string;
11225
+ /**
11226
+ * Headers to add to the MCP connection request.
11227
+ */
11228
+ headers?: {
11229
+ [key: string]: string;
11230
+ };
11231
+ /**
11232
+ * Query parameters to append to the MCP connection request URL.
11233
+ */
11234
+ query_params?: {
11235
+ [key: string]: string;
11236
+ };
11237
+ /**
11238
+ * Maximum time to wait for a connection to be established (in milliseconds).
11239
+ * Default to 120,000 ms (2 minutes).
11240
+ */
11241
+ timeout_ms?: number;
11242
+ }
11243
+ interface Note {
11244
+ /**
11245
+ * Unique identifier for the note.
11246
+ */
11247
+ id: string;
11248
+ /**
11249
+ * Text content of the note, can contain refs to images in the format
11250
+ * "<image:asset_id>"
11251
+ */
11252
+ content: string;
11253
+ /**
11254
+ * Position of the note on the canvas.
11255
+ */
11256
+ display_position: Note.DisplayPosition;
11257
+ /**
11258
+ * Dimensions of the note on the canvas.
11259
+ */
11260
+ size: Note.Size;
11261
+ }
11262
+ namespace Note {
11263
+ /**
11264
+ * Position of the note on the canvas.
11265
+ */
11266
+ interface DisplayPosition {
11267
+ x?: number;
11268
+ y?: number;
11269
+ }
11270
+ /**
11271
+ * Dimensions of the note on the canvas.
11272
+ */
11273
+ interface Size {
11274
+ height?: number;
11275
+ width?: number;
11276
+ }
11277
+ }
11278
+ interface CustomTool {
11279
+ /**
11280
+ * Name of the tool. Must be unique within all tools available to LLM at any given
11281
+ * time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
11282
+ * 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
11283
+ * allowed).
11284
+ */
11285
+ name: string;
11286
+ type: 'custom';
11287
+ /**
11288
+ * Describes what the tool does, sometimes can also include information about when
11289
+ * to call the tool.
11290
+ */
11291
+ url: string;
11292
+ /**
11293
+ * If set to true, the parameters will be passed as root level JSON object instead
11294
+ * of nested under "args".
11295
+ */
11296
+ args_at_root?: boolean;
11297
+ /**
11298
+ * Describes what this tool does and when to call this tool.
11299
+ */
11300
+ description?: string;
11301
+ /**
11302
+ * The description for the sentence agent say during execution. Only applicable
11303
+ * when speak_during_execution is true. Can write what to say or even provide
11304
+ * examples. The default is "The message you will say to callee when calling this
11305
+ * tool. Make sure it fits into the conversation smoothly.".
11306
+ */
11307
+ execution_message_description?: string;
11308
+ /**
11309
+ * Type of execution message. "prompt" means the agent will use
11310
+ * execution_message_description as a prompt to generate the message. "static_text"
11311
+ * means the agent will speak the execution_message_description directly. Defaults
11312
+ * to "prompt".
11313
+ */
11314
+ execution_message_type?: 'prompt' | 'static_text';
11315
+ /**
11316
+ * Headers to add to the request.
11317
+ */
11318
+ headers?: {
11319
+ [key: string]: string;
11320
+ };
11321
+ /**
11322
+ * Method to use for the request, default to POST.
11323
+ */
11324
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
11325
+ /**
11326
+ * The parameters the functions accepts, described as a JSON Schema object. See
11327
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
11328
+ * documentation about the format. Omitting parameters defines a function with an
11329
+ * empty parameter list.
11330
+ */
11331
+ parameters?: CustomTool.Parameters;
11332
+ /**
11333
+ * Query parameters to append to the request URL.
11334
+ */
11335
+ query_params?: {
11336
+ [key: string]: string;
11337
+ };
11338
+ /**
11339
+ * A mapping of variable names to JSON paths in the response body. These values
11340
+ * will be extracted from the response and made available as dynamic variables for
11341
+ * use.
11342
+ */
11343
+ response_variables?: {
11344
+ [key: string]: string;
11345
+ };
11346
+ /**
11347
+ * Determines whether the agent would call LLM another time and speak when the
11348
+ * result of function is obtained. Usually this needs to get turned on so user can
11349
+ * get update for the function call.
11350
+ */
11351
+ speak_after_execution?: boolean;
11352
+ /**
11353
+ * Determines whether the agent would say sentence like "One moment, let me check
11354
+ * that." when executing the function. Recommend to turn on if your function call
11355
+ * takes over 1s (including network) to complete, so that your agent remains
11356
+ * responsive.
11357
+ */
11358
+ speak_during_execution?: boolean;
11359
+ /**
11360
+ * The maximum time in milliseconds the tool can run before it's considered
11361
+ * timeout. If the tool times out, the agent would have that info. The minimum
11362
+ * value allowed is 1000 ms (1 s), and maximum value allowed is 600,000 ms (10
11363
+ * min). By default, this is set to 120,000 ms (2 min).
11364
+ */
11365
+ timeout_ms?: number;
11366
+ /**
11367
+ * Unique identifier for the tool
11368
+ */
11369
+ tool_id?: string;
11370
+ }
11371
+ namespace CustomTool {
11372
+ /**
11373
+ * The parameters the functions accepts, described as a JSON Schema object. See
11374
+ * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
11375
+ * documentation about the format. Omitting parameters defines a function with an
11376
+ * empty parameter list.
11377
+ */
11378
+ interface Parameters {
11379
+ /**
11380
+ * The value of properties is an object, where each key is the name of a property
11381
+ * and each value is a schema used to validate that property.
11382
+ */
11383
+ properties: {
11384
+ [key: string]: unknown;
11385
+ };
11386
+ /**
11387
+ * Type must be "object" for a JSON Schema object.
11388
+ */
11389
+ type: 'object';
11390
+ /**
11391
+ * List of names of required property when generating this parameter. LLM will do
11392
+ * its best to generate the required properties in its function arguments. Property
11393
+ * must exist in properties.
11394
+ */
11395
+ required?: Array<string>;
11396
+ }
11397
+ }
11398
+ interface CheckAvailabilityCalTool {
11399
+ /**
11400
+ * Cal.com Api key that have access to the cal.com event you want to check
11401
+ * availability for.
11402
+ */
11403
+ cal_api_key: string;
11404
+ /**
11405
+ * Cal.com event type id number for the cal.com event you want to check
11406
+ * availability for. Can be a number or a dynamic variable in the format
11407
+ * `{{variable_name}}` that will be resolved at runtime.
11408
+ */
11409
+ event_type_id: number | string;
11410
+ /**
11411
+ * Name of the tool. Must be unique within all tools available to LLM at any given
11412
+ * time (general tools + state tools + state transitions). Must be consisted of
11413
+ * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
11414
+ * (no space allowed).
11415
+ */
11416
+ name: string;
11417
+ type: 'check_availability_cal';
11418
+ /**
11419
+ * Describes what the tool does, sometimes can also include information about when
11420
+ * to call the tool.
11421
+ */
11422
+ description?: string;
11423
+ /**
11424
+ * Timezone to be used when checking availability, must be in
11425
+ * [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
11426
+ * Can also be a dynamic variable in the format `{{variable_name}}` that will be
11427
+ * resolved at runtime. If not specified, will check if user specified timezone in
11428
+ * call, and if not, will use the timezone of the Retell servers.
11429
+ */
11430
+ timezone?: string;
11431
+ /**
11432
+ * Unique identifier for the tool
11433
+ */
11434
+ tool_id?: string;
11435
+ }
11436
+ interface BookAppointmentCalTool {
11437
+ /**
11438
+ * Cal.com Api key that have access to the cal.com event you want to book
11439
+ * appointment.
11440
+ */
11441
+ cal_api_key: string;
11442
+ /**
11443
+ * Cal.com event type id number for the cal.com event you want to book appointment.
11444
+ * Can be a number or a dynamic variable in the format `{{variable_name}}` that
11445
+ * will be resolved at runtime.
11446
+ */
11447
+ event_type_id: number | string;
11448
+ /**
11449
+ * Name of the tool. Must be unique within all tools available to LLM at any given
11450
+ * time (general tools + state tools + state transitions). Must be consisted of
11451
+ * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
11452
+ * (no space allowed).
11453
+ */
11454
+ name: string;
11455
+ type: 'book_appointment_cal';
11456
+ /**
11457
+ * Describes what the tool does, sometimes can also include information about when
11458
+ * to call the tool.
11459
+ */
11460
+ description?: string;
11461
+ /**
11462
+ * Timezone to be used when booking appointment, must be in
11463
+ * [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
11464
+ * Can also be a dynamic variable in the format `{{variable_name}}` that will be
11465
+ * resolved at runtime. If not specified, will check if user specified timezone in
11466
+ * call, and if not, will use the timezone of the Retell servers.
11467
+ */
11468
+ timezone?: string;
11469
+ /**
11470
+ * Unique identifier for the tool
11471
+ */
11472
+ tool_id?: string;
11473
+ }
11474
+ }
11475
+ export interface ConversationFlowComponentUpdateParams {
11476
+ /**
11477
+ * Display position for the begin tag in the frontend
11478
+ */
11479
+ begin_tag_display_position?: ConversationFlowComponentUpdateParams.BeginTagDisplayPosition | null;
11480
+ /**
11481
+ * A list of MCP server configurations to use for this component
11482
+ */
11483
+ mcps?: Array<ConversationFlowComponentUpdateParams.Mcp> | null;
11484
+ /**
11485
+ * Name of the component
11486
+ */
11487
+ name?: string;
11488
+ /**
11489
+ * Nodes that make up the component
11490
+ */
11491
+ nodes?: Array<ConversationFlowComponentUpdateParams.ConversationNode | ConversationFlowComponentUpdateParams.SubagentNode | ConversationFlowComponentUpdateParams.EndNode | ConversationFlowComponentUpdateParams.FunctionNode | ConversationFlowComponentUpdateParams.CodeNode | ConversationFlowComponentUpdateParams.TransferCallNode | ConversationFlowComponentUpdateParams.PressDigitNode | ConversationFlowComponentUpdateParams.BranchNode | ConversationFlowComponentUpdateParams.SMSNode | ConversationFlowComponentUpdateParams.ExtractDynamicVariablesNode | ConversationFlowComponentUpdateParams.AgentSwapNode | ConversationFlowComponentUpdateParams.McpNode | ConversationFlowComponentUpdateParams.ComponentNode | ConversationFlowComponentUpdateParams.BridgeTransferNode | ConversationFlowComponentUpdateParams.CancelTransferNode>;
11492
+ /**
11493
+ * Visual annotations displayed on the flow canvas.
11494
+ */
11495
+ notes?: Array<ConversationFlowComponentUpdateParams.Note> | null;
11496
+ /**
11497
+ * ID of the starting node
11498
+ */
11499
+ start_node_id?: string | null;
11500
+ /**
11501
+ * Tools available within the component
11502
+ */
11503
+ tools?: Array<ConversationFlowComponentUpdateParams.CustomTool | ConversationFlowComponentUpdateParams.CheckAvailabilityCalTool | ConversationFlowComponentUpdateParams.BookAppointmentCalTool> | null;
11504
+ }
11505
+ export declare namespace ConversationFlowComponentUpdateParams {
11506
+ /**
11507
+ * Display position for the begin tag in the frontend
11508
+ */
11509
+ interface BeginTagDisplayPosition {
11510
+ x?: number;
11511
+ y?: number;
11512
+ }
11513
+ interface Mcp {
11514
+ name: string;
11515
+ /**
11516
+ * The URL of the MCP server.
11517
+ */
11518
+ url: string;
11519
+ /**
11520
+ * Headers to add to the MCP connection request.
11521
+ */
11522
+ headers?: {
11523
+ [key: string]: string;
11524
+ };
11525
+ /**
11526
+ * Query parameters to append to the MCP connection request URL.
11527
+ */
11528
+ query_params?: {
11529
+ [key: string]: string;
11530
+ };
11531
+ /**
11532
+ * Maximum time to wait for a connection to be established (in milliseconds).
11533
+ * Default to 120,000 ms (2 minutes).
11534
+ */
11535
+ timeout_ms?: number;
11536
+ }
11537
+ interface ConversationNode {
9926
11538
  /**
9927
11539
  * Unique identifier for the node
9928
11540
  */
9929
11541
  id: string;
11542
+ instruction: ConversationNode.NodeInstructionPrompt | ConversationNode.NodeInstructionStaticText;
9930
11543
  /**
9931
- * Type of the node - initiates a warm transfer by bridging the call
11544
+ * Type of the node
9932
11545
  */
9933
- type: 'bridge_transfer';
11546
+ type: 'conversation';
11547
+ always_edge?: ConversationNode.AlwaysEdge;
9934
11548
  /**
9935
11549
  * Position for frontend display
9936
11550
  */
9937
- display_position?: BridgeTransferNode.DisplayPosition;
9938
- global_node_setting?: BridgeTransferNode.GlobalNodeSetting;
11551
+ display_position?: ConversationNode.DisplayPosition;
11552
+ edges?: Array<ConversationNode.Edge>;
11553
+ finetune_conversation_examples?: Array<ConversationNode.FinetuneConversationExample>;
11554
+ finetune_transition_examples?: Array<ConversationNode.FinetuneTransitionExample>;
11555
+ global_node_setting?: ConversationNode.GlobalNodeSetting;
11556
+ interruption_sensitivity?: number | null;
9939
11557
  /**
9940
- * Describes what to say to user when bridging the transfer. Only applicable when
9941
- * speak_during_execution is true.
11558
+ * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
9942
11559
  */
9943
- instruction?: BridgeTransferNode.NodeInstructionPrompt | BridgeTransferNode.NodeInstructionStaticText;
9944
- model_choice?: BridgeTransferNode.ModelChoice;
11560
+ knowledge_base_ids?: Array<string> | null;
11561
+ model_choice?: ConversationNode.ModelChoice;
9945
11562
  /**
9946
11563
  * Optional name for display purposes
9947
11564
  */
9948
11565
  name?: string;
9949
- /**
9950
- * If true, will speak during execution
9951
- */
9952
- speak_during_execution?: boolean;
11566
+ responsiveness?: number | null;
11567
+ skip_response_edge?: ConversationNode.SkipResponseEdge;
11568
+ voice_speed?: number | null;
9953
11569
  }
9954
- namespace BridgeTransferNode {
9955
- /**
9956
- * Position for frontend display
9957
- */
9958
- interface DisplayPosition {
9959
- x?: number;
9960
- y?: number;
9961
- }
9962
- interface GlobalNodeSetting {
11570
+ namespace ConversationNode {
11571
+ interface NodeInstructionPrompt {
9963
11572
  /**
9964
- * Condition for global node activation, cannot be empty
11573
+ * The prompt text for the instruction
9965
11574
  */
9966
- condition: string;
11575
+ text: string;
9967
11576
  /**
9968
- * The same global node won't be triggered again within the next N node
9969
- * transitions.
11577
+ * Type of instruction
9970
11578
  */
9971
- cool_down?: number;
11579
+ type: 'prompt';
11580
+ }
11581
+ interface NodeInstructionStaticText {
9972
11582
  /**
9973
- * The conditions for global node go back. There would be no destination_node_id
9974
- * for these edges.
11583
+ * The static text for the instruction
9975
11584
  */
9976
- go_back_conditions?: Array<GlobalNodeSetting.GoBackCondition>;
11585
+ text: string;
9977
11586
  /**
9978
- * Don't transition to this node
11587
+ * Type of instruction
9979
11588
  */
9980
- negative_finetune_examples?: Array<GlobalNodeSetting.NegativeFinetuneExample>;
11589
+ type: 'static_text';
11590
+ }
11591
+ interface AlwaysEdge {
9981
11592
  /**
9982
- * Transition to this node
11593
+ * Unique identifier for the edge
9983
11594
  */
9984
- positive_finetune_examples?: Array<GlobalNodeSetting.PositiveFinetuneExample>;
11595
+ id: string;
11596
+ transition_condition: AlwaysEdge.PromptCondition | AlwaysEdge.EquationCondition | AlwaysEdge.UnionMember2;
11597
+ /**
11598
+ * ID of the destination node
11599
+ */
11600
+ destination_node_id?: string;
9985
11601
  }
9986
- namespace GlobalNodeSetting {
9987
- interface GoBackCondition {
11602
+ namespace AlwaysEdge {
11603
+ interface PromptCondition {
9988
11604
  /**
9989
- * Unique identifier for the edge
11605
+ * Prompt condition text
9990
11606
  */
9991
- id: string;
9992
- transition_condition: GoBackCondition.PromptCondition | GoBackCondition.EquationCondition;
11607
+ prompt: string;
11608
+ type: 'prompt';
11609
+ }
11610
+ interface EquationCondition {
11611
+ equations: Array<EquationCondition.Equation>;
11612
+ operator: '||' | '&&';
11613
+ type: 'equation';
9993
11614
  /**
9994
- * ID of the destination node
11615
+ * Must be "Always" for always edge
9995
11616
  */
9996
- destination_node_id?: string;
11617
+ prompt?: 'Always';
9997
11618
  }
9998
- namespace GoBackCondition {
9999
- interface PromptCondition {
11619
+ namespace EquationCondition {
11620
+ interface Equation {
10000
11621
  /**
10001
- * Prompt condition text
11622
+ * Left side of the equation
10002
11623
  */
10003
- prompt: string;
10004
- type: 'prompt';
10005
- }
10006
- interface EquationCondition {
10007
- equations: Array<EquationCondition.Equation>;
10008
- operator: '||' | '&&';
10009
- type: 'equation';
10010
- }
10011
- namespace EquationCondition {
10012
- interface Equation {
10013
- /**
10014
- * Left side of the equation
10015
- */
10016
- left: string;
10017
- operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
10018
- /**
10019
- * Right side of the equation. The right side of the equation not required when
10020
- * "exists" or "not_exist" are selected.
10021
- */
10022
- right?: string;
10023
- }
10024
- }
10025
- }
10026
- interface NegativeFinetuneExample {
10027
- /**
10028
- * Find tune the transition condition to this global node
10029
- */
10030
- transcript: Array<NegativeFinetuneExample.UnionMember0 | NegativeFinetuneExample.UnionMember1 | NegativeFinetuneExample.UnionMember2>;
10031
- }
10032
- namespace NegativeFinetuneExample {
10033
- interface UnionMember0 {
10034
- content: string;
10035
- role: 'agent' | 'user';
10036
- }
10037
- interface UnionMember1 {
10038
- arguments: string;
10039
- name: string;
10040
- role: 'tool_call_invocation';
10041
- tool_call_id: string;
10042
- }
10043
- interface UnionMember2 {
10044
- content: string;
10045
- role: 'tool_call_result';
10046
- tool_call_id: string;
11624
+ left: string;
11625
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
11626
+ /**
11627
+ * Right side of the equation. The right side of the equation not required when
11628
+ * "exists" or "not_exist" are selected.
11629
+ */
11630
+ right?: string;
10047
11631
  }
10048
11632
  }
10049
- interface PositiveFinetuneExample {
11633
+ interface UnionMember2 {
10050
11634
  /**
10051
- * Find tune the transition condition to this global node
11635
+ * Must be "Always" for always edge
10052
11636
  */
10053
- transcript: Array<PositiveFinetuneExample.UnionMember0 | PositiveFinetuneExample.UnionMember1 | PositiveFinetuneExample.UnionMember2>;
10054
- }
10055
- namespace PositiveFinetuneExample {
10056
- interface UnionMember0 {
10057
- content: string;
10058
- role: 'agent' | 'user';
10059
- }
10060
- interface UnionMember1 {
10061
- arguments: string;
10062
- name: string;
10063
- role: 'tool_call_invocation';
10064
- tool_call_id: string;
10065
- }
10066
- interface UnionMember2 {
10067
- content: string;
10068
- role: 'tool_call_result';
10069
- tool_call_id: string;
10070
- }
11637
+ prompt: 'Always';
11638
+ type: 'prompt';
10071
11639
  }
10072
11640
  }
10073
- interface NodeInstructionPrompt {
11641
+ /**
11642
+ * Position for frontend display
11643
+ */
11644
+ interface DisplayPosition {
11645
+ x?: number;
11646
+ y?: number;
11647
+ }
11648
+ interface Edge {
10074
11649
  /**
10075
- * The prompt text for the instruction
11650
+ * Unique identifier for the edge
10076
11651
  */
10077
- text: string;
11652
+ id: string;
11653
+ transition_condition: Edge.PromptCondition | Edge.EquationCondition;
10078
11654
  /**
10079
- * Type of instruction
11655
+ * ID of the destination node
10080
11656
  */
10081
- type: 'prompt';
11657
+ destination_node_id?: string;
10082
11658
  }
10083
- interface NodeInstructionStaticText {
11659
+ namespace Edge {
11660
+ interface PromptCondition {
11661
+ /**
11662
+ * Prompt condition text
11663
+ */
11664
+ prompt: string;
11665
+ type: 'prompt';
11666
+ }
11667
+ interface EquationCondition {
11668
+ equations: Array<EquationCondition.Equation>;
11669
+ operator: '||' | '&&';
11670
+ type: 'equation';
11671
+ }
11672
+ namespace EquationCondition {
11673
+ interface Equation {
11674
+ /**
11675
+ * Left side of the equation
11676
+ */
11677
+ left: string;
11678
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
11679
+ /**
11680
+ * Right side of the equation. The right side of the equation not required when
11681
+ * "exists" or "not_exist" are selected.
11682
+ */
11683
+ right?: string;
11684
+ }
11685
+ }
11686
+ }
11687
+ interface FinetuneConversationExample {
10084
11688
  /**
10085
- * The static text for the instruction
11689
+ * Unique identifier for the example
10086
11690
  */
10087
- text: string;
11691
+ id: string;
10088
11692
  /**
10089
- * Type of instruction
11693
+ * The example transcript to finetune how the conversation should be.
10090
11694
  */
10091
- type: 'static_text';
11695
+ transcript: Array<FinetuneConversationExample.UnionMember0 | FinetuneConversationExample.UnionMember1 | FinetuneConversationExample.UnionMember2>;
10092
11696
  }
10093
- interface ModelChoice {
11697
+ namespace FinetuneConversationExample {
11698
+ interface UnionMember0 {
11699
+ content: string;
11700
+ role: 'agent' | 'user';
11701
+ }
11702
+ interface UnionMember1 {
11703
+ arguments: string;
11704
+ name: string;
11705
+ role: 'tool_call_invocation';
11706
+ tool_call_id: string;
11707
+ }
11708
+ interface UnionMember2 {
11709
+ content: string;
11710
+ role: 'tool_call_result';
11711
+ tool_call_id: string;
11712
+ }
11713
+ }
11714
+ interface FinetuneTransitionExample {
10094
11715
  /**
10095
- * The LLM model to use
11716
+ * Unique identifier for the example
10096
11717
  */
10097
- model: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash';
11718
+ id: string;
10098
11719
  /**
10099
- * Type of model choice
11720
+ * The example transcript to finetune how the node should transition.
10100
11721
  */
10101
- type: 'cascading';
11722
+ transcript: Array<FinetuneTransitionExample.UnionMember0 | FinetuneTransitionExample.UnionMember1 | FinetuneTransitionExample.UnionMember2>;
10102
11723
  /**
10103
- * Whether to use high priority pool with more dedicated resource, default false
11724
+ * Optional destination node ID
10104
11725
  */
10105
- high_priority?: boolean;
11726
+ destination_node_id?: string;
10106
11727
  }
10107
- }
10108
- interface CancelTransferNode {
10109
- /**
10110
- * Unique identifier for the node
10111
- */
10112
- id: string;
10113
- /**
10114
- * Type of the node - cancels the warm transfer and ends the transfer agent call
10115
- */
10116
- type: 'cancel_transfer';
10117
- /**
10118
- * Position for frontend display
10119
- */
10120
- display_position?: CancelTransferNode.DisplayPosition;
10121
- global_node_setting?: CancelTransferNode.GlobalNodeSetting;
10122
- /**
10123
- * Describes what to say to user when cancelling the transfer. Only applicable when
10124
- * speak_during_execution is true.
10125
- */
10126
- instruction?: CancelTransferNode.NodeInstructionPrompt | CancelTransferNode.NodeInstructionStaticText;
10127
- model_choice?: CancelTransferNode.ModelChoice;
10128
- /**
10129
- * Optional name for display purposes
10130
- */
10131
- name?: string;
10132
- /**
10133
- * If true, will speak during execution
10134
- */
10135
- speak_during_execution?: boolean;
10136
- }
10137
- namespace CancelTransferNode {
10138
- /**
10139
- * Position for frontend display
10140
- */
10141
- interface DisplayPosition {
10142
- x?: number;
10143
- y?: number;
11728
+ namespace FinetuneTransitionExample {
11729
+ interface UnionMember0 {
11730
+ content: string;
11731
+ role: 'agent' | 'user';
11732
+ }
11733
+ interface UnionMember1 {
11734
+ arguments: string;
11735
+ name: string;
11736
+ role: 'tool_call_invocation';
11737
+ tool_call_id: string;
11738
+ }
11739
+ interface UnionMember2 {
11740
+ content: string;
11741
+ role: 'tool_call_result';
11742
+ tool_call_id: string;
11743
+ }
10144
11744
  }
10145
11745
  interface GlobalNodeSetting {
10146
11746
  /**
@@ -10253,26 +11853,6 @@ export declare namespace ConversationFlowComponentCreateParams {
10253
11853
  }
10254
11854
  }
10255
11855
  }
10256
- interface NodeInstructionPrompt {
10257
- /**
10258
- * The prompt text for the instruction
10259
- */
10260
- text: string;
10261
- /**
10262
- * Type of instruction
10263
- */
10264
- type: 'prompt';
10265
- }
10266
- interface NodeInstructionStaticText {
10267
- /**
10268
- * The static text for the instruction
10269
- */
10270
- text: string;
10271
- /**
10272
- * Type of instruction
10273
- */
10274
- type: 'static_text';
10275
- }
10276
11856
  interface ModelChoice {
10277
11857
  /**
10278
11858
  * The LLM model to use
@@ -10287,338 +11867,102 @@ export declare namespace ConversationFlowComponentCreateParams {
10287
11867
  */
10288
11868
  high_priority?: boolean;
10289
11869
  }
10290
- }
10291
- /**
10292
- * Display position for the begin tag in the frontend
10293
- */
10294
- interface BeginTagDisplayPosition {
10295
- x?: number;
10296
- y?: number;
10297
- }
10298
- interface Mcp {
10299
- name: string;
10300
- /**
10301
- * The URL of the MCP server.
10302
- */
10303
- url: string;
10304
- /**
10305
- * Headers to add to the MCP connection request.
10306
- */
10307
- headers?: {
10308
- [key: string]: string;
10309
- };
10310
- /**
10311
- * Query parameters to append to the MCP connection request URL.
10312
- */
10313
- query_params?: {
10314
- [key: string]: string;
10315
- };
10316
- /**
10317
- * Maximum time to wait for a connection to be established (in milliseconds).
10318
- * Default to 120,000 ms (2 minutes).
10319
- */
10320
- timeout_ms?: number;
10321
- }
10322
- interface CustomTool {
10323
- /**
10324
- * Name of the tool. Must be unique within all tools available to LLM at any given
10325
- * time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
10326
- * 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
10327
- * allowed).
10328
- */
10329
- name: string;
10330
- type: 'custom';
10331
- /**
10332
- * Describes what the tool does, sometimes can also include information about when
10333
- * to call the tool.
10334
- */
10335
- url: string;
10336
- /**
10337
- * If set to true, the parameters will be passed as root level JSON object instead
10338
- * of nested under "args".
10339
- */
10340
- args_at_root?: boolean;
10341
- /**
10342
- * Describes what this tool does and when to call this tool.
10343
- */
10344
- description?: string;
10345
- /**
10346
- * The description for the sentence agent say during execution. Only applicable
10347
- * when speak_during_execution is true. Can write what to say or even provide
10348
- * examples. The default is "The message you will say to callee when calling this
10349
- * tool. Make sure it fits into the conversation smoothly.".
10350
- */
10351
- execution_message_description?: string;
10352
- /**
10353
- * Type of execution message. "prompt" means the agent will use
10354
- * execution_message_description as a prompt to generate the message. "static_text"
10355
- * means the agent will speak the execution_message_description directly. Defaults
10356
- * to "prompt".
10357
- */
10358
- execution_message_type?: 'prompt' | 'static_text';
10359
- /**
10360
- * Headers to add to the request.
10361
- */
10362
- headers?: {
10363
- [key: string]: string;
10364
- };
10365
- /**
10366
- * Method to use for the request, default to POST.
10367
- */
10368
- method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
10369
- /**
10370
- * The parameters the functions accepts, described as a JSON Schema object. See
10371
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
10372
- * documentation about the format. Omitting parameters defines a function with an
10373
- * empty parameter list.
10374
- */
10375
- parameters?: CustomTool.Parameters;
10376
- /**
10377
- * Query parameters to append to the request URL.
10378
- */
10379
- query_params?: {
10380
- [key: string]: string;
10381
- };
10382
- /**
10383
- * A mapping of variable names to JSON paths in the response body. These values
10384
- * will be extracted from the response and made available as dynamic variables for
10385
- * use.
10386
- */
10387
- response_variables?: {
10388
- [key: string]: string;
10389
- };
10390
- /**
10391
- * Determines whether the agent would call LLM another time and speak when the
10392
- * result of function is obtained. Usually this needs to get turned on so user can
10393
- * get update for the function call.
10394
- */
10395
- speak_after_execution?: boolean;
10396
- /**
10397
- * Determines whether the agent would say sentence like "One moment, let me check
10398
- * that." when executing the function. Recommend to turn on if your function call
10399
- * takes over 1s (including network) to complete, so that your agent remains
10400
- * responsive.
10401
- */
10402
- speak_during_execution?: boolean;
10403
- /**
10404
- * The maximum time in milliseconds the tool can run before it's considered
10405
- * timeout. If the tool times out, the agent would have that info. The minimum
10406
- * value allowed is 1000 ms (1 s), and maximum value allowed is 600,000 ms (10
10407
- * min). By default, this is set to 120,000 ms (2 min).
10408
- */
10409
- timeout_ms?: number;
10410
- /**
10411
- * Unique identifier for the tool
10412
- */
10413
- tool_id?: string;
10414
- }
10415
- namespace CustomTool {
10416
- /**
10417
- * The parameters the functions accepts, described as a JSON Schema object. See
10418
- * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
10419
- * documentation about the format. Omitting parameters defines a function with an
10420
- * empty parameter list.
10421
- */
10422
- interface Parameters {
10423
- /**
10424
- * The value of properties is an object, where each key is the name of a property
10425
- * and each value is a schema used to validate that property.
10426
- */
10427
- properties: {
10428
- [key: string]: unknown;
10429
- };
11870
+ interface SkipResponseEdge {
10430
11871
  /**
10431
- * Type must be "object" for a JSON Schema object.
11872
+ * Unique identifier for the edge
10432
11873
  */
10433
- type: 'object';
11874
+ id: string;
11875
+ transition_condition: SkipResponseEdge.PromptCondition | SkipResponseEdge.EquationCondition | SkipResponseEdge.UnionMember2;
10434
11876
  /**
10435
- * List of names of required property when generating this parameter. LLM will do
10436
- * its best to generate the required properties in its function arguments. Property
10437
- * must exist in properties.
11877
+ * ID of the destination node
10438
11878
  */
10439
- required?: Array<string>;
11879
+ destination_node_id?: string;
11880
+ }
11881
+ namespace SkipResponseEdge {
11882
+ interface PromptCondition {
11883
+ /**
11884
+ * Prompt condition text
11885
+ */
11886
+ prompt: string;
11887
+ type: 'prompt';
11888
+ }
11889
+ interface EquationCondition {
11890
+ equations: Array<EquationCondition.Equation>;
11891
+ operator: '||' | '&&';
11892
+ type: 'equation';
11893
+ /**
11894
+ * Must be "Skip response" for skip response edge
11895
+ */
11896
+ prompt?: 'Skip response';
11897
+ }
11898
+ namespace EquationCondition {
11899
+ interface Equation {
11900
+ /**
11901
+ * Left side of the equation
11902
+ */
11903
+ left: string;
11904
+ operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'not_contains' | 'exists' | 'not_exist';
11905
+ /**
11906
+ * Right side of the equation. The right side of the equation not required when
11907
+ * "exists" or "not_exist" are selected.
11908
+ */
11909
+ right?: string;
11910
+ }
11911
+ }
11912
+ interface UnionMember2 {
11913
+ /**
11914
+ * Must be "Skip response" for skip response edge
11915
+ */
11916
+ prompt: 'Skip response';
11917
+ type: 'prompt';
11918
+ }
10440
11919
  }
10441
11920
  }
10442
- interface CheckAvailabilityCalTool {
10443
- /**
10444
- * Cal.com Api key that have access to the cal.com event you want to check
10445
- * availability for.
10446
- */
10447
- cal_api_key: string;
10448
- /**
10449
- * Cal.com event type id number for the cal.com event you want to check
10450
- * availability for. Can be a number or a dynamic variable in the format
10451
- * `{{variable_name}}` that will be resolved at runtime.
10452
- */
10453
- event_type_id: number | string;
10454
- /**
10455
- * Name of the tool. Must be unique within all tools available to LLM at any given
10456
- * time (general tools + state tools + state transitions). Must be consisted of
10457
- * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
10458
- * (no space allowed).
10459
- */
10460
- name: string;
10461
- type: 'check_availability_cal';
10462
- /**
10463
- * Describes what the tool does, sometimes can also include information about when
10464
- * to call the tool.
10465
- */
10466
- description?: string;
10467
- /**
10468
- * Timezone to be used when checking availability, must be in
10469
- * [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
10470
- * Can also be a dynamic variable in the format `{{variable_name}}` that will be
10471
- * resolved at runtime. If not specified, will check if user specified timezone in
10472
- * call, and if not, will use the timezone of the Retell servers.
10473
- */
10474
- timezone?: string;
10475
- /**
10476
- * Unique identifier for the tool
10477
- */
10478
- tool_id?: string;
10479
- }
10480
- interface BookAppointmentCalTool {
10481
- /**
10482
- * Cal.com Api key that have access to the cal.com event you want to book
10483
- * appointment.
10484
- */
10485
- cal_api_key: string;
10486
- /**
10487
- * Cal.com event type id number for the cal.com event you want to book appointment.
10488
- * Can be a number or a dynamic variable in the format `{{variable_name}}` that
10489
- * will be resolved at runtime.
10490
- */
10491
- event_type_id: number | string;
10492
- /**
10493
- * Name of the tool. Must be unique within all tools available to LLM at any given
10494
- * time (general tools + state tools + state transitions). Must be consisted of
10495
- * a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
10496
- * (no space allowed).
10497
- */
10498
- name: string;
10499
- type: 'book_appointment_cal';
10500
- /**
10501
- * Describes what the tool does, sometimes can also include information about when
10502
- * to call the tool.
10503
- */
10504
- description?: string;
10505
- /**
10506
- * Timezone to be used when booking appointment, must be in
10507
- * [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
10508
- * Can also be a dynamic variable in the format `{{variable_name}}` that will be
10509
- * resolved at runtime. If not specified, will check if user specified timezone in
10510
- * call, and if not, will use the timezone of the Retell servers.
10511
- */
10512
- timezone?: string;
10513
- /**
10514
- * Unique identifier for the tool
10515
- */
10516
- tool_id?: string;
10517
- }
10518
- }
10519
- export interface ConversationFlowComponentUpdateParams {
10520
- /**
10521
- * Display position for the begin tag in the frontend
10522
- */
10523
- begin_tag_display_position?: ConversationFlowComponentUpdateParams.BeginTagDisplayPosition | null;
10524
- /**
10525
- * A list of MCP server configurations to use for this component
10526
- */
10527
- mcps?: Array<ConversationFlowComponentUpdateParams.Mcp> | null;
10528
- /**
10529
- * Name of the component
10530
- */
10531
- name?: string;
10532
- /**
10533
- * Nodes that make up the component
10534
- */
10535
- nodes?: Array<ConversationFlowComponentUpdateParams.ConversationNode | ConversationFlowComponentUpdateParams.EndNode | ConversationFlowComponentUpdateParams.FunctionNode | ConversationFlowComponentUpdateParams.CodeNode | ConversationFlowComponentUpdateParams.TransferCallNode | ConversationFlowComponentUpdateParams.PressDigitNode | ConversationFlowComponentUpdateParams.BranchNode | ConversationFlowComponentUpdateParams.SMSNode | ConversationFlowComponentUpdateParams.ExtractDynamicVariablesNode | ConversationFlowComponentUpdateParams.AgentSwapNode | ConversationFlowComponentUpdateParams.McpNode | ConversationFlowComponentUpdateParams.ComponentNode | ConversationFlowComponentUpdateParams.BridgeTransferNode | ConversationFlowComponentUpdateParams.CancelTransferNode>;
10536
- /**
10537
- * ID of the starting node
10538
- */
10539
- start_node_id?: string | null;
10540
- /**
10541
- * Tools available within the component
10542
- */
10543
- tools?: Array<ConversationFlowComponentUpdateParams.CustomTool | ConversationFlowComponentUpdateParams.CheckAvailabilityCalTool | ConversationFlowComponentUpdateParams.BookAppointmentCalTool> | null;
10544
- }
10545
- export declare namespace ConversationFlowComponentUpdateParams {
10546
- /**
10547
- * Display position for the begin tag in the frontend
10548
- */
10549
- interface BeginTagDisplayPosition {
10550
- x?: number;
10551
- y?: number;
10552
- }
10553
- interface Mcp {
10554
- name: string;
10555
- /**
10556
- * The URL of the MCP server.
10557
- */
10558
- url: string;
10559
- /**
10560
- * Headers to add to the MCP connection request.
10561
- */
10562
- headers?: {
10563
- [key: string]: string;
10564
- };
10565
- /**
10566
- * Query parameters to append to the MCP connection request URL.
10567
- */
10568
- query_params?: {
10569
- [key: string]: string;
10570
- };
10571
- /**
10572
- * Maximum time to wait for a connection to be established (in milliseconds).
10573
- * Default to 120,000 ms (2 minutes).
10574
- */
10575
- timeout_ms?: number;
10576
- }
10577
- interface ConversationNode {
11921
+ interface SubagentNode {
10578
11922
  /**
10579
11923
  * Unique identifier for the node
10580
11924
  */
10581
11925
  id: string;
10582
- instruction: ConversationNode.NodeInstructionPrompt | ConversationNode.NodeInstructionStaticText;
11926
+ instruction: SubagentNode.Instruction;
10583
11927
  /**
10584
11928
  * Type of the node
10585
11929
  */
10586
- type: 'conversation';
10587
- always_edge?: ConversationNode.AlwaysEdge;
11930
+ type: 'subagent';
11931
+ always_edge?: SubagentNode.AlwaysEdge;
10588
11932
  /**
10589
11933
  * Position for frontend display
10590
11934
  */
10591
- display_position?: ConversationNode.DisplayPosition;
10592
- edges?: Array<ConversationNode.Edge>;
10593
- finetune_conversation_examples?: Array<ConversationNode.FinetuneConversationExample>;
10594
- finetune_transition_examples?: Array<ConversationNode.FinetuneTransitionExample>;
10595
- global_node_setting?: ConversationNode.GlobalNodeSetting;
11935
+ display_position?: SubagentNode.DisplayPosition;
11936
+ edges?: Array<SubagentNode.Edge>;
11937
+ finetune_conversation_examples?: Array<SubagentNode.FinetuneConversationExample>;
11938
+ finetune_transition_examples?: Array<SubagentNode.FinetuneTransitionExample>;
11939
+ global_node_setting?: SubagentNode.GlobalNodeSetting;
10596
11940
  interruption_sensitivity?: number | null;
10597
11941
  /**
10598
11942
  * Knowledge base IDs for RAG (Retrieval-Augmented Generation).
10599
11943
  */
10600
11944
  knowledge_base_ids?: Array<string> | null;
10601
- model_choice?: ConversationNode.ModelChoice;
11945
+ model_choice?: SubagentNode.ModelChoice;
10602
11946
  /**
10603
11947
  * Optional name for display purposes
10604
11948
  */
10605
11949
  name?: string;
10606
11950
  responsiveness?: number | null;
10607
- skip_response_edge?: ConversationNode.SkipResponseEdge;
11951
+ skip_response_edge?: SubagentNode.SkipResponseEdge;
10608
11952
  /**
10609
11953
  * The tool ids of the tools defined in main conversation flow or component that
10610
- * can be used in this conversation node.
11954
+ * can be used in this subagent node.
10611
11955
  */
10612
11956
  tool_ids?: Array<string> | null;
10613
11957
  /**
10614
- * The tools owned by this conversation node. This includes other tool types like
11958
+ * The tools owned by this subagent node. This includes other tool types like
10615
11959
  * transfer_call, agent_swap, etc.
10616
11960
  */
10617
- tools?: Array<ConversationNode.EndCallTool | ConversationNode.TransferCallTool | ConversationNode.CheckAvailabilityCalTool | ConversationNode.BookAppointmentCalTool | ConversationNode.AgentSwapTool | ConversationNode.PressDigitTool | ConversationNode.SendSMSTool | ConversationNode.CustomTool | ConversationNode.CodeTool | ConversationNode.ExtractDynamicVariableTool | ConversationNode.BridgeTransferTool | ConversationNode.CancelTransferTool | ConversationNode.McpTool> | null;
11961
+ tools?: Array<SubagentNode.EndCallTool | SubagentNode.TransferCallTool | SubagentNode.CheckAvailabilityCalTool | SubagentNode.BookAppointmentCalTool | SubagentNode.AgentSwapTool | SubagentNode.PressDigitTool | SubagentNode.SendSMSTool | SubagentNode.CustomTool | SubagentNode.CodeTool | SubagentNode.ExtractDynamicVariableTool | SubagentNode.BridgeTransferTool | SubagentNode.CancelTransferTool | SubagentNode.McpTool> | null;
10618
11962
  voice_speed?: number | null;
10619
11963
  }
10620
- namespace ConversationNode {
10621
- interface NodeInstructionPrompt {
11964
+ namespace SubagentNode {
11965
+ interface Instruction {
10622
11966
  /**
10623
11967
  * The prompt text for the instruction
10624
11968
  */
@@ -10628,16 +11972,6 @@ export declare namespace ConversationFlowComponentUpdateParams {
10628
11972
  */
10629
11973
  type: 'prompt';
10630
11974
  }
10631
- interface NodeInstructionStaticText {
10632
- /**
10633
- * The static text for the instruction
10634
- */
10635
- text: string;
10636
- /**
10637
- * Type of instruction
10638
- */
10639
- type: 'static_text';
10640
- }
10641
11975
  interface AlwaysEdge {
10642
11976
  /**
10643
11977
  * Unique identifier for the edge
@@ -11429,6 +12763,23 @@ export declare namespace ConversationFlowComponentUpdateParams {
11429
12763
  * to call the tool.
11430
12764
  */
11431
12765
  description?: string;
12766
+ /**
12767
+ * Describes what to say before sending the SMS. Only applicable when
12768
+ * speak_during_execution is true.
12769
+ */
12770
+ execution_message_description?: string;
12771
+ /**
12772
+ * Type of execution message. "prompt" means the agent will use
12773
+ * execution_message_description as a prompt to generate the message. "static_text"
12774
+ * means the agent will speak the execution_message_description directly. Defaults
12775
+ * to "prompt".
12776
+ */
12777
+ execution_message_type?: 'prompt' | 'static_text';
12778
+ /**
12779
+ * If true, the agent will speak a short line before sending the SMS. If omitted,
12780
+ * defaults to true (same as end_call / transfer_call tools).
12781
+ */
12782
+ speak_during_execution?: boolean;
11432
12783
  }
11433
12784
  namespace SendSMSTool {
11434
12785
  interface SMSContentPredefined {
@@ -11649,6 +13000,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
11649
13000
  * Type of the variable to extract.
11650
13001
  */
11651
13002
  type: 'string';
13003
+ /**
13004
+ * Optional instruction to help decide whether this field needs to be populated in
13005
+ * the analysis. If not set, the field is always included. If required is true,
13006
+ * this is ignored.
13007
+ */
13008
+ conditional_prompt?: string;
11652
13009
  /**
11653
13010
  * Examples of the variable value to teach model the style and syntax.
11654
13011
  */
@@ -11676,6 +13033,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
11676
13033
  * Type of the variable to extract.
11677
13034
  */
11678
13035
  type: 'enum';
13036
+ /**
13037
+ * Optional instruction to help decide whether this field needs to be populated in
13038
+ * the analysis. If not set, the field is always included. If required is true,
13039
+ * this is ignored.
13040
+ */
13041
+ conditional_prompt?: string;
11679
13042
  /**
11680
13043
  * Whether this data is required. If true and the data is not extracted, the call
11681
13044
  * will be marked as unsuccessful.
@@ -11695,6 +13058,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
11695
13058
  * Type of the variable to extract.
11696
13059
  */
11697
13060
  type: 'boolean';
13061
+ /**
13062
+ * Optional instruction to help decide whether this field needs to be populated in
13063
+ * the analysis. If not set, the field is always included. If required is true,
13064
+ * this is ignored.
13065
+ */
13066
+ conditional_prompt?: string;
11698
13067
  /**
11699
13068
  * Whether this data is required. If true and the data is not extracted, the call
11700
13069
  * will be marked as unsuccessful.
@@ -11714,6 +13083,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
11714
13083
  * Type of the variable to extract.
11715
13084
  */
11716
13085
  type: 'number';
13086
+ /**
13087
+ * Optional instruction to help decide whether this field needs to be populated in
13088
+ * the analysis. If not set, the field is always included. If required is true,
13089
+ * this is ignored.
13090
+ */
13091
+ conditional_prompt?: string;
11717
13092
  /**
11718
13093
  * Whether this data is required. If true and the data is not extracted, the call
11719
13094
  * will be marked as unsuccessful.
@@ -13975,6 +15350,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
13975
15350
  * Type of the variable to extract.
13976
15351
  */
13977
15352
  type: 'string';
15353
+ /**
15354
+ * Optional instruction to help decide whether this field needs to be populated in
15355
+ * the analysis. If not set, the field is always included. If required is true,
15356
+ * this is ignored.
15357
+ */
15358
+ conditional_prompt?: string;
13978
15359
  /**
13979
15360
  * Examples of the variable value to teach model the style and syntax.
13980
15361
  */
@@ -14002,6 +15383,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
14002
15383
  * Type of the variable to extract.
14003
15384
  */
14004
15385
  type: 'enum';
15386
+ /**
15387
+ * Optional instruction to help decide whether this field needs to be populated in
15388
+ * the analysis. If not set, the field is always included. If required is true,
15389
+ * this is ignored.
15390
+ */
15391
+ conditional_prompt?: string;
14005
15392
  /**
14006
15393
  * Whether this data is required. If true and the data is not extracted, the call
14007
15394
  * will be marked as unsuccessful.
@@ -14021,6 +15408,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
14021
15408
  * Type of the variable to extract.
14022
15409
  */
14023
15410
  type: 'boolean';
15411
+ /**
15412
+ * Optional instruction to help decide whether this field needs to be populated in
15413
+ * the analysis. If not set, the field is always included. If required is true,
15414
+ * this is ignored.
15415
+ */
15416
+ conditional_prompt?: string;
14024
15417
  /**
14025
15418
  * Whether this data is required. If true and the data is not extracted, the call
14026
15419
  * will be marked as unsuccessful.
@@ -14040,6 +15433,12 @@ export declare namespace ConversationFlowComponentUpdateParams {
14040
15433
  * Type of the variable to extract.
14041
15434
  */
14042
15435
  type: 'number';
15436
+ /**
15437
+ * Optional instruction to help decide whether this field needs to be populated in
15438
+ * the analysis. If not set, the field is always included. If required is true,
15439
+ * this is ignored.
15440
+ */
15441
+ conditional_prompt?: string;
14043
15442
  /**
14044
15443
  * Whether this data is required. If true and the data is not extracted, the call
14045
15444
  * will be marked as unsuccessful.
@@ -15535,6 +16934,41 @@ export declare namespace ConversationFlowComponentUpdateParams {
15535
16934
  high_priority?: boolean;
15536
16935
  }
15537
16936
  }
16937
+ interface Note {
16938
+ /**
16939
+ * Unique identifier for the note.
16940
+ */
16941
+ id: string;
16942
+ /**
16943
+ * Text content of the note, can contain refs to images in the format
16944
+ * "<image:asset_id>"
16945
+ */
16946
+ content: string;
16947
+ /**
16948
+ * Position of the note on the canvas.
16949
+ */
16950
+ display_position: Note.DisplayPosition;
16951
+ /**
16952
+ * Dimensions of the note on the canvas.
16953
+ */
16954
+ size: Note.Size;
16955
+ }
16956
+ namespace Note {
16957
+ /**
16958
+ * Position of the note on the canvas.
16959
+ */
16960
+ interface DisplayPosition {
16961
+ x?: number;
16962
+ y?: number;
16963
+ }
16964
+ /**
16965
+ * Dimensions of the note on the canvas.
16966
+ */
16967
+ interface Size {
16968
+ height?: number;
16969
+ width?: number;
16970
+ }
16971
+ }
15538
16972
  interface CustomTool {
15539
16973
  /**
15540
16974
  * Name of the tool. Must be unique within all tools available to LLM at any given