diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json index 7e2abee2a..3ef624cde 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json @@ -1486,7 +1486,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -1870,7 +1870,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -2254,7 +2254,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json index 22b39ff50..9b019202e 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json @@ -1106,7 +1106,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json b/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json index 4fd93e1fa..222d64659 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json @@ -989,7 +989,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json b/src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json index 8cee53f02..e52a006a9 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Document Q&A.json @@ -1456,7 +1456,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json index 7c79bd1d7..562b81e81 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Financial Agent.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "SambaNovaModel", - "id": "SambaNovaModel-xrxwy", + "id": "SambaNovaModel-NEyqD", "name": "text_output", "output_types": [ "Message" @@ -15,7 +15,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-o90sI", + "id": "ChatOutput-XjOH3", "inputTypes": [ "Data", "DataFrame", @@ -24,12 +24,12 @@ "type": "str" } }, - "id": "reactflow__edge-SambaNovaModel-xrxwy{œdataTypeœ:œSambaNovaModelœ,œidœ:œSambaNovaModel-xrxwyœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-o90sI{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-o90sIœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-SambaNovaModel-NEyqD{œdataTypeœ:œSambaNovaModelœ,œidœ:œSambaNovaModel-NEyqDœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-XjOH3{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-XjOH3œ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "SambaNovaModel-xrxwy", - "sourceHandle": "{œdataTypeœ: œSambaNovaModelœ, œidœ: œSambaNovaModel-xrxwyœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-o90sI", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-o90sIœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "SambaNovaModel-NEyqD", + "sourceHandle": "{œdataTypeœ: œSambaNovaModelœ, œidœ: œSambaNovaModel-NEyqDœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-XjOH3", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-XjOH3œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -37,7 +37,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-3LGwC", + "id": "ChatInput-X83ni", "name": "message", "output_types": [ "Message" @@ -45,19 +45,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-dJhhP", + "id": "Agent-cGZsD", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-3LGwC{œdataTypeœ:œChatInputœ,œidœ:œChatInput-3LGwCœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-dJhhP{œfieldNameœ:œinput_valueœ,œidœ:œAgent-dJhhPœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-X83ni{œdataTypeœ:œChatInputœ,œidœ:œChatInput-X83niœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-cGZsD{œfieldNameœ:œinput_valueœ,œidœ:œAgent-cGZsDœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-3LGwC", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-3LGwCœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-dJhhP", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-dJhhPœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-X83ni", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-X83niœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-cGZsD", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-cGZsDœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -65,7 +65,7 @@ "data": { "sourceHandle": { "dataType": "TavilySearchComponent", - "id": "TavilySearchComponent-mhlb1", + "id": "TavilySearchComponent-7Y3yy", "name": "component_as_tool", "output_types": [ "Tool" @@ -73,19 +73,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-dJhhP", + "id": "Agent-cGZsD", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-TavilySearchComponent-mhlb1{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-mhlb1œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-dJhhP{œfieldNameœ:œtoolsœ,œidœ:œAgent-dJhhPœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-TavilySearchComponent-7Y3yy{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-7Y3yyœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-cGZsD{œfieldNameœ:œtoolsœ,œidœ:œAgent-cGZsDœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "TavilySearchComponent-mhlb1", - "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-mhlb1œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-dJhhP", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-dJhhPœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "TavilySearchComponent-7Y3yy", + "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-7Y3yyœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-cGZsD", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-cGZsDœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -93,7 +93,7 @@ "data": { "sourceHandle": { "dataType": "URL", - "id": "URL-CnHS6", + "id": "URL-N9CXl", "name": "component_as_tool", "output_types": [ "Tool" @@ -101,27 +101,194 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-VPh4g", + "id": "Agent-wqbpC", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-URL-CnHS6{œdataTypeœ:œURLœ,œidœ:œURL-CnHS6œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-VPh4g{œfieldNameœ:œtoolsœ,œidœ:œAgent-VPh4gœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-URL-N9CXl{œdataTypeœ:œURLœ,œidœ:œURL-N9CXlœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-wqbpC{œfieldNameœ:œtoolsœ,œidœ:œAgent-wqbpCœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "URL-CnHS6", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-CnHS6œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-VPh4g", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-VPh4gœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "URL-N9CXl", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-N9CXlœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-wqbpC", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-wqbpCœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, "className": "", + "data": { + "sourceHandle": { + "dataType": "ChatInput", + "id": "ChatInput-X83ni", + "name": "message", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "input_value", + "id": "Agent-wqbpC", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-ChatInput-X83ni{œdataTypeœ:œChatInputœ,œidœ:œChatInput-X83niœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-wqbpC{œfieldNameœ:œinput_valueœ,œidœ:œAgent-wqbpCœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "ChatInput-X83ni", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-X83niœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-wqbpC", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-wqbpCœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "className": "", + "data": { + "sourceHandle": { + "dataType": "Agent", + "id": "Agent-wqbpC", + "name": "response", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "first_text", + "id": "Prompt-er8QV", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-Agent-wqbpC{œdataTypeœ:œAgentœ,œidœ:œAgent-wqbpCœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-er8QV{œfieldNameœ:œfirst_textœ,œidœ:œPrompt-er8QVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Agent-wqbpC", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-wqbpCœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-er8QV", + "targetHandle": "{œfieldNameœ: œfirst_textœ, œidœ: œPrompt-er8QVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "className": "", + "data": { + "sourceHandle": { + "dataType": "Agent", + "id": "Agent-cGZsD", + "name": "response", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "second_text", + "id": "Prompt-er8QV", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-Agent-cGZsD{œdataTypeœ:œAgentœ,œidœ:œAgent-cGZsDœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-er8QV{œfieldNameœ:œsecond_textœ,œidœ:œPrompt-er8QVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Agent-cGZsD", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-cGZsDœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-er8QV", + "targetHandle": "{œfieldNameœ: œsecond_textœ, œidœ: œPrompt-er8QVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "className": "", + "data": { + "sourceHandle": { + "dataType": "Prompt", + "id": "Prompt-er8QV", + "name": "prompt", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "second_text", + "id": "Prompt-AdpTy", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-Prompt-er8QV{œdataTypeœ:œPromptœ,œidœ:œPrompt-er8QVœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Prompt-AdpTy{œfieldNameœ:œsecond_textœ,œidœ:œPrompt-AdpTyœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-er8QV", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-er8QVœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-AdpTy", + "targetHandle": "{œfieldNameœ: œsecond_textœ, œidœ: œPrompt-AdpTyœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "className": "", + "data": { + "sourceHandle": { + "dataType": "ChatInput", + "id": "ChatInput-X83ni", + "name": "message", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "first_text", + "id": "Prompt-AdpTy", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-ChatInput-X83ni{œdataTypeœ:œChatInputœ,œidœ:œChatInput-X83niœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-AdpTy{œfieldNameœ:œfirst_textœ,œidœ:œPrompt-AdpTyœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "ChatInput-X83ni", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-X83niœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-AdpTy", + "targetHandle": "{œfieldNameœ: œfirst_textœ, œidœ: œPrompt-AdpTyœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "className": "", + "data": { + "sourceHandle": { + "dataType": "Prompt", + "id": "Prompt-AdpTy", + "name": "prompt", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "input_value", + "id": "SambaNovaModel-NEyqD", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "reactflow__edge-Prompt-AdpTy{œdataTypeœ:œPromptœ,œidœ:œPrompt-AdpTyœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-SambaNovaModel-NEyqD{œfieldNameœ:œinput_valueœ,œidœ:œSambaNovaModel-NEyqDœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-AdpTy", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-AdpTyœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "SambaNovaModel-NEyqD", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œSambaNovaModel-NEyqDœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, "data": { "sourceHandle": { "dataType": "YfinanceComponent", - "id": "YfinanceComponent-6g0oy", + "id": "YfinanceComponent-KpeWR", "name": "component_as_tool", "output_types": [ "Tool" @@ -129,188 +296,25 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-VPh4g", + "id": "Agent-wqbpC", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-YfinanceComponent-6g0oy{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-6g0oyœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-VPh4g{œfieldNameœ:œtoolsœ,œidœ:œAgent-VPh4gœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "xy-edge__YfinanceComponent-KpeWR{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-KpeWRœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-wqbpC{œfieldNameœ:œtoolsœ,œidœ:œAgent-wqbpCœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "YfinanceComponent-6g0oy", - "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-6g0oyœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-VPh4g", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-VPh4gœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "ChatInput", - "id": "ChatInput-3LGwC", - "name": "message", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "input_value", - "id": "Agent-VPh4g", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "reactflow__edge-ChatInput-3LGwC{œdataTypeœ:œChatInputœ,œidœ:œChatInput-3LGwCœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-VPh4g{œfieldNameœ:œinput_valueœ,œidœ:œAgent-VPh4gœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "ChatInput-3LGwC", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-3LGwCœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-VPh4g", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-VPh4gœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "Agent", - "id": "Agent-VPh4g", - "name": "response", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "first_text", - "id": "Prompt-35Sox", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__Agent-VPh4g{œdataTypeœ:œAgentœ,œidœ:œAgent-VPh4gœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-35Sox{œfieldNameœ:œfirst_textœ,œidœ:œPrompt-35Soxœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "Agent-VPh4g", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-VPh4gœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-35Sox", - "targetHandle": "{œfieldNameœ: œfirst_textœ, œidœ: œPrompt-35Soxœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "Agent", - "id": "Agent-dJhhP", - "name": "response", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "second_text", - "id": "Prompt-35Sox", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__Agent-dJhhP{œdataTypeœ:œAgentœ,œidœ:œAgent-dJhhPœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-35Sox{œfieldNameœ:œsecond_textœ,œidœ:œPrompt-35Soxœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "Agent-dJhhP", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-dJhhPœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-35Sox", - "targetHandle": "{œfieldNameœ: œsecond_textœ, œidœ: œPrompt-35Soxœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "Prompt", - "id": "Prompt-35Sox", - "name": "prompt", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "second_text", - "id": "Prompt-Rrcfy", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__Prompt-35Sox{œdataTypeœ:œPromptœ,œidœ:œPrompt-35Soxœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Prompt-Rrcfy{œfieldNameœ:œsecond_textœ,œidœ:œPrompt-Rrcfyœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "Prompt-35Sox", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-35Soxœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-Rrcfy", - "targetHandle": "{œfieldNameœ: œsecond_textœ, œidœ: œPrompt-Rrcfyœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "ChatInput", - "id": "ChatInput-3LGwC", - "name": "message", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "first_text", - "id": "Prompt-Rrcfy", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__ChatInput-3LGwC{œdataTypeœ:œChatInputœ,œidœ:œChatInput-3LGwCœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-Rrcfy{œfieldNameœ:œfirst_textœ,œidœ:œPrompt-Rrcfyœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "ChatInput-3LGwC", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-3LGwCœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-Rrcfy", - "targetHandle": "{œfieldNameœ: œfirst_textœ, œidœ: œPrompt-Rrcfyœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "Prompt", - "id": "Prompt-Rrcfy", - "name": "prompt", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "input_value", - "id": "SambaNovaModel-xrxwy", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__Prompt-Rrcfy{œdataTypeœ:œPromptœ,œidœ:œPrompt-Rrcfyœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-SambaNovaModel-xrxwy{œfieldNameœ:œinput_valueœ,œidœ:œSambaNovaModel-xrxwyœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "Prompt-Rrcfy", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-Rrcfyœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "SambaNovaModel-xrxwy", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œSambaNovaModel-xrxwyœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "YfinanceComponent-KpeWR", + "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-KpeWRœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-wqbpC", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-wqbpCœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" } ], "nodes": [ { "data": { - "id": "ChatInput-3LGwC", + "id": "ChatInput-X83ni", "node": { "base_classes": [ "Message" @@ -605,7 +609,7 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-3LGwC", + "id": "ChatInput-X83ni", "measured": { "height": 66, "width": 192 @@ -619,7 +623,7 @@ }, { "data": { - "id": "TavilySearchComponent-mhlb1", + "id": "TavilySearchComponent-7Y3yy", "node": { "base_classes": [ "Data", @@ -973,9 +977,9 @@ "type": "TavilySearchComponent" }, "dragging": false, - "id": "TavilySearchComponent-mhlb1", + "id": "TavilySearchComponent-7Y3yy", "measured": { - "height": 437, + "height": 354, "width": 320 }, "position": { @@ -989,7 +993,7 @@ "data": { "description": "Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", "display_name": "Yahoo Finance", - "id": "YfinanceComponent-6g0oy", + "id": "YfinanceComponent-KpeWR", "node": { "base_classes": [ "Data", @@ -1142,11 +1146,11 @@ "value": "" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1154,110 +1158,63 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "fetch_content() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", - "name": "YfinanceComponent-fetch_content", + "args": { + "symbol": { + "default": "", + "description": "The stock symbol to retrieve data for (e.g., AAPL, GOOG).", + "title": "Symbol", + "type": "string" + } + }, + "description": "YfinanceComponent. fetch_content() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_description": "YfinanceComponent. fetch_content() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_name": "fetch_content", + "name": "fetch_content", "status": true, "tags": [ - "YfinanceComponent-fetch_content" + "fetch_content" ] }, { - "description": "fetch_content_text() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", - "name": "YfinanceComponent-fetch_content_text", + "args": { + "symbol": { + "default": "", + "description": "The stock symbol to retrieve data for (e.g., AAPL, GOOG).", + "title": "Symbol", + "type": "string" + } + }, + "description": "YfinanceComponent. fetch_content_text() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_description": "YfinanceComponent. fetch_content_text() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_name": "fetch_content_text", + "name": "fetch_content_text", "status": true, "tags": [ - "YfinanceComponent-fetch_content_text" + "fetch_content_text" ] }, { - "description": "as_dataframe() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", - "name": "YfinanceComponent-as_dataframe", + "args": { + "symbol": { + "default": "", + "description": "The stock symbol to retrieve data for (e.g., AAPL, GOOG).", + "title": "Symbol", + "type": "string" + } + }, + "description": "YfinanceComponent. as_dataframe() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_description": "YfinanceComponent. as_dataframe() - Uses [yfinance](https://pypi.org/project/yfinance/) (unofficial package) to access financial data and market information from Yahoo Finance.", + "display_name": "as_dataframe", + "name": "as_dataframe", "status": true, "tags": [ - "YfinanceComponent-as_dataframe" + "as_dataframe" ] } ] @@ -1269,9 +1226,9 @@ "type": "YfinanceComponent" }, "dragging": false, - "id": "YfinanceComponent-6g0oy", + "id": "YfinanceComponent-KpeWR", "measured": { - "height": 519, + "height": 461, "width": 320 }, "position": { @@ -1283,7 +1240,7 @@ }, { "data": { - "id": "ChatOutput-o90sI", + "id": "ChatOutput-XjOH3", "node": { "base_classes": [ "Message" @@ -1578,7 +1535,7 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-o90sI", + "id": "ChatOutput-XjOH3", "measured": { "height": 66, "width": 192 @@ -1592,7 +1549,7 @@ }, { "data": { - "id": "URL-CnHS6", + "id": "URL-N9CXl", "node": { "base_classes": [ "Data", @@ -1721,11 +1678,11 @@ "value": "\n\n" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1733,110 +1690,72 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content", + "name": "fetch_content", "status": true, "tags": [ - "URL-fetch_content" + "fetch_content" ] }, { - "description": "fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content_text", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content_text", + "name": "fetch_content_text", "status": true, "tags": [ - "URL-fetch_content_text" + "fetch_content_text" ] }, { - "description": "as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-as_dataframe", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "as_dataframe", + "name": "as_dataframe", "status": true, "tags": [ - "URL-as_dataframe" + "as_dataframe" ] } ] @@ -1871,9 +1790,9 @@ "type": "URL" }, "dragging": false, - "id": "URL-CnHS6", + "id": "URL-N9CXl", "measured": { - "height": 590, + "height": 523, "width": 320 }, "position": { @@ -1885,7 +1804,7 @@ }, { "data": { - "id": "note-S7zus", + "id": "note-tZG9P", "node": { "description": "# Financial Assistant Agents \n\nThe Financial Assistant Agent retrieves content and writes reports about financial queries.\n\n## Prerequisites\n\n* [Tavily AI Search key](https://docs.tavily.com/welcome)\n* [SambaNova API key](https://cloud.sambanova.ai/) \n\n## Quickstart\n\n1. In both **Agent** components and **SambaNova** component, add your SambaNova API key. \nIn the **Model Provider** field, select **Sambanova**, and select a model.\n3. In the **Tavily Search** component, add your **Tavily API key**.\n4. Click the **Playground** and ask `Why did Nvidia stock drop in January?`", "display_name": "", @@ -1898,7 +1817,7 @@ }, "dragging": false, "height": 630, - "id": "note-S7zus", + "id": "note-tZG9P", "measured": { "height": 630, "width": 479 @@ -1914,7 +1833,7 @@ }, { "data": { - "id": "SambaNovaModel-xrxwy", + "id": "SambaNovaModel-NEyqD", "node": { "base_classes": [ "LanguageModel", @@ -1987,7 +1906,7 @@ "dynamic": false, "info": "The Sambanova API Key to use for the Sambanova model.", "input_types": [], - "load_from_db": false, + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -1995,7 +1914,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "SAMBANOVA_API_KEY" }, "base_url": { "_input_type": "StrInput", @@ -2215,7 +2134,7 @@ "type": "SambaNovaModel" }, "dragging": false, - "id": "SambaNovaModel-xrxwy", + "id": "SambaNovaModel-NEyqD", "measured": { "height": 525, "width": 320 @@ -2229,7 +2148,7 @@ }, { "data": { - "id": "Agent-dJhhP", + "id": "Agent-cGZsD", "node": { "base_classes": [ "Message" @@ -2283,10 +2202,8 @@ "allows_loop": false, "cache": true, "display_name": "Response", - "hidden": false, "method": "message_response", "name": "response", - "required_inputs": null, "selected": "Message", "tool_mode": true, "types": [ @@ -2406,13 +2323,11 @@ "api_key": { "_input_type": "SecretStrInput", "advanced": false, - "display_name": "Sambanova API Key", + "display_name": "OpenAI API Key", "dynamic": false, - "info": "The Sambanova API Key to use for the Sambanova model.", - "input_types": [ - "Message" - ], - "load_from_db": false, + "info": "The OpenAI API Key to use for the OpenAI model.", + "input_types": [], + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -2420,27 +2335,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" - }, - "base_url": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "SambaNova Cloud Base Url", - "dynamic": false, - "info": "The base URL of the Sambanova Cloud API. Defaults to https://api.sambanova.ai/v1/chat/completions. You can change this to use other urls like Sambastudio", - "input_types": [], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "base_url", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" + "value": "SAMBANOVA_API_KEY" }, "code": { "advanced": true, @@ -2448,7 +2343,6 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [], "list": false, "load_from_db": false, "multiline": true, @@ -2503,6 +2397,24 @@ "type": "str", "value": "" }, + "json_mode": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "JSON Mode", + "dynamic": false, + "info": "If True, it will output JSON regardless of passing a schema.", + "list": false, + "list_add_label": "Add More", + "name": "json_mode", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": false + }, "max_iterations": { "_input_type": "IntInput", "advanced": true, @@ -2522,12 +2434,30 @@ "type": "int", "value": 15 }, + "max_retries": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Retries", + "dynamic": false, + "info": "The maximum number of retries to make when generating.", + "list": false, + "list_add_label": "Add More", + "name": "max_retries", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, "max_tokens": { "_input_type": "IntInput", "advanced": true, "display_name": "Max Tokens", "dynamic": false, - "info": "The maximum number of tokens to generate.", + "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", "input_types": [], "list": false, "list_add_label": "Add More", @@ -2561,6 +2491,24 @@ "type": "other", "value": "" }, + "model_kwargs": { + "_input_type": "DictInput", + "advanced": true, + "display_name": "Model Kwargs", + "dynamic": false, + "info": "Additional keyword arguments to pass to the model.", + "list": false, + "list_add_label": "Add More", + "name": "model_kwargs", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "type": "dict", + "value": {} + }, "model_name": { "_input_type": "DropdownInput", "advanced": false, @@ -2572,20 +2520,17 @@ "input_types": [], "name": "model_name", "options": [ - "Meta-Llama-3.3-70B-Instruct", - "Meta-Llama-3.1-8B-Instruct", - "Meta-Llama-3.1-70B-Instruct", - "Meta-Llama-3.1-405B-Instruct", - "DeepSeek-R1-Distill-Llama-70B", - "DeepSeek-R1", - "Meta-Llama-3.2-1B-Instruct", - "Meta-Llama-3.2-3B-Instruct", - "Llama-3.2-11B-Vision-Instruct", - "Llama-3.2-90B-Vision-Instruct", - "Qwen2.5-Coder-32B-Instruct", - "Qwen2.5-72B-Instruct", - "QwQ-32B-Preview", - "Qwen2-Audio-7B-Instruct" + "gpt-4o-mini", + "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-4.5-preview", + "gpt-4-turbo", + "gpt-4-turbo-preview", + "gpt-4", + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -2593,6 +2538,7 @@ "required": false, "show": true, "title_case": false, + "toggle": false, "tool_mode": false, "trace_as_metadata": true, "type": "str", @@ -2617,6 +2563,25 @@ "type": "int", "value": 100 }, + "openai_api_base": { + "_input_type": "StrInput", + "advanced": true, + "display_name": "OpenAI API Base", + "dynamic": false, + "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "openai_api_base", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, "order": { "_input_type": "DropdownInput", "advanced": true, @@ -2641,6 +2606,24 @@ "type": "str", "value": "Ascending" }, + "seed": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Seed", + "dynamic": false, + "info": "The seed controls the reproducibility of the job.", + "list": false, + "list_add_label": "Add More", + "name": "seed", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 1 + }, "sender": { "_input_type": "DropdownInput", "advanced": true, @@ -2791,6 +2774,24 @@ "type": "str", "value": "{sender_name}: {text}" }, + "timeout": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Timeout", + "dynamic": false, + "info": "The timeout for requests to OpenAI completion API.", + "list": false, + "list_add_label": "Add More", + "name": "timeout", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 700 + }, "tools": { "_input_type": "HandleInput", "advanced": false, @@ -2811,35 +2812,6 @@ "type": "other", "value": "" }, - "top_p": { - "_input_type": "SliderInput", - "advanced": true, - "display_name": "top_p", - "dynamic": false, - "info": "Model top_p", - "input_types": [], - "max_label": "", - "max_label_icon": "", - "min_label": "", - "min_label_icon": "", - "name": "top_p", - "placeholder": "", - "range_spec": { - "max": 1, - "min": 0, - "step": 0.01, - "step_type": "float" - }, - "required": false, - "show": true, - "slider_buttons": false, - "slider_buttons_options": [], - "slider_input": false, - "title_case": false, - "tool_mode": false, - "type": "slider", - "value": 1 - }, "verbose": { "_input_type": "BoolInput", "advanced": true, @@ -2866,7 +2838,7 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-dJhhP", + "id": "Agent-cGZsD", "measured": { "height": 624, "width": 320 @@ -2875,12 +2847,12 @@ "x": -114.7705455447527, "y": 395.9726937371793 }, - "selected": false, + "selected": true, "type": "genericNode" }, { "data": { - "id": "Agent-VPh4g", + "id": "Agent-wqbpC", "node": { "base_classes": [ "Message" @@ -2934,10 +2906,8 @@ "allows_loop": false, "cache": true, "display_name": "Response", - "hidden": false, "method": "message_response", "name": "response", - "required_inputs": null, "selected": "Message", "tool_mode": true, "types": [ @@ -3057,13 +3027,11 @@ "api_key": { "_input_type": "SecretStrInput", "advanced": false, - "display_name": "Sambanova API Key", + "display_name": "OpenAI API Key", "dynamic": false, - "info": "The Sambanova API Key to use for the Sambanova model.", - "input_types": [ - "Message" - ], - "load_from_db": false, + "info": "The OpenAI API Key to use for the OpenAI model.", + "input_types": [], + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -3071,27 +3039,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" - }, - "base_url": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "SambaNova Cloud Base Url", - "dynamic": false, - "info": "The base URL of the Sambanova Cloud API. Defaults to https://api.sambanova.ai/v1/chat/completions. You can change this to use other urls like Sambastudio", - "input_types": [], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "base_url", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" + "value": "SAMBANOVA_API_KEY" }, "code": { "advanced": true, @@ -3099,7 +3047,6 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [], "list": false, "load_from_db": false, "multiline": true, @@ -3154,6 +3101,24 @@ "type": "str", "value": "" }, + "json_mode": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "JSON Mode", + "dynamic": false, + "info": "If True, it will output JSON regardless of passing a schema.", + "list": false, + "list_add_label": "Add More", + "name": "json_mode", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": false + }, "max_iterations": { "_input_type": "IntInput", "advanced": true, @@ -3173,12 +3138,30 @@ "type": "int", "value": 15 }, + "max_retries": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Retries", + "dynamic": false, + "info": "The maximum number of retries to make when generating.", + "list": false, + "list_add_label": "Add More", + "name": "max_retries", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, "max_tokens": { "_input_type": "IntInput", "advanced": true, "display_name": "Max Tokens", "dynamic": false, - "info": "The maximum number of tokens to generate.", + "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", "input_types": [], "list": false, "list_add_label": "Add More", @@ -3212,6 +3195,24 @@ "type": "other", "value": "" }, + "model_kwargs": { + "_input_type": "DictInput", + "advanced": true, + "display_name": "Model Kwargs", + "dynamic": false, + "info": "Additional keyword arguments to pass to the model.", + "list": false, + "list_add_label": "Add More", + "name": "model_kwargs", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "type": "dict", + "value": {} + }, "model_name": { "_input_type": "DropdownInput", "advanced": false, @@ -3223,20 +3224,17 @@ "input_types": [], "name": "model_name", "options": [ - "Meta-Llama-3.3-70B-Instruct", - "Meta-Llama-3.1-8B-Instruct", - "Meta-Llama-3.1-70B-Instruct", - "Meta-Llama-3.1-405B-Instruct", - "DeepSeek-R1-Distill-Llama-70B", - "DeepSeek-R1", - "Meta-Llama-3.2-1B-Instruct", - "Meta-Llama-3.2-3B-Instruct", - "Llama-3.2-11B-Vision-Instruct", - "Llama-3.2-90B-Vision-Instruct", - "Qwen2.5-Coder-32B-Instruct", - "Qwen2.5-72B-Instruct", - "QwQ-32B-Preview", - "Qwen2-Audio-7B-Instruct" + "gpt-4o-mini", + "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-4.5-preview", + "gpt-4-turbo", + "gpt-4-turbo-preview", + "gpt-4", + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -3244,6 +3242,7 @@ "required": false, "show": true, "title_case": false, + "toggle": false, "tool_mode": false, "trace_as_metadata": true, "type": "str", @@ -3268,6 +3267,25 @@ "type": "int", "value": 100 }, + "openai_api_base": { + "_input_type": "StrInput", + "advanced": true, + "display_name": "OpenAI API Base", + "dynamic": false, + "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "openai_api_base", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, "order": { "_input_type": "DropdownInput", "advanced": true, @@ -3292,6 +3310,24 @@ "type": "str", "value": "Ascending" }, + "seed": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Seed", + "dynamic": false, + "info": "The seed controls the reproducibility of the job.", + "list": false, + "list_add_label": "Add More", + "name": "seed", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 1 + }, "sender": { "_input_type": "DropdownInput", "advanced": true, @@ -3442,6 +3478,24 @@ "type": "str", "value": "{sender_name}: {text}" }, + "timeout": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Timeout", + "dynamic": false, + "info": "The timeout for requests to OpenAI completion API.", + "list": false, + "list_add_label": "Add More", + "name": "timeout", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 700 + }, "tools": { "_input_type": "HandleInput", "advanced": false, @@ -3462,35 +3516,6 @@ "type": "other", "value": "" }, - "top_p": { - "_input_type": "SliderInput", - "advanced": true, - "display_name": "top_p", - "dynamic": false, - "info": "Model top_p", - "input_types": [], - "max_label": "", - "max_label_icon": "", - "min_label": "", - "min_label_icon": "", - "name": "top_p", - "placeholder": "", - "range_spec": { - "max": 1, - "min": 0, - "step": 0.01, - "step_type": "float" - }, - "required": false, - "show": true, - "slider_buttons": false, - "slider_buttons_options": [], - "slider_input": false, - "title_case": false, - "tool_mode": false, - "type": "slider", - "value": 1 - }, "verbose": { "_input_type": "BoolInput", "advanced": true, @@ -3517,7 +3542,7 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-VPh4g", + "id": "Agent-wqbpC", "measured": { "height": 624, "width": 320 @@ -3531,7 +3556,7 @@ }, { "data": { - "id": "Prompt-35Sox", + "id": "Prompt-er8QV", "node": { "base_classes": [ "Message" @@ -3693,7 +3718,7 @@ "type": "Prompt" }, "dragging": false, - "id": "Prompt-35Sox", + "id": "Prompt-er8QV", "measured": { "height": 433, "width": 320 @@ -3707,7 +3732,7 @@ }, { "data": { - "id": "Prompt-Rrcfy", + "id": "Prompt-AdpTy", "node": { "base_classes": [ "Message" @@ -3869,7 +3894,7 @@ "type": "Prompt" }, "dragging": false, - "id": "Prompt-Rrcfy", + "id": "Prompt-AdpTy", "measured": { "height": 433, "width": 320 @@ -3883,14 +3908,13 @@ } ], "viewport": { - "x": 289.9389060027373, - "y": 214.7118605705939, - "zoom": 0.6329643482266742 + "x": 402.8529727761044, + "y": 359.62391032755147, + "zoom": 0.5103514759965421 } }, "description": "Financial assistant chatbot that uses specialized agents to research for financial information", "endpoint_name": null, - "id": "a3040ec9-8742-4990-bc16-7e783f8d56d9", "is_component": false, "last_tested_version": "1.3.4", "name": "Financial Agent", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json b/src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json index 0ac39fcde..1668cd96a 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Financial Report Parser.json @@ -355,7 +355,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json index bc6d0cc40..753029d56 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Gmail Agent.json @@ -238,9 +238,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -438,11 +436,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -453,7 +455,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json b/src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json index c9aeb53e9..a172b5ed8 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Hybrid Search RAG.json @@ -1090,7 +1090,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json b/src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json index 8dd7e3b72..d01bd1032 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Image Sentiment Analysis.json @@ -1182,7 +1182,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json b/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json index b8f0b8cc2..8708f4935 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json @@ -1662,7 +1662,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", @@ -2885,7 +2885,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -3269,7 +3269,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json b/src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json index 7e636f530..62a97a349 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-jqHUa", + "id": "Prompt-0aGkQ", "name": "prompt", "output_types": [ "Message" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-jqHUa{œdataTypeœ:œPromptœ,œidœ:œPrompt-jqHUaœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-YDpm0{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-0aGkQ{œdataTypeœ:œPromptœ,œidœ:œPrompt-0aGkQœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-DBNrp{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-jqHUa", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-jqHUaœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-YDpm0", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-0aGkQ", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-0aGkQœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-DBNrp", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "needle", - "id": "needle-jWdIc", + "id": "needle-5GYmd", "name": "component_as_tool", "output_types": [ "Tool" @@ -43,19 +43,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-needle-jWdIc{œdataTypeœ:œneedleœ,œidœ:œneedle-jWdIcœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-YDpm0{œfieldNameœ:œtoolsœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-needle-5GYmd{œdataTypeœ:œneedleœ,œidœ:œneedle-5GYmdœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-DBNrp{œfieldNameœ:œtoolsœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "needle-jWdIc", - "sourceHandle": "{œdataTypeœ: œneedleœ, œidœ: œneedle-jWdIcœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-YDpm0", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "needle-5GYmd", + "sourceHandle": "{œdataTypeœ: œneedleœ, œidœ: œneedle-5GYmdœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-DBNrp", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -63,7 +63,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-r9vuH", + "id": "ChatInput-cKEM6", "name": "message", "output_types": [ "Message" @@ -71,19 +71,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-r9vuH{œdataTypeœ:œChatInputœ,œidœ:œChatInput-r9vuHœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-YDpm0{œfieldNameœ:œinput_valueœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-cKEM6{œdataTypeœ:œChatInputœ,œidœ:œChatInput-cKEM6œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-DBNrp{œfieldNameœ:œinput_valueœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-r9vuH", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-r9vuHœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-YDpm0", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-cKEM6", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-cKEM6œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-DBNrp", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -91,7 +91,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "name": "response", "output_types": [ "Message" @@ -99,7 +99,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-O7uUo", + "id": "ChatOutput-LTYD8", "inputTypes": [ "Data", "DataFrame", @@ -108,18 +108,18 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-YDpm0{œdataTypeœ:œAgentœ,œidœ:œAgent-YDpm0œ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-O7uUo{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-O7uUoœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-DBNrp{œdataTypeœ:œAgentœ,œidœ:œAgent-DBNrpœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-LTYD8{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-LTYD8œ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-YDpm0", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-YDpm0œ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-O7uUo", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-O7uUoœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "Agent-DBNrp", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-DBNrpœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-LTYD8", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-LTYD8œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" } ], "nodes": [ { "data": { - "id": "note-gpQ5H", + "id": "note-n0kSK", "node": { "description": "# Invoice Summarizer\n\nLeverage the **Needle Search API** and an **Agent** to gather and summarize your invoice data quickly and accurately.\n\n## Prerequisites\n\n* A **Collection** and an **API Key** from your [Needle.ai](https://needle-ai.com) deployment\n* An [OpenAI API key](https://platform.openai.com/)\n\n## Quickstart\n\n1. Load your invoices into your Needle Collection. \n\n2. In the **Needle Search** tool, add your **Needle Collection ID** and **Needle API Key**.\n\n3. In the **Agent** component, add your **OpenAI Key**.\n\n4. Open the **Playground** and query your invoices. The **Agent** component determines the correct query and search size for data retrieval.\n", "display_name": "", @@ -132,7 +132,7 @@ }, "dragging": false, "height": 632, - "id": "note-gpQ5H", + "id": "note-n0kSK", "measured": { "height": 632, "width": 583 @@ -148,7 +148,7 @@ }, { "data": { - "id": "Prompt-jqHUa", + "id": "Prompt-0aGkQ", "node": { "base_classes": [ "Message" @@ -262,7 +262,7 @@ "type": "Prompt" }, "dragging": false, - "id": "Prompt-jqHUa", + "id": "Prompt-0aGkQ", "measured": { "height": 330, "width": 320 @@ -276,7 +276,7 @@ }, { "data": { - "id": "ChatOutput-O7uUo", + "id": "ChatOutput-LTYD8", "node": { "base_classes": [ "Message" @@ -571,7 +571,7 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-O7uUo", + "id": "ChatOutput-LTYD8", "measured": { "height": 66, "width": 192 @@ -585,7 +585,7 @@ }, { "data": { - "id": "note-owux5", + "id": "note-PDspc", "node": { "description": "### 💡 Add your OpenAI API key here 👇", "display_name": "", @@ -597,7 +597,7 @@ "type": "note" }, "dragging": false, - "id": "note-owux5", + "id": "note-PDspc", "measured": { "height": 324, "width": 324 @@ -611,7 +611,7 @@ }, { "data": { - "id": "note-b3LuQ", + "id": "note-Qcxtt", "node": { "description": "### 💡 Add your Needle Search API key here 👇", "display_name": "", @@ -624,7 +624,7 @@ }, "dragging": false, "height": 324, - "id": "note-b3LuQ", + "id": "note-Qcxtt", "measured": { "height": 324, "width": 401 @@ -640,7 +640,7 @@ }, { "data": { - "id": "needle-jWdIc", + "id": "needle-5GYmd", "node": { "base_classes": [ "Message" @@ -738,7 +738,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "needle_api_key", "password": true, "placeholder": "", @@ -746,7 +746,7 @@ "show": true, "title_case": false, "type": "str", - "value": "NEEDLE_API_KEY" + "value": "" }, "query": { "_input_type": "MessageTextInput", @@ -772,11 +772,11 @@ "value": "" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -784,93 +784,20 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "run(collection_id: Message, needle_api_key: Message, query: Message, top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.", - "name": "needle-run", + "args": {}, + "description": "needle. run(needle. collection_id: Message, needle. needle_api_key: FieldTypes.TEXT, needle. query: Message, needle. top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.", + "display_description": "needle. run(needle. collection_id: Message, needle. needle_api_key: FieldTypes.TEXT, needle. query: Message, needle. top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.", + "display_name": "run", + "name": "run", + "status": true, "tags": [ - "needle-run" + "run" ] } ] @@ -899,9 +826,9 @@ "showNode": true, "type": "needle" }, - "id": "needle-jWdIc", + "id": "needle-5GYmd", "measured": { - "height": 582, + "height": 495, "width": 320 }, "position": { @@ -913,7 +840,7 @@ }, { "data": { - "id": "ChatInput-r9vuH", + "id": "ChatInput-cKEM6", "node": { "base_classes": [ "Message" @@ -1210,7 +1137,7 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-r9vuH", + "id": "ChatInput-cKEM6", "measured": { "height": 230, "width": 320 @@ -1224,7 +1151,7 @@ }, { "data": { - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "node": { "base_classes": [ "Message" @@ -1297,6 +1224,7 @@ "display_name": "Current Date", "dynamic": false, "info": "If true, will add a tool to the agent that returns the current date.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "add_current_date_tool", @@ -1400,9 +1328,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -1437,6 +1363,7 @@ "display_name": "Handle Parse Errors", "dynamic": false, "info": "Should the Agent fix errors when reading user input for better processing?", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "handle_parsing_errors", @@ -1478,6 +1405,7 @@ "display_name": "JSON Mode", "dynamic": false, "info": "If True, it will output JSON regardless of passing a schema.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "json_mode", @@ -1496,6 +1424,7 @@ "display_name": "Max Iterations", "dynamic": false, "info": "The maximum number of attempts the agent can make to complete its task before it stops.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "max_iterations", @@ -1514,6 +1443,7 @@ "display_name": "Max Retries", "dynamic": false, "info": "The maximum number of retries to make when generating.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "max_retries", @@ -1532,6 +1462,7 @@ "display_name": "Max Tokens", "dynamic": false, "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "max_tokens", @@ -1576,6 +1507,7 @@ "display_name": "Model Kwargs", "dynamic": false, "info": "Additional keyword arguments to pass to the model.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "model_kwargs", @@ -1596,15 +1528,20 @@ "display_name": "Model Name", "dynamic": false, "info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.", + "input_types": [], "name": "model_name", "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -1612,10 +1549,11 @@ "required": false, "show": true, "title_case": false, + "toggle": false, "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", @@ -1623,6 +1561,7 @@ "display_name": "Number of Messages", "dynamic": false, "info": "Number of messages to retrieve.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "n_messages", @@ -1641,6 +1580,7 @@ "display_name": "OpenAI API Base", "dynamic": false, "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "input_types": [], "list": false, "list_add_label": "Add More", "load_from_db": false, @@ -1662,6 +1602,7 @@ "display_name": "Order", "dynamic": false, "info": "Order of the messages.", + "input_types": [], "name": "order", "options": [ "Ascending", @@ -1683,6 +1624,7 @@ "display_name": "Seed", "dynamic": false, "info": "The seed controls the reproducibility of the job.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "seed", @@ -1703,6 +1645,7 @@ "display_name": "Sender Type", "dynamic": false, "info": "Filter by sender type.", + "input_types": [], "name": "sender", "options": [ "Machine", @@ -1796,6 +1739,7 @@ "display_name": "Temperature", "dynamic": false, "info": "", + "input_types": [], "max_label": "", "max_label_icon": "", "min_label": "", @@ -1849,6 +1793,7 @@ "display_name": "Timeout", "dynamic": false, "info": "The timeout for requests to OpenAI completion API.", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "timeout", @@ -1887,6 +1832,7 @@ "display_name": "Verbose", "dynamic": false, "info": "", + "input_types": [], "list": false, "list_add_label": "Add More", "name": "verbose", @@ -1905,7 +1851,7 @@ "showNode": true, "type": "Agent" }, - "id": "Agent-YDpm0", + "id": "Agent-DBNrp", "measured": { "height": 624, "width": 320 @@ -1919,16 +1865,16 @@ } ], "viewport": { - "x": 176.17345116464503, - "y": 410.5061991131597, - "zoom": 0.7205422604177993 + "x": 150.31260070182884, + "y": 468.5915273517045, + "zoom": 0.6157949221457367 } }, "description": "Your AI Agent Accountant - Leverage Needle with Langflows Agent.", "endpoint_name": null, - "id": "58b6fe7e-22f9-47d8-b0aa-d7a9c752d423", + "id": "2803158e-d8ca-4615-bc9a-0299886b7225", "is_component": false, - "last_tested_version": "1.2.0", + "last_tested_version": "1.3.4", "name": "Invoice Summarizer", "tags": [ "chatbots", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json b/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json index cd953c1c4..81060ee8f 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Market Research.json @@ -1513,7 +1513,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", @@ -2394,7 +2394,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json b/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json index 16d7b69aa..408488632 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json @@ -667,7 +667,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -1803,7 +1803,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json b/src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json index 697301814..259349193 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Memory Chatbot.json @@ -1440,7 +1440,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json b/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json index 1dece8e60..ff713bb1b 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json @@ -1283,7 +1283,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json index d5b7f4beb..268c71046 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json @@ -3,11 +3,37 @@ "edges": [ { "animated": false, - "className": "", + "data": { + "sourceHandle": { + "dataType": "APIRequest", + "id": "APIRequest-Yr0ij", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-iU8sJ", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__APIRequest-Yr0ij{œdataTypeœ:œAPIRequestœ,œidœ:œAPIRequest-Yr0ijœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-iU8sJ{œfieldNameœ:œtoolsœ,œidœ:œAgent-iU8sJœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "APIRequest-Yr0ij", + "sourceHandle": "{œdataTypeœ: œAPIRequestœ, œidœ: œAPIRequest-Yr0ijœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-iU8sJ", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-iU8sJœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "animated": false, "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-4lamw", + "id": "ChatInput-ZNO2E", "name": "message", "output_types": [ "Message" @@ -15,27 +41,26 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-I23ZV", + "id": "Agent-iU8sJ", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-4lamw{œdataTypeœ:œChatInputœ,œidœ:œChatInput-4lamwœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-I23ZV{œfieldNameœ:œinput_valueœ,œidœ:œAgent-I23ZVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "xy-edge__ChatInput-ZNO2E{œdataTypeœ:œChatInputœ,œidœ:œChatInput-ZNO2Eœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-iU8sJ{œfieldNameœ:œinput_valueœ,œidœ:œAgent-iU8sJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-4lamw", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-4lamwœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-I23ZV", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-I23ZVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-ZNO2E", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-ZNO2Eœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-iU8sJ", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-iU8sJœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, - "className": "", "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-I23ZV", + "id": "Agent-iU8sJ", "name": "response", "output_types": [ "Message" @@ -43,7 +68,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-MBTWS", + "id": "ChatOutput-79PxR", "inputTypes": [ "Data", "DataFrame", @@ -52,43 +77,18 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-I23ZV{œdataTypeœ:œAgentœ,œidœ:œAgent-I23ZVœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-MBTWS{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-MBTWSœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", + "id": "xy-edge__Agent-iU8sJ{œdataTypeœ:œAgentœ,œidœ:œAgent-iU8sJœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-79PxR{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-79PxRœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-I23ZV", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-I23ZVœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-MBTWS", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-MBTWSœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" - }, - { - "data": { - "sourceHandle": { - "dataType": "APIRequest", - "id": "APIRequest-zDdGN", - "name": "component_as_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-I23ZV", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "xy-edge__APIRequest-zDdGN{œdataTypeœ:œAPIRequestœ,œidœ:œAPIRequest-zDdGNœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-I23ZV{œfieldNameœ:œtoolsœ,œidœ:œAgent-I23ZVœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "APIRequest-zDdGN", - "sourceHandle": "{œdataTypeœ: œAPIRequestœ, œidœ: œAPIRequest-zDdGNœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-I23ZV", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-I23ZVœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "Agent-iU8sJ", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-iU8sJœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-79PxR", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-79PxRœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" } ], "nodes": [ { "data": { - "id": "ChatInput-4lamw", + "id": "ChatInput-ZNO2E", "node": { "base_classes": [ "Message" @@ -386,7 +386,7 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-4lamw", + "id": "ChatInput-ZNO2E", "measured": { "height": 66, "width": 192 @@ -400,7 +400,7 @@ }, { "data": { - "id": "ChatOutput-MBTWS", + "id": "ChatOutput-79PxR", "node": { "base_classes": [ "Message" @@ -697,7 +697,7 @@ "showNode": false, "type": "ChatOutput" }, - "id": "ChatOutput-MBTWS", + "id": "ChatOutput-79PxR", "measured": { "height": 66, "width": 192 @@ -711,7 +711,7 @@ }, { "data": { - "id": "note-uxe68", + "id": "note-5GFoW", "node": { "description": "## Open the playground and ask anything about a Pokémon! ⚡ 🐹", "display_name": "", @@ -724,7 +724,7 @@ }, "dragging": false, "height": 324, - "id": "note-uxe68", + "id": "note-5GFoW", "measured": { "height": 324, "width": 390 @@ -740,7 +740,7 @@ }, { "data": { - "id": "note-xoXqo", + "id": "note-4muEO", "node": { "description": "# Pokédex Agent\n\nCollect research on Pokémon with a specialized **Agent** and the Pokédex API.\n\n## Prerequisites\n\n* An [OpenAI API key](https://platform.openai.com/)\n\n## Quickstart\n\n1. Paste your OpenAI API key in the **Agent** component.\n2. Click **Playground** and ask about your favorite Pokémon.\nThe **Agent** queries the Pokedex API and returns a formatted entry.", "display_name": "", @@ -751,7 +751,7 @@ }, "dragging": false, "height": 543, - "id": "note-xoXqo", + "id": "note-4muEO", "measured": { "height": 543, "width": 349 @@ -767,7 +767,7 @@ }, { "data": { - "id": "note-fFswd", + "id": "note-8KPfY", "node": { "description": "### 💡 Add your OpenAI API key here", "display_name": "", @@ -780,7 +780,7 @@ }, "dragging": false, "height": 324, - "id": "note-fFswd", + "id": "note-8KPfY", "measured": { "height": 324, "width": 334 @@ -796,702 +796,7 @@ }, { "data": { - "id": "Agent-I23ZV", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "category": "agents", - "conditional_paths": [], - "custom_fields": {}, - "description": "Define the agent's instructions, then enter a task to complete using tools.", - "display_name": "Agent", - "documentation": "", - "edited": false, - "field_order": [ - "agent_llm", - "max_tokens", - "model_kwargs", - "json_mode", - "model_name", - "openai_api_base", - "api_key", - "temperature", - "seed", - "max_retries", - "timeout", - "system_prompt", - "tools", - "input_value", - "handle_parsing_errors", - "verbose", - "max_iterations", - "agent_description", - "memory", - "sender", - "sender_name", - "n_messages", - "session_id", - "order", - "template", - "add_current_date_tool" - ], - "frozen": false, - "icon": "bot", - "key": "Agent", - "legacy": false, - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Response", - "method": "message_response", - "name": "response", - "selected": "Message", - "tool_mode": true, - "types": [ - "Message" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "score": 5.283996070936036e-7, - "template": { - "_type": "Component", - "add_current_date_tool": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Current Date", - "dynamic": false, - "info": "If true, will add a tool to the agent that returns the current date.", - "list": false, - "list_add_label": "Add More", - "name": "add_current_date_tool", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "agent_description": { - "_input_type": "MultilineInput", - "advanced": true, - "copy_field": false, - "display_name": "Agent Description [Deprecated]", - "dynamic": false, - "info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "agent_description", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "A helpful assistant with access to the following tools:" - }, - "agent_llm": { - "_input_type": "DropdownInput", - "advanced": false, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Model Provider", - "dynamic": false, - "info": "The provider of the language model that the agent will use to generate responses.", - "input_types": [], - "name": "agent_llm", - "options": [ - "Amazon Bedrock", - "Anthropic", - "Azure OpenAI", - "Google Generative AI", - "Groq", - "NVIDIA", - "OpenAI", - "SambaNova", - "Custom" - ], - "options_metadata": [ - { - "icon": "Amazon" - }, - { - "icon": "Anthropic" - }, - { - "icon": "Azure" - }, - { - "icon": "GoogleGenerativeAI" - }, - { - "icon": "Groq" - }, - { - "icon": "NVIDIA" - }, - { - "icon": "OpenAI" - }, - { - "icon": "SambaNova" - }, - { - "icon": "brain" - } - ], - "placeholder": "", - "real_time_refresh": true, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "OpenAI" - }, - "api_key": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "OpenAI API Key", - "dynamic": false, - "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], - "load_from_db": true, - "name": "api_key", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "OPENAI_API_KEY" - }, - "code": { - "advanced": true, - "dynamic": true, - "fileTypes": [], - "file_path": "", - "info": "", - "list": false, - "load_from_db": false, - "multiline": true, - "name": "code", - "password": false, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "code", - "value": "from langchain_core.tools import StructuredTool\n\nfrom langflow.base.agents.agent import LCToolsAgentComponent\nfrom langflow.base.agents.events import ExceptionWithMessageError\nfrom langflow.base.models.model_input_constants import (\n ALL_PROVIDER_FIELDS,\n MODEL_DYNAMIC_UPDATE_FIELDS,\n MODEL_PROVIDERS_DICT,\n MODELS_METADATA,\n)\nfrom langflow.base.models.model_utils import get_model_name\nfrom langflow.components.helpers import CurrentDateComponent\nfrom langflow.components.helpers.memory import MemoryComponent\nfrom langflow.components.langchain_utilities.tool_calling import ToolCallingAgentComponent\nfrom langflow.custom.utils import update_component_build_config\nfrom langflow.io import BoolInput, DropdownInput, MultilineInput, Output\nfrom langflow.logging import logger\nfrom langflow.schema.dotdict import dotdict\nfrom langflow.schema.message import Message\n\n\ndef set_advanced_true(component_input):\n component_input.advanced = True\n return component_input\n\n\nclass AgentComponent(ToolCallingAgentComponent):\n display_name: str = \"Agent\"\n description: str = \"Define the agent's instructions, then enter a task to complete using tools.\"\n icon = \"bot\"\n beta = False\n name = \"Agent\"\n\n memory_inputs = [set_advanced_true(component_input) for component_input in MemoryComponent().inputs]\n\n inputs = [\n DropdownInput(\n name=\"agent_llm\",\n display_name=\"Model Provider\",\n info=\"The provider of the language model that the agent will use to generate responses.\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"OpenAI\",\n real_time_refresh=True,\n input_types=[],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())] + [{\"icon\": \"brain\"}],\n ),\n *MODEL_PROVIDERS_DICT[\"OpenAI\"][\"inputs\"],\n MultilineInput(\n name=\"system_prompt\",\n display_name=\"Agent Instructions\",\n info=\"System Prompt: Initial instructions and context provided to guide the agent's behavior.\",\n value=\"You are a helpful assistant that can use tools to answer questions and perform tasks.\",\n advanced=False,\n ),\n *LCToolsAgentComponent._base_inputs,\n *memory_inputs,\n BoolInput(\n name=\"add_current_date_tool\",\n display_name=\"Current Date\",\n advanced=True,\n info=\"If true, will add a tool to the agent that returns the current date.\",\n value=True,\n ),\n ]\n outputs = [Output(name=\"response\", display_name=\"Response\", method=\"message_response\")]\n\n async def message_response(self) -> Message:\n try:\n # Get LLM model and validate\n llm_model, display_name = self.get_llm()\n if llm_model is None:\n msg = \"No language model selected. Please choose a model to proceed.\"\n raise ValueError(msg)\n self.model_name = get_model_name(llm_model, display_name=display_name)\n\n # Get memory data\n self.chat_history = await self.get_memory_data()\n\n # Add current date tool if enabled\n if self.add_current_date_tool:\n if not isinstance(self.tools, list): # type: ignore[has-type]\n self.tools = []\n current_date_tool = (await CurrentDateComponent(**self.get_base_args()).to_toolkit()).pop(0)\n if not isinstance(current_date_tool, StructuredTool):\n msg = \"CurrentDateComponent must be converted to a StructuredTool\"\n raise TypeError(msg)\n self.tools.append(current_date_tool)\n\n # Validate tools\n if not self.tools:\n msg = \"Tools are required to run the agent. Please add at least one tool.\"\n raise ValueError(msg)\n\n # Set up and run agent\n self.set(\n llm=llm_model,\n tools=self.tools,\n chat_history=self.chat_history,\n input_value=self.input_value,\n system_prompt=self.system_prompt,\n )\n agent = self.create_agent_runnable()\n return await self.run_agent(agent)\n\n except (ValueError, TypeError, KeyError) as e:\n logger.error(f\"{type(e).__name__}: {e!s}\")\n raise\n except ExceptionWithMessageError as e:\n logger.error(f\"ExceptionWithMessageError occurred: {e}\")\n raise\n except Exception as e:\n logger.error(f\"Unexpected error: {e!s}\")\n raise\n\n async def get_memory_data(self):\n memory_kwargs = {\n component_input.name: getattr(self, f\"{component_input.name}\") for component_input in self.memory_inputs\n }\n # filter out empty values\n memory_kwargs = {k: v for k, v in memory_kwargs.items() if v}\n\n return await MemoryComponent(**self.get_base_args()).set(**memory_kwargs).retrieve_messages()\n\n def get_llm(self):\n if not isinstance(self.agent_llm, str):\n return self.agent_llm, None\n\n try:\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if not provider_info:\n msg = f\"Invalid model provider: {self.agent_llm}\"\n raise ValueError(msg)\n\n component_class = provider_info.get(\"component_class\")\n display_name = component_class.display_name\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\", \"\")\n\n return self._build_llm_model(component_class, inputs, prefix), display_name\n\n except Exception as e:\n logger.error(f\"Error building {self.agent_llm} language model: {e!s}\")\n msg = f\"Failed to initialize language model: {e!s}\"\n raise ValueError(msg) from e\n\n def _build_llm_model(self, component, inputs, prefix=\"\"):\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n return component.set(**model_kwargs).build_model()\n\n def set_component_params(self, component):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\")\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n\n return component.set(**model_kwargs)\n return component\n\n def delete_fields(self, build_config: dotdict, fields: dict | list[str]) -> None:\n \"\"\"Delete specified fields from build_config.\"\"\"\n for field in fields:\n build_config.pop(field, None)\n\n def update_input_types(self, build_config: dotdict) -> dotdict:\n \"\"\"Update input types for all fields in build_config.\"\"\"\n for key, value in build_config.items():\n if isinstance(value, dict):\n if value.get(\"input_types\") is None:\n build_config[key][\"input_types\"] = []\n elif hasattr(value, \"input_types\") and value.input_types is None:\n value.input_types = []\n return build_config\n\n async def update_build_config(\n self, build_config: dotdict, field_value: str, field_name: str | None = None\n ) -> dotdict:\n # Iterate over all providers in the MODEL_PROVIDERS_DICT\n # Existing logic for updating build_config\n if field_name in (\"agent_llm\",):\n build_config[\"agent_llm\"][\"value\"] = field_value\n provider_info = MODEL_PROVIDERS_DICT.get(field_value)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call the component class's update_build_config method\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n\n provider_configs: dict[str, tuple[dict, list[dict]]] = {\n provider: (\n MODEL_PROVIDERS_DICT[provider][\"fields\"],\n [\n MODEL_PROVIDERS_DICT[other_provider][\"fields\"]\n for other_provider in MODEL_PROVIDERS_DICT\n if other_provider != provider\n ],\n )\n for provider in MODEL_PROVIDERS_DICT\n }\n if field_value in provider_configs:\n fields_to_add, fields_to_delete = provider_configs[field_value]\n\n # Delete fields from other providers\n for fields in fields_to_delete:\n self.delete_fields(build_config, fields)\n\n # Add provider-specific fields\n if field_value == \"OpenAI\" and not any(field in build_config for field in fields_to_add):\n build_config.update(fields_to_add)\n else:\n build_config.update(fields_to_add)\n # Reset input types for agent_llm\n build_config[\"agent_llm\"][\"input_types\"] = []\n elif field_value == \"Custom\":\n # Delete all provider fields\n self.delete_fields(build_config, ALL_PROVIDER_FIELDS)\n # Update with custom component\n custom_component = DropdownInput(\n name=\"agent_llm\",\n display_name=\"Language Model\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"Custom\",\n real_time_refresh=True,\n input_types=[\"LanguageModel\"],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())]\n + [{\"icon\": \"brain\"}],\n )\n build_config.update({\"agent_llm\": custom_component.to_dict()})\n # Update input types for all fields\n build_config = self.update_input_types(build_config)\n\n # Validate required keys\n default_keys = [\n \"code\",\n \"_type\",\n \"agent_llm\",\n \"tools\",\n \"input_value\",\n \"add_current_date_tool\",\n \"system_prompt\",\n \"agent_description\",\n \"max_iterations\",\n \"handle_parsing_errors\",\n \"verbose\",\n ]\n missing_keys = [key for key in default_keys if key not in build_config]\n if missing_keys:\n msg = f\"Missing required keys in build_config: {missing_keys}\"\n raise ValueError(msg)\n if (\n isinstance(self.agent_llm, str)\n and self.agent_llm in MODEL_PROVIDERS_DICT\n and field_name in MODEL_DYNAMIC_UPDATE_FIELDS\n ):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n component_class = self.set_component_params(component_class)\n prefix = provider_info.get(\"prefix\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call each component class's update_build_config method\n # remove the prefix from the field_name\n if isinstance(field_name, str) and isinstance(prefix, str):\n field_name = field_name.replace(prefix, \"\")\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n return dotdict({k: v.to_dict() if hasattr(v, \"to_dict\") else v for k, v in build_config.items()})\n" - }, - "handle_parsing_errors": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Handle Parse Errors", - "dynamic": false, - "info": "Should the Agent fix errors when reading user input for better processing?", - "list": false, - "list_add_label": "Add More", - "name": "handle_parsing_errors", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "input_value": { - "_input_type": "MessageTextInput", - "advanced": false, - "display_name": "Input", - "dynamic": false, - "info": "The input provided by the user for the agent to process.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "input_value", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "json_mode": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "JSON Mode", - "dynamic": false, - "info": "If True, it will output JSON regardless of passing a schema.", - "list": false, - "list_add_label": "Add More", - "name": "json_mode", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": false - }, - "max_iterations": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Iterations", - "dynamic": false, - "info": "The maximum number of attempts the agent can make to complete its task before it stops.", - "list": false, - "list_add_label": "Add More", - "name": "max_iterations", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 15 - }, - "max_retries": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Retries", - "dynamic": false, - "info": "The maximum number of retries to make when generating.", - "list": false, - "list_add_label": "Add More", - "name": "max_retries", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 5 - }, - "max_tokens": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Tokens", - "dynamic": false, - "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", - "list": false, - "list_add_label": "Add More", - "name": "max_tokens", - "placeholder": "", - "range_spec": { - "max": 128000, - "min": 0, - "step": 0.1, - "step_type": "float" - }, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "memory": { - "_input_type": "HandleInput", - "advanced": true, - "display_name": "External Memory", - "dynamic": false, - "info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.", - "input_types": [ - "Memory" - ], - "list": false, - "list_add_label": "Add More", - "name": "memory", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "model_kwargs": { - "_input_type": "DictInput", - "advanced": true, - "display_name": "Model Kwargs", - "dynamic": false, - "info": "Additional keyword arguments to pass to the model.", - "list": false, - "list_add_label": "Add More", - "name": "model_kwargs", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "type": "dict", - "value": {} - }, - "model_name": { - "_input_type": "DropdownInput", - "advanced": false, - "combobox": true, - "dialog_inputs": {}, - "display_name": "Model Name", - "dynamic": false, - "info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.", - "name": "model_name", - "options": [ - "gpt-4o-mini", - "gpt-4o", - "gpt-4.5-preview", - "gpt-4-turbo", - "gpt-4-turbo-preview", - "gpt-4", - "gpt-3.5-turbo" - ], - "options_metadata": [], - "placeholder": "", - "real_time_refresh": false, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "gpt-4o" - }, - "n_messages": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Number of Messages", - "dynamic": false, - "info": "Number of messages to retrieve.", - "list": false, - "list_add_label": "Add More", - "name": "n_messages", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 100 - }, - "openai_api_base": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "OpenAI API Base", - "dynamic": false, - "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "openai_api_base", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "order": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Order", - "dynamic": false, - "info": "Order of the messages.", - "name": "order", - "options": [ - "Ascending", - "Descending" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_metadata": true, - "type": "str", - "value": "Ascending" - }, - "seed": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Seed", - "dynamic": false, - "info": "The seed controls the reproducibility of the job.", - "list": false, - "list_add_label": "Add More", - "name": "seed", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 1 - }, - "sender": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Sender Type", - "dynamic": false, - "info": "Filter by sender type.", - "name": "sender", - "options": [ - "Machine", - "User", - "Machine and User" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "Machine and User" - }, - "sender_name": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Sender Name", - "dynamic": false, - "info": "Filter by sender name.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "sender_name", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "session_id": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Session ID", - "dynamic": false, - "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "session_id", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "system_prompt": { - "_input_type": "MultilineInput", - "advanced": false, - "copy_field": false, - "display_name": "Agent Instructions", - "dynamic": false, - "info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "system_prompt", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "You are a pokedex. Grab information about pokemons using the following endpoint:\nhttps://pokeapi.co/api/v2/pokemon/\n\nFor example:\nhttps://pokeapi.co/api/v2/pokemon/ditto\nhttps://pokeapi.co/api/v2/pokemon/pikachu\n\nFix user pokemon name mispelling." - }, - "temperature": { - "_input_type": "SliderInput", - "advanced": true, - "display_name": "Temperature", - "dynamic": false, - "info": "", - "max_label": "", - "max_label_icon": "", - "min_label": "", - "min_label_icon": "", - "name": "temperature", - "placeholder": "", - "range_spec": { - "max": 1, - "min": 0, - "step": 0.01, - "step_type": "float" - }, - "required": false, - "show": true, - "slider_buttons": false, - "slider_buttons_options": [], - "slider_input": false, - "title_case": false, - "tool_mode": false, - "type": "slider", - "value": 0.1 - }, - "template": { - "_input_type": "MultilineInput", - "advanced": true, - "copy_field": false, - "display_name": "Template", - "dynamic": false, - "info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "template", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "{sender_name}: {text}" - }, - "timeout": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Timeout", - "dynamic": false, - "info": "The timeout for requests to OpenAI completion API.", - "list": false, - "list_add_label": "Add More", - "name": "timeout", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 700 - }, - "tools": { - "_input_type": "HandleInput", - "advanced": false, - "display_name": "Tools", - "dynamic": false, - "info": "These are the tools that the agent can use to help with tasks.", - "input_types": [ - "Tool" - ], - "list": true, - "list_add_label": "Add More", - "name": "tools", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "verbose": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Verbose", - "dynamic": false, - "info": "", - "list": false, - "list_add_label": "Add More", - "name": "verbose", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - } - }, - "tool_mode": false - }, - "showNode": true, - "type": "Agent" - }, - "id": "Agent-I23ZV", - "measured": { - "height": 624, - "width": 320 - }, - "position": { - "x": 585, - "y": -270 - }, - "selected": false, - "type": "genericNode" - }, - { - "data": { - "id": "APIRequest-zDdGN", + "id": "APIRequest-Yr0ij", "node": { "base_classes": [ "Data", @@ -1819,11 +1124,11 @@ "value": 5 }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1831,102 +1136,63 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "make_requests() - Make HTTP requests using URLs or cURL commands.", - "name": "APIRequest-make_requests", + "args": { + "curl": { + "default": "", + "description": "Paste a curl command to populate the fields. This will fill in the dictionary fields for headers and body.", + "title": "Curl", + "type": "string" + }, + "urls": { + "default": "", + "description": "Enter one or more URLs, separated by commas.", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "APIRequest. make_requests() - Make HTTP requests using URLs or cURL commands.", + "display_description": "APIRequest. make_requests() - Make HTTP requests using URLs or cURL commands.", + "display_name": "make_requests", + "name": "make_requests", "status": true, "tags": [ - "APIRequest-make_requests" + "make_requests" ] }, { - "description": "as_dataframe() - Make HTTP requests using URLs or cURL commands.", - "name": "APIRequest-as_dataframe", + "args": { + "curl": { + "default": "", + "description": "Paste a curl command to populate the fields. This will fill in the dictionary fields for headers and body.", + "title": "Curl", + "type": "string" + }, + "urls": { + "default": "", + "description": "Enter one or more URLs, separated by commas.", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "APIRequest. as_dataframe() - Make HTTP requests using URLs or cURL commands.", + "display_description": "APIRequest. as_dataframe() - Make HTTP requests using URLs or cURL commands.", + "display_name": "as_dataframe", + "name": "as_dataframe", "status": true, "tags": [ - "APIRequest-as_dataframe" + "as_dataframe" ] } ] @@ -1980,30 +1246,732 @@ "type": "APIRequest" }, "dragging": false, - "id": "APIRequest-zDdGN", + "id": "APIRequest-Yr0ij", "measured": { - "height": 467, + "height": 372, "width": 320 }, "position": { "x": 123.80186574558488, "y": -342.60130402310887 }, + "selected": false, + "type": "genericNode" + }, + { + "data": { + "id": "Agent-iU8sJ", + "node": { + "base_classes": [ + "Message" + ], + "beta": false, + "category": "agents", + "conditional_paths": [], + "custom_fields": {}, + "description": "Define the agent's instructions, then enter a task to complete using tools.", + "display_name": "Agent", + "documentation": "", + "edited": false, + "field_order": [ + "agent_llm", + "max_tokens", + "model_kwargs", + "json_mode", + "model_name", + "openai_api_base", + "api_key", + "temperature", + "seed", + "max_retries", + "timeout", + "system_prompt", + "tools", + "input_value", + "handle_parsing_errors", + "verbose", + "max_iterations", + "agent_description", + "memory", + "sender", + "sender_name", + "n_messages", + "session_id", + "order", + "template", + "add_current_date_tool" + ], + "frozen": false, + "icon": "bot", + "key": "Agent", + "legacy": false, + "metadata": {}, + "minimized": false, + "output_types": [], + "outputs": [ + { + "allows_loop": false, + "cache": true, + "display_name": "Response", + "method": "message_response", + "name": "response", + "selected": "Message", + "tool_mode": true, + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "score": 1.1732828199964098e-19, + "template": { + "_type": "Component", + "add_current_date_tool": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Current Date", + "dynamic": false, + "info": "If true, will add a tool to the agent that returns the current date.", + "list": false, + "list_add_label": "Add More", + "name": "add_current_date_tool", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "agent_description": { + "_input_type": "MultilineInput", + "advanced": true, + "copy_field": false, + "display_name": "Agent Description [Deprecated]", + "dynamic": false, + "info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "agent_description", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "A helpful assistant with access to the following tools:" + }, + "agent_llm": { + "_input_type": "DropdownInput", + "advanced": false, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Model Provider", + "dynamic": false, + "info": "The provider of the language model that the agent will use to generate responses.", + "input_types": [], + "name": "agent_llm", + "options": [ + "Amazon Bedrock", + "Anthropic", + "Azure OpenAI", + "Google Generative AI", + "Groq", + "NVIDIA", + "OpenAI", + "SambaNova", + "Custom" + ], + "options_metadata": [ + { + "icon": "Amazon" + }, + { + "icon": "Anthropic" + }, + { + "icon": "Azure" + }, + { + "icon": "GoogleGenerativeAI" + }, + { + "icon": "Groq" + }, + { + "icon": "NVIDIA" + }, + { + "icon": "OpenAI" + }, + { + "icon": "SambaNova" + }, + { + "icon": "brain" + } + ], + "placeholder": "", + "real_time_refresh": true, + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "OpenAI" + }, + "api_key": { + "_input_type": "SecretStrInput", + "advanced": false, + "display_name": "OpenAI API Key", + "dynamic": false, + "info": "The OpenAI API Key to use for the OpenAI model.", + "input_types": [], + "load_from_db": true, + "name": "api_key", + "password": true, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "str", + "value": "OPENAI_API_KEY" + }, + "code": { + "advanced": true, + "dynamic": true, + "fileTypes": [], + "file_path": "", + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "code", + "password": false, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "code", + "value": "from langchain_core.tools import StructuredTool\n\nfrom langflow.base.agents.agent import LCToolsAgentComponent\nfrom langflow.base.agents.events import ExceptionWithMessageError\nfrom langflow.base.models.model_input_constants import (\n ALL_PROVIDER_FIELDS,\n MODEL_DYNAMIC_UPDATE_FIELDS,\n MODEL_PROVIDERS_DICT,\n MODELS_METADATA,\n)\nfrom langflow.base.models.model_utils import get_model_name\nfrom langflow.components.helpers import CurrentDateComponent\nfrom langflow.components.helpers.memory import MemoryComponent\nfrom langflow.components.langchain_utilities.tool_calling import ToolCallingAgentComponent\nfrom langflow.custom.utils import update_component_build_config\nfrom langflow.io import BoolInput, DropdownInput, MultilineInput, Output\nfrom langflow.logging import logger\nfrom langflow.schema.dotdict import dotdict\nfrom langflow.schema.message import Message\n\n\ndef set_advanced_true(component_input):\n component_input.advanced = True\n return component_input\n\n\nclass AgentComponent(ToolCallingAgentComponent):\n display_name: str = \"Agent\"\n description: str = \"Define the agent's instructions, then enter a task to complete using tools.\"\n icon = \"bot\"\n beta = False\n name = \"Agent\"\n\n memory_inputs = [set_advanced_true(component_input) for component_input in MemoryComponent().inputs]\n\n inputs = [\n DropdownInput(\n name=\"agent_llm\",\n display_name=\"Model Provider\",\n info=\"The provider of the language model that the agent will use to generate responses.\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"OpenAI\",\n real_time_refresh=True,\n input_types=[],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())] + [{\"icon\": \"brain\"}],\n ),\n *MODEL_PROVIDERS_DICT[\"OpenAI\"][\"inputs\"],\n MultilineInput(\n name=\"system_prompt\",\n display_name=\"Agent Instructions\",\n info=\"System Prompt: Initial instructions and context provided to guide the agent's behavior.\",\n value=\"You are a helpful assistant that can use tools to answer questions and perform tasks.\",\n advanced=False,\n ),\n *LCToolsAgentComponent._base_inputs,\n *memory_inputs,\n BoolInput(\n name=\"add_current_date_tool\",\n display_name=\"Current Date\",\n advanced=True,\n info=\"If true, will add a tool to the agent that returns the current date.\",\n value=True,\n ),\n ]\n outputs = [Output(name=\"response\", display_name=\"Response\", method=\"message_response\")]\n\n async def message_response(self) -> Message:\n try:\n # Get LLM model and validate\n llm_model, display_name = self.get_llm()\n if llm_model is None:\n msg = \"No language model selected. Please choose a model to proceed.\"\n raise ValueError(msg)\n self.model_name = get_model_name(llm_model, display_name=display_name)\n\n # Get memory data\n self.chat_history = await self.get_memory_data()\n\n # Add current date tool if enabled\n if self.add_current_date_tool:\n if not isinstance(self.tools, list): # type: ignore[has-type]\n self.tools = []\n current_date_tool = (await CurrentDateComponent(**self.get_base_args()).to_toolkit()).pop(0)\n if not isinstance(current_date_tool, StructuredTool):\n msg = \"CurrentDateComponent must be converted to a StructuredTool\"\n raise TypeError(msg)\n self.tools.append(current_date_tool)\n\n # Validate tools\n if not self.tools:\n msg = \"Tools are required to run the agent. Please add at least one tool.\"\n raise ValueError(msg)\n\n # Set up and run agent\n self.set(\n llm=llm_model,\n tools=self.tools,\n chat_history=self.chat_history,\n input_value=self.input_value,\n system_prompt=self.system_prompt,\n )\n agent = self.create_agent_runnable()\n return await self.run_agent(agent)\n\n except (ValueError, TypeError, KeyError) as e:\n logger.error(f\"{type(e).__name__}: {e!s}\")\n raise\n except ExceptionWithMessageError as e:\n logger.error(f\"ExceptionWithMessageError occurred: {e}\")\n raise\n except Exception as e:\n logger.error(f\"Unexpected error: {e!s}\")\n raise\n\n async def get_memory_data(self):\n memory_kwargs = {\n component_input.name: getattr(self, f\"{component_input.name}\") for component_input in self.memory_inputs\n }\n # filter out empty values\n memory_kwargs = {k: v for k, v in memory_kwargs.items() if v}\n\n return await MemoryComponent(**self.get_base_args()).set(**memory_kwargs).retrieve_messages()\n\n def get_llm(self):\n if not isinstance(self.agent_llm, str):\n return self.agent_llm, None\n\n try:\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if not provider_info:\n msg = f\"Invalid model provider: {self.agent_llm}\"\n raise ValueError(msg)\n\n component_class = provider_info.get(\"component_class\")\n display_name = component_class.display_name\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\", \"\")\n\n return self._build_llm_model(component_class, inputs, prefix), display_name\n\n except Exception as e:\n logger.error(f\"Error building {self.agent_llm} language model: {e!s}\")\n msg = f\"Failed to initialize language model: {e!s}\"\n raise ValueError(msg) from e\n\n def _build_llm_model(self, component, inputs, prefix=\"\"):\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n return component.set(**model_kwargs).build_model()\n\n def set_component_params(self, component):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\")\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n\n return component.set(**model_kwargs)\n return component\n\n def delete_fields(self, build_config: dotdict, fields: dict | list[str]) -> None:\n \"\"\"Delete specified fields from build_config.\"\"\"\n for field in fields:\n build_config.pop(field, None)\n\n def update_input_types(self, build_config: dotdict) -> dotdict:\n \"\"\"Update input types for all fields in build_config.\"\"\"\n for key, value in build_config.items():\n if isinstance(value, dict):\n if value.get(\"input_types\") is None:\n build_config[key][\"input_types\"] = []\n elif hasattr(value, \"input_types\") and value.input_types is None:\n value.input_types = []\n return build_config\n\n async def update_build_config(\n self, build_config: dotdict, field_value: str, field_name: str | None = None\n ) -> dotdict:\n # Iterate over all providers in the MODEL_PROVIDERS_DICT\n # Existing logic for updating build_config\n if field_name in (\"agent_llm\",):\n build_config[\"agent_llm\"][\"value\"] = field_value\n provider_info = MODEL_PROVIDERS_DICT.get(field_value)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call the component class's update_build_config method\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n\n provider_configs: dict[str, tuple[dict, list[dict]]] = {\n provider: (\n MODEL_PROVIDERS_DICT[provider][\"fields\"],\n [\n MODEL_PROVIDERS_DICT[other_provider][\"fields\"]\n for other_provider in MODEL_PROVIDERS_DICT\n if other_provider != provider\n ],\n )\n for provider in MODEL_PROVIDERS_DICT\n }\n if field_value in provider_configs:\n fields_to_add, fields_to_delete = provider_configs[field_value]\n\n # Delete fields from other providers\n for fields in fields_to_delete:\n self.delete_fields(build_config, fields)\n\n # Add provider-specific fields\n if field_value == \"OpenAI\" and not any(field in build_config for field in fields_to_add):\n build_config.update(fields_to_add)\n else:\n build_config.update(fields_to_add)\n # Reset input types for agent_llm\n build_config[\"agent_llm\"][\"input_types\"] = []\n elif field_value == \"Custom\":\n # Delete all provider fields\n self.delete_fields(build_config, ALL_PROVIDER_FIELDS)\n # Update with custom component\n custom_component = DropdownInput(\n name=\"agent_llm\",\n display_name=\"Language Model\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"Custom\",\n real_time_refresh=True,\n input_types=[\"LanguageModel\"],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())]\n + [{\"icon\": \"brain\"}],\n )\n build_config.update({\"agent_llm\": custom_component.to_dict()})\n # Update input types for all fields\n build_config = self.update_input_types(build_config)\n\n # Validate required keys\n default_keys = [\n \"code\",\n \"_type\",\n \"agent_llm\",\n \"tools\",\n \"input_value\",\n \"add_current_date_tool\",\n \"system_prompt\",\n \"agent_description\",\n \"max_iterations\",\n \"handle_parsing_errors\",\n \"verbose\",\n ]\n missing_keys = [key for key in default_keys if key not in build_config]\n if missing_keys:\n msg = f\"Missing required keys in build_config: {missing_keys}\"\n raise ValueError(msg)\n if (\n isinstance(self.agent_llm, str)\n and self.agent_llm in MODEL_PROVIDERS_DICT\n and field_name in MODEL_DYNAMIC_UPDATE_FIELDS\n ):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n component_class = self.set_component_params(component_class)\n prefix = provider_info.get(\"prefix\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call each component class's update_build_config method\n # remove the prefix from the field_name\n if isinstance(field_name, str) and isinstance(prefix, str):\n field_name = field_name.replace(prefix, \"\")\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n return dotdict({k: v.to_dict() if hasattr(v, \"to_dict\") else v for k, v in build_config.items()})\n" + }, + "handle_parsing_errors": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Handle Parse Errors", + "dynamic": false, + "info": "Should the Agent fix errors when reading user input for better processing?", + "list": false, + "list_add_label": "Add More", + "name": "handle_parsing_errors", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "input_value": { + "_input_type": "MessageTextInput", + "advanced": false, + "display_name": "Input", + "dynamic": false, + "info": "The input provided by the user for the agent to process.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "input_value", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": true, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "json_mode": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "JSON Mode", + "dynamic": false, + "info": "If True, it will output JSON regardless of passing a schema.", + "list": false, + "list_add_label": "Add More", + "name": "json_mode", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": false + }, + "max_iterations": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Iterations", + "dynamic": false, + "info": "The maximum number of attempts the agent can make to complete its task before it stops.", + "list": false, + "list_add_label": "Add More", + "name": "max_iterations", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 15 + }, + "max_retries": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Retries", + "dynamic": false, + "info": "The maximum number of retries to make when generating.", + "list": false, + "list_add_label": "Add More", + "name": "max_retries", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, + "max_tokens": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Tokens", + "dynamic": false, + "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", + "list": false, + "list_add_label": "Add More", + "name": "max_tokens", + "placeholder": "", + "range_spec": { + "max": 128000, + "min": 0, + "step": 0.1, + "step_type": "float" + }, + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": "" + }, + "memory": { + "_input_type": "HandleInput", + "advanced": true, + "display_name": "External Memory", + "dynamic": false, + "info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.", + "input_types": [ + "Memory" + ], + "list": false, + "list_add_label": "Add More", + "name": "memory", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "other", + "value": "" + }, + "model_kwargs": { + "_input_type": "DictInput", + "advanced": true, + "display_name": "Model Kwargs", + "dynamic": false, + "info": "Additional keyword arguments to pass to the model.", + "list": false, + "list_add_label": "Add More", + "name": "model_kwargs", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "type": "dict", + "value": {} + }, + "model_name": { + "_input_type": "DropdownInput", + "advanced": false, + "combobox": true, + "dialog_inputs": {}, + "display_name": "Model Name", + "dynamic": false, + "info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.", + "name": "model_name", + "options": [ + "gpt-4o-mini", + "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-4.5-preview", + "gpt-4-turbo", + "gpt-4-turbo-preview", + "gpt-4", + "gpt-3.5-turbo", + "o1" + ], + "options_metadata": [], + "placeholder": "", + "real_time_refresh": false, + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "gpt-4.1" + }, + "n_messages": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Number of Messages", + "dynamic": false, + "info": "Number of messages to retrieve.", + "list": false, + "list_add_label": "Add More", + "name": "n_messages", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 100 + }, + "openai_api_base": { + "_input_type": "StrInput", + "advanced": true, + "display_name": "OpenAI API Base", + "dynamic": false, + "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "openai_api_base", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "order": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Order", + "dynamic": false, + "info": "Order of the messages.", + "name": "order", + "options": [ + "Ascending", + "Descending" + ], + "options_metadata": [], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": true, + "trace_as_metadata": true, + "type": "str", + "value": "Ascending" + }, + "seed": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Seed", + "dynamic": false, + "info": "The seed controls the reproducibility of the job.", + "list": false, + "list_add_label": "Add More", + "name": "seed", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 1 + }, + "sender": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Sender Type", + "dynamic": false, + "info": "Filter by sender type.", + "name": "sender", + "options": [ + "Machine", + "User", + "Machine and User" + ], + "options_metadata": [], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "Machine and User" + }, + "sender_name": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Sender Name", + "dynamic": false, + "info": "Filter by sender name.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "sender_name", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "session_id": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Session ID", + "dynamic": false, + "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "session_id", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "system_prompt": { + "_input_type": "MultilineInput", + "advanced": false, + "copy_field": false, + "display_name": "Agent Instructions", + "dynamic": false, + "info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "system_prompt", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "You are a pokedex. Grab information about pokemons using the following endpoint:\nhttps://pokeapi.co/api/v2/pokemon/\n\nFor example:\nhttps://pokeapi.co/api/v2/pokemon/ditto\nhttps://pokeapi.co/api/v2/pokemon/pikachu\n\nFix user pokemon name mispelling." + }, + "temperature": { + "_input_type": "SliderInput", + "advanced": true, + "display_name": "Temperature", + "dynamic": false, + "info": "", + "max_label": "", + "max_label_icon": "", + "min_label": "", + "min_label_icon": "", + "name": "temperature", + "placeholder": "", + "range_spec": { + "max": 1, + "min": 0, + "step": 0.01, + "step_type": "float" + }, + "required": false, + "show": true, + "slider_buttons": false, + "slider_buttons_options": [], + "slider_input": false, + "title_case": false, + "tool_mode": false, + "type": "slider", + "value": 0.1 + }, + "template": { + "_input_type": "MultilineInput", + "advanced": true, + "copy_field": false, + "display_name": "Template", + "dynamic": false, + "info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "template", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "{sender_name}: {text}" + }, + "timeout": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Timeout", + "dynamic": false, + "info": "The timeout for requests to OpenAI completion API.", + "list": false, + "list_add_label": "Add More", + "name": "timeout", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 700 + }, + "tools": { + "_input_type": "HandleInput", + "advanced": false, + "display_name": "Tools", + "dynamic": false, + "info": "These are the tools that the agent can use to help with tasks.", + "input_types": [ + "Tool" + ], + "list": true, + "list_add_label": "Add More", + "name": "tools", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "other", + "value": "" + }, + "verbose": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Verbose", + "dynamic": false, + "info": "", + "list": false, + "list_add_label": "Add More", + "name": "verbose", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + } + }, + "tool_mode": false + }, + "showNode": true, + "type": "Agent" + }, + "dragging": false, + "id": "Agent-iU8sJ", + "measured": { + "height": 624, + "width": 320 + }, + "position": { + "x": 553.2856156382643, + "y": -292.8049710393936 + }, "selected": true, "type": "genericNode" } ], "viewport": { - "x": 354.89464052611004, - "y": 495.49044875044, - "zoom": 0.7924384570705768 + "x": 293.61191901823486, + "y": 568.7214260270939, + "zoom": 0.6513599320055071 } }, "description": "Research Pokémon with a specialized Agent and the Pokédex API.", "endpoint_name": null, - "id": "e062c7a2-5f48-41bc-b22e-6473777d4473", + "id": "3eb87d27-6b74-4936-895f-5c3eae452456", "is_component": false, - "last_tested_version": "1.2.0", + "last_tested_version": "1.3.4", "name": "Pokédex Agent", "tags": [ "agents" diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json b/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json index 35ae8fa5c..5b48a684d 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json @@ -1866,7 +1866,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json index ba4b149db..dd70bad31 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json @@ -1294,7 +1294,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", @@ -2461,7 +2461,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -2845,7 +2845,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json b/src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json index 6684737c4..9f6baef9a 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/SEO Keyword Generator.json @@ -1094,7 +1094,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json b/src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json index 9c4afa599..8c4bdc263 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json @@ -1016,7 +1016,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json index ce4af6938..b56c68f20 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Search agent.json @@ -1183,9 +1183,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -1383,11 +1381,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -1398,7 +1400,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json b/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json index 648750e03..591a7461b 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json @@ -660,7 +660,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", @@ -1282,7 +1282,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", @@ -2726,7 +2726,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json index 33052336c..04dcbdd56 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Simple Agent.json @@ -3,90 +3,10 @@ "edges": [ { "animated": false, - "data": { - "sourceHandle": { - "dataType": "URL", - "id": "URL-eEDon", - "name": "component_as_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-8k2Yj", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "xy-edge__URL-eEDon{œdataTypeœ:œURLœ,œidœ:œURL-eEDonœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-8k2Yj{œfieldNameœ:œtoolsœ,œidœ:œAgent-8k2Yjœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "selected": false, - "source": "URL-eEDon", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-eEDonœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-8k2Yj", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-8k2Yjœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "CalculatorComponent", - "id": "CalculatorComponent-zU3QI", - "name": "component_as_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-8k2Yj", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "xy-edge__CalculatorComponent-zU3QI{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-zU3QIœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-8k2Yj{œfieldNameœ:œtoolsœ,œidœ:œAgent-8k2Yjœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "selected": false, - "source": "CalculatorComponent-zU3QI", - "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-zU3QIœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-8k2Yj", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-8k2Yjœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" - }, - { - "animated": false, - "data": { - "sourceHandle": { - "dataType": "ChatInput", - "id": "ChatInput-sYodl", - "name": "message", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "input_value", - "id": "Agent-8k2Yj", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "xy-edge__ChatInput-sYodl{œdataTypeœ:œChatInputœ,œidœ:œChatInput-sYodlœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-8k2Yj{œfieldNameœ:œinput_valueœ,œidœ:œAgent-8k2Yjœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "ChatInput-sYodl", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-sYodlœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-8k2Yj", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-8k2Yjœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-8k2Yj", + "id": "Agent-qYZ9W", "name": "response", "output_types": [ "Message" @@ -94,7 +14,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-IwY9Y", + "id": "ChatOutput-aHj8n", "inputTypes": [ "Data", "DataFrame", @@ -103,11 +23,91 @@ "type": "other" } }, - "id": "xy-edge__Agent-8k2Yj{œdataTypeœ:œAgentœ,œidœ:œAgent-8k2Yjœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-IwY9Y{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-IwY9Yœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", - "source": "Agent-8k2Yj", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-8k2Yjœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-IwY9Y", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-IwY9Yœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" + "id": "xy-edge__Agent-qYZ9W{œdataTypeœ:œAgentœ,œidœ:œAgent-qYZ9Wœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-aHj8n{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-aHj8nœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", + "selected": false, + "source": "Agent-qYZ9W", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-qYZ9Wœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-aHj8n", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-aHj8nœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "CalculatorComponent", + "id": "CalculatorComponent-15FSE", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-qYZ9W", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__CalculatorComponent-15FSE{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-15FSEœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-qYZ9W{œfieldNameœ:œtoolsœ,œidœ:œAgent-qYZ9Wœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "CalculatorComponent-15FSE", + "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-15FSEœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-qYZ9W", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-qYZ9Wœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "URL", + "id": "URL-o7GEq", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-qYZ9W", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__URL-o7GEq{œdataTypeœ:œURLœ,œidœ:œURL-o7GEqœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-qYZ9W{œfieldNameœ:œtoolsœ,œidœ:œAgent-qYZ9Wœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "URL-o7GEq", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-o7GEqœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-qYZ9W", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-qYZ9Wœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "ChatInput", + "id": "ChatInput-2YUmA", + "name": "message", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "input_value", + "id": "Agent-qYZ9W", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "xy-edge__ChatInput-2YUmA{œdataTypeœ:œChatInputœ,œidœ:œChatInput-2YUmAœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-qYZ9W{œfieldNameœ:œinput_valueœ,œidœ:œAgent-qYZ9Wœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "ChatInput-2YUmA", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-2YUmAœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-qYZ9W", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-qYZ9Wœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" } ], "nodes": [ @@ -115,7 +115,7 @@ "data": { "description": "Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", "display_name": "URL", - "id": "URL-eEDon", + "id": "URL-o7GEq", "node": { "base_classes": [ "Data", @@ -147,9 +147,10 @@ "allows_loop": false, "cache": true, "display_name": "Toolset", - "hidden": null, + "hidden": false, "method": "to_toolkit", "name": "component_as_tool", + "options": null, "required_inputs": null, "selected": "Tool", "tool_mode": true, @@ -243,11 +244,11 @@ "value": "\n\n" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -255,94 +256,72 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content", + "name": "fetch_content", + "status": true, "tags": [ - "URL-fetch_content" + "fetch_content" ] }, { - "description": "fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content_text", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content_text", + "name": "fetch_content_text", + "status": true, "tags": [ - "URL-fetch_content_text" + "fetch_content_text" ] }, { - "description": "as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-as_dataframe", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "as_dataframe", + "name": "as_dataframe", + "status": true, "tags": [ - "URL-as_dataframe" + "as_dataframe" ] } ] @@ -376,9 +355,9 @@ "type": "URL" }, "dragging": false, - "id": "URL-eEDon", + "id": "URL-o7GEq", "measured": { - "height": 590, + "height": 523, "width": 320 }, "position": { @@ -390,7 +369,7 @@ }, { "data": { - "id": "note-BPPYH", + "id": "note-wtgw9", "node": { "description": "# 📖 README\nRun an Agent with URL and Calculator tools available for its use. \nThe Agent decides which tool to use to solve a problem.\n## Quick start\n\n1. Add your OpenAI API key to the Agent.\n2. Open the Playground and chat with the Agent. Request some information about a recipe, and then ask to add two numbers together. In the responses, the Agent will use different tools to solve different problems.\n\n## Next steps\nConnect more tools to the Agent to create your perfect assistant.\n\nFor more, see the [Langflow docs](https://docs.langflow.org/agents-tool-calling-agent-component).", "display_name": "", @@ -402,7 +381,7 @@ "type": "note" }, "dragging": false, - "id": "note-BPPYH", + "id": "note-wtgw9", "measured": { "height": 630, "width": 325 @@ -416,7 +395,7 @@ }, { "data": { - "id": "note-8AvvZ", + "id": "note-d6QWe", "node": { "description": "### 💡 Add your OpenAI API key here👇", "display_name": "", @@ -427,7 +406,7 @@ }, "type": "note" }, - "id": "note-8AvvZ", + "id": "note-d6QWe", "measured": { "height": 324, "width": 324 @@ -441,7 +420,7 @@ }, { "data": { - "id": "CalculatorComponent-zU3QI", + "id": "CalculatorComponent-15FSE", "node": { "base_classes": [ "Data" @@ -470,9 +449,10 @@ "allows_loop": false, "cache": true, "display_name": "Toolset", - "hidden": null, + "hidden": false, "method": "to_toolkit", "name": "component_as_tool", + "options": null, "required_inputs": null, "selected": "Tool", "tool_mode": true, @@ -528,11 +508,11 @@ "value": "" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -540,94 +520,27 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.", - "name": "CalculatorComponent-evaluate_expression", + "args": { + "expression": { + "default": "", + "description": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').", + "title": "Expression", + "type": "string" + } + }, + "description": "CalculatorComponent. evaluate_expression() - Perform basic arithmetic operations on a given expression.", + "display_description": "CalculatorComponent. evaluate_expression() - Perform basic arithmetic operations on a given expression.", + "display_name": "evaluate_expression", + "name": "evaluate_expression", "status": true, "tags": [ - "CalculatorComponent-evaluate_expression" + "evaluate_expression" ] } ] @@ -639,9 +552,9 @@ "type": "CalculatorComponent" }, "dragging": false, - "id": "CalculatorComponent-zU3QI", + "id": "CalculatorComponent-15FSE", "measured": { - "height": 334, + "height": 248, "width": 320 }, "position": { @@ -653,703 +566,7 @@ }, { "data": { - "id": "Agent-8k2Yj", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "category": "agents", - "conditional_paths": [], - "custom_fields": {}, - "description": "Define the agent's instructions, then enter a task to complete using tools.", - "display_name": "Agent", - "documentation": "", - "edited": false, - "field_order": [ - "agent_llm", - "max_tokens", - "model_kwargs", - "json_mode", - "model_name", - "openai_api_base", - "api_key", - "temperature", - "seed", - "max_retries", - "timeout", - "system_prompt", - "tools", - "input_value", - "handle_parsing_errors", - "verbose", - "max_iterations", - "agent_description", - "memory", - "sender", - "sender_name", - "n_messages", - "session_id", - "order", - "template", - "add_current_date_tool" - ], - "frozen": false, - "icon": "bot", - "key": "Agent", - "legacy": false, - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Response", - "method": "message_response", - "name": "response", - "selected": "Message", - "tool_mode": true, - "types": [ - "Message" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "score": 1.1732828199964098e-19, - "template": { - "_type": "Component", - "add_current_date_tool": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Current Date", - "dynamic": false, - "info": "If true, will add a tool to the agent that returns the current date.", - "list": false, - "list_add_label": "Add More", - "name": "add_current_date_tool", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "agent_description": { - "_input_type": "MultilineInput", - "advanced": true, - "copy_field": false, - "display_name": "Agent Description [Deprecated]", - "dynamic": false, - "info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "agent_description", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "A helpful assistant with access to the following tools:" - }, - "agent_llm": { - "_input_type": "DropdownInput", - "advanced": false, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Model Provider", - "dynamic": false, - "info": "The provider of the language model that the agent will use to generate responses.", - "input_types": [], - "name": "agent_llm", - "options": [ - "Amazon Bedrock", - "Anthropic", - "Azure OpenAI", - "Google Generative AI", - "Groq", - "NVIDIA", - "OpenAI", - "SambaNova", - "Custom" - ], - "options_metadata": [ - { - "icon": "Amazon" - }, - { - "icon": "Anthropic" - }, - { - "icon": "Azure" - }, - { - "icon": "GoogleGenerativeAI" - }, - { - "icon": "Groq" - }, - { - "icon": "NVIDIA" - }, - { - "icon": "OpenAI" - }, - { - "icon": "SambaNova" - }, - { - "icon": "brain" - } - ], - "placeholder": "", - "real_time_refresh": true, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "OpenAI" - }, - "api_key": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "OpenAI API Key", - "dynamic": false, - "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], - "load_from_db": true, - "name": "api_key", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "OPENAI_API_KEY" - }, - "code": { - "advanced": true, - "dynamic": true, - "fileTypes": [], - "file_path": "", - "info": "", - "list": false, - "load_from_db": false, - "multiline": true, - "name": "code", - "password": false, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "code", - "value": "from langchain_core.tools import StructuredTool\n\nfrom langflow.base.agents.agent import LCToolsAgentComponent\nfrom langflow.base.agents.events import ExceptionWithMessageError\nfrom langflow.base.models.model_input_constants import (\n ALL_PROVIDER_FIELDS,\n MODEL_DYNAMIC_UPDATE_FIELDS,\n MODEL_PROVIDERS_DICT,\n MODELS_METADATA,\n)\nfrom langflow.base.models.model_utils import get_model_name\nfrom langflow.components.helpers import CurrentDateComponent\nfrom langflow.components.helpers.memory import MemoryComponent\nfrom langflow.components.langchain_utilities.tool_calling import ToolCallingAgentComponent\nfrom langflow.custom.utils import update_component_build_config\nfrom langflow.io import BoolInput, DropdownInput, MultilineInput, Output\nfrom langflow.logging import logger\nfrom langflow.schema.dotdict import dotdict\nfrom langflow.schema.message import Message\n\n\ndef set_advanced_true(component_input):\n component_input.advanced = True\n return component_input\n\n\nclass AgentComponent(ToolCallingAgentComponent):\n display_name: str = \"Agent\"\n description: str = \"Define the agent's instructions, then enter a task to complete using tools.\"\n icon = \"bot\"\n beta = False\n name = \"Agent\"\n\n memory_inputs = [set_advanced_true(component_input) for component_input in MemoryComponent().inputs]\n\n inputs = [\n DropdownInput(\n name=\"agent_llm\",\n display_name=\"Model Provider\",\n info=\"The provider of the language model that the agent will use to generate responses.\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"OpenAI\",\n real_time_refresh=True,\n input_types=[],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())] + [{\"icon\": \"brain\"}],\n ),\n *MODEL_PROVIDERS_DICT[\"OpenAI\"][\"inputs\"],\n MultilineInput(\n name=\"system_prompt\",\n display_name=\"Agent Instructions\",\n info=\"System Prompt: Initial instructions and context provided to guide the agent's behavior.\",\n value=\"You are a helpful assistant that can use tools to answer questions and perform tasks.\",\n advanced=False,\n ),\n *LCToolsAgentComponent._base_inputs,\n *memory_inputs,\n BoolInput(\n name=\"add_current_date_tool\",\n display_name=\"Current Date\",\n advanced=True,\n info=\"If true, will add a tool to the agent that returns the current date.\",\n value=True,\n ),\n ]\n outputs = [Output(name=\"response\", display_name=\"Response\", method=\"message_response\")]\n\n async def message_response(self) -> Message:\n try:\n # Get LLM model and validate\n llm_model, display_name = self.get_llm()\n if llm_model is None:\n msg = \"No language model selected. Please choose a model to proceed.\"\n raise ValueError(msg)\n self.model_name = get_model_name(llm_model, display_name=display_name)\n\n # Get memory data\n self.chat_history = await self.get_memory_data()\n\n # Add current date tool if enabled\n if self.add_current_date_tool:\n if not isinstance(self.tools, list): # type: ignore[has-type]\n self.tools = []\n current_date_tool = (await CurrentDateComponent(**self.get_base_args()).to_toolkit()).pop(0)\n if not isinstance(current_date_tool, StructuredTool):\n msg = \"CurrentDateComponent must be converted to a StructuredTool\"\n raise TypeError(msg)\n self.tools.append(current_date_tool)\n\n # Validate tools\n if not self.tools:\n msg = \"Tools are required to run the agent. Please add at least one tool.\"\n raise ValueError(msg)\n\n # Set up and run agent\n self.set(\n llm=llm_model,\n tools=self.tools,\n chat_history=self.chat_history,\n input_value=self.input_value,\n system_prompt=self.system_prompt,\n )\n agent = self.create_agent_runnable()\n return await self.run_agent(agent)\n\n except (ValueError, TypeError, KeyError) as e:\n logger.error(f\"{type(e).__name__}: {e!s}\")\n raise\n except ExceptionWithMessageError as e:\n logger.error(f\"ExceptionWithMessageError occurred: {e}\")\n raise\n except Exception as e:\n logger.error(f\"Unexpected error: {e!s}\")\n raise\n\n async def get_memory_data(self):\n memory_kwargs = {\n component_input.name: getattr(self, f\"{component_input.name}\") for component_input in self.memory_inputs\n }\n # filter out empty values\n memory_kwargs = {k: v for k, v in memory_kwargs.items() if v}\n\n return await MemoryComponent(**self.get_base_args()).set(**memory_kwargs).retrieve_messages()\n\n def get_llm(self):\n if not isinstance(self.agent_llm, str):\n return self.agent_llm, None\n\n try:\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if not provider_info:\n msg = f\"Invalid model provider: {self.agent_llm}\"\n raise ValueError(msg)\n\n component_class = provider_info.get(\"component_class\")\n display_name = component_class.display_name\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\", \"\")\n\n return self._build_llm_model(component_class, inputs, prefix), display_name\n\n except Exception as e:\n logger.error(f\"Error building {self.agent_llm} language model: {e!s}\")\n msg = f\"Failed to initialize language model: {e!s}\"\n raise ValueError(msg) from e\n\n def _build_llm_model(self, component, inputs, prefix=\"\"):\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n return component.set(**model_kwargs).build_model()\n\n def set_component_params(self, component):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\")\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n\n return component.set(**model_kwargs)\n return component\n\n def delete_fields(self, build_config: dotdict, fields: dict | list[str]) -> None:\n \"\"\"Delete specified fields from build_config.\"\"\"\n for field in fields:\n build_config.pop(field, None)\n\n def update_input_types(self, build_config: dotdict) -> dotdict:\n \"\"\"Update input types for all fields in build_config.\"\"\"\n for key, value in build_config.items():\n if isinstance(value, dict):\n if value.get(\"input_types\") is None:\n build_config[key][\"input_types\"] = []\n elif hasattr(value, \"input_types\") and value.input_types is None:\n value.input_types = []\n return build_config\n\n async def update_build_config(\n self, build_config: dotdict, field_value: str, field_name: str | None = None\n ) -> dotdict:\n # Iterate over all providers in the MODEL_PROVIDERS_DICT\n # Existing logic for updating build_config\n if field_name in (\"agent_llm\",):\n build_config[\"agent_llm\"][\"value\"] = field_value\n provider_info = MODEL_PROVIDERS_DICT.get(field_value)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call the component class's update_build_config method\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n\n provider_configs: dict[str, tuple[dict, list[dict]]] = {\n provider: (\n MODEL_PROVIDERS_DICT[provider][\"fields\"],\n [\n MODEL_PROVIDERS_DICT[other_provider][\"fields\"]\n for other_provider in MODEL_PROVIDERS_DICT\n if other_provider != provider\n ],\n )\n for provider in MODEL_PROVIDERS_DICT\n }\n if field_value in provider_configs:\n fields_to_add, fields_to_delete = provider_configs[field_value]\n\n # Delete fields from other providers\n for fields in fields_to_delete:\n self.delete_fields(build_config, fields)\n\n # Add provider-specific fields\n if field_value == \"OpenAI\" and not any(field in build_config for field in fields_to_add):\n build_config.update(fields_to_add)\n else:\n build_config.update(fields_to_add)\n # Reset input types for agent_llm\n build_config[\"agent_llm\"][\"input_types\"] = []\n elif field_value == \"Custom\":\n # Delete all provider fields\n self.delete_fields(build_config, ALL_PROVIDER_FIELDS)\n # Update with custom component\n custom_component = DropdownInput(\n name=\"agent_llm\",\n display_name=\"Language Model\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"Custom\",\n real_time_refresh=True,\n input_types=[\"LanguageModel\"],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())]\n + [{\"icon\": \"brain\"}],\n )\n build_config.update({\"agent_llm\": custom_component.to_dict()})\n # Update input types for all fields\n build_config = self.update_input_types(build_config)\n\n # Validate required keys\n default_keys = [\n \"code\",\n \"_type\",\n \"agent_llm\",\n \"tools\",\n \"input_value\",\n \"add_current_date_tool\",\n \"system_prompt\",\n \"agent_description\",\n \"max_iterations\",\n \"handle_parsing_errors\",\n \"verbose\",\n ]\n missing_keys = [key for key in default_keys if key not in build_config]\n if missing_keys:\n msg = f\"Missing required keys in build_config: {missing_keys}\"\n raise ValueError(msg)\n if (\n isinstance(self.agent_llm, str)\n and self.agent_llm in MODEL_PROVIDERS_DICT\n and field_name in MODEL_DYNAMIC_UPDATE_FIELDS\n ):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n component_class = self.set_component_params(component_class)\n prefix = provider_info.get(\"prefix\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call each component class's update_build_config method\n # remove the prefix from the field_name\n if isinstance(field_name, str) and isinstance(prefix, str):\n field_name = field_name.replace(prefix, \"\")\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n return dotdict({k: v.to_dict() if hasattr(v, \"to_dict\") else v for k, v in build_config.items()})\n" - }, - "handle_parsing_errors": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Handle Parse Errors", - "dynamic": false, - "info": "Should the Agent fix errors when reading user input for better processing?", - "list": false, - "list_add_label": "Add More", - "name": "handle_parsing_errors", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "input_value": { - "_input_type": "MessageTextInput", - "advanced": false, - "display_name": "Input", - "dynamic": false, - "info": "The input provided by the user for the agent to process.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "input_value", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "json_mode": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "JSON Mode", - "dynamic": false, - "info": "If True, it will output JSON regardless of passing a schema.", - "list": false, - "list_add_label": "Add More", - "name": "json_mode", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": false - }, - "max_iterations": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Iterations", - "dynamic": false, - "info": "The maximum number of attempts the agent can make to complete its task before it stops.", - "list": false, - "list_add_label": "Add More", - "name": "max_iterations", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 15 - }, - "max_retries": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Retries", - "dynamic": false, - "info": "The maximum number of retries to make when generating.", - "list": false, - "list_add_label": "Add More", - "name": "max_retries", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 5 - }, - "max_tokens": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Tokens", - "dynamic": false, - "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", - "list": false, - "list_add_label": "Add More", - "name": "max_tokens", - "placeholder": "", - "range_spec": { - "max": 128000, - "min": 0, - "step": 0.1, - "step_type": "float" - }, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "memory": { - "_input_type": "HandleInput", - "advanced": true, - "display_name": "External Memory", - "dynamic": false, - "info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.", - "input_types": [ - "Memory" - ], - "list": false, - "list_add_label": "Add More", - "name": "memory", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "model_kwargs": { - "_input_type": "DictInput", - "advanced": true, - "display_name": "Model Kwargs", - "dynamic": false, - "info": "Additional keyword arguments to pass to the model.", - "list": false, - "list_add_label": "Add More", - "name": "model_kwargs", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "type": "dict", - "value": {} - }, - "model_name": { - "_input_type": "DropdownInput", - "advanced": false, - "combobox": true, - "dialog_inputs": {}, - "display_name": "Model Name", - "dynamic": false, - "info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.", - "name": "model_name", - "options": [ - "gpt-4o-mini", - "gpt-4o", - "gpt-4.5-preview", - "gpt-4-turbo", - "gpt-4-turbo-preview", - "gpt-4", - "gpt-3.5-turbo", - "o1" - ], - "options_metadata": [], - "placeholder": "", - "real_time_refresh": false, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "gpt-4o" - }, - "n_messages": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Number of Messages", - "dynamic": false, - "info": "Number of messages to retrieve.", - "list": false, - "list_add_label": "Add More", - "name": "n_messages", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 100 - }, - "openai_api_base": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "OpenAI API Base", - "dynamic": false, - "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "openai_api_base", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "order": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Order", - "dynamic": false, - "info": "Order of the messages.", - "name": "order", - "options": [ - "Ascending", - "Descending" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_metadata": true, - "type": "str", - "value": "Ascending" - }, - "seed": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Seed", - "dynamic": false, - "info": "The seed controls the reproducibility of the job.", - "list": false, - "list_add_label": "Add More", - "name": "seed", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 1 - }, - "sender": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Sender Type", - "dynamic": false, - "info": "Filter by sender type.", - "name": "sender", - "options": [ - "Machine", - "User", - "Machine and User" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "Machine and User" - }, - "sender_name": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Sender Name", - "dynamic": false, - "info": "Filter by sender name.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "sender_name", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "session_id": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Session ID", - "dynamic": false, - "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "session_id", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "system_prompt": { - "_input_type": "MultilineInput", - "advanced": false, - "copy_field": false, - "display_name": "Agent Instructions", - "dynamic": false, - "info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "system_prompt", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "You are a helpful assistant that can use tools to answer questions and perform tasks." - }, - "temperature": { - "_input_type": "SliderInput", - "advanced": true, - "display_name": "Temperature", - "dynamic": false, - "info": "", - "max_label": "", - "max_label_icon": "", - "min_label": "", - "min_label_icon": "", - "name": "temperature", - "placeholder": "", - "range_spec": { - "max": 1, - "min": 0, - "step": 0.01, - "step_type": "float" - }, - "required": false, - "show": true, - "slider_buttons": false, - "slider_buttons_options": [], - "slider_input": false, - "title_case": false, - "tool_mode": false, - "type": "slider", - "value": 0.1 - }, - "template": { - "_input_type": "MultilineInput", - "advanced": true, - "copy_field": false, - "display_name": "Template", - "dynamic": false, - "info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "template", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "{sender_name}: {text}" - }, - "timeout": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Timeout", - "dynamic": false, - "info": "The timeout for requests to OpenAI completion API.", - "list": false, - "list_add_label": "Add More", - "name": "timeout", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 700 - }, - "tools": { - "_input_type": "HandleInput", - "advanced": false, - "display_name": "Tools", - "dynamic": false, - "info": "These are the tools that the agent can use to help with tasks.", - "input_types": [ - "Tool" - ], - "list": true, - "list_add_label": "Add More", - "name": "tools", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "verbose": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Verbose", - "dynamic": false, - "info": "", - "list": false, - "list_add_label": "Add More", - "name": "verbose", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - } - }, - "tool_mode": false - }, - "showNode": true, - "type": "Agent" - }, - "id": "Agent-8k2Yj", - "measured": { - "height": 624, - "width": 320 - }, - "position": { - "x": 1650, - "y": 345 - }, - "selected": false, - "type": "genericNode" - }, - { - "data": { - "id": "ChatInput-sYodl", + "id": "ChatInput-2YUmA", "node": { "base_classes": [ "Message" @@ -1646,7 +863,7 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-sYodl", + "id": "ChatInput-2YUmA", "measured": { "height": 66, "width": 192 @@ -1660,7 +877,7 @@ }, { "data": { - "id": "ChatOutput-IwY9Y", + "id": "ChatOutput-aHj8n", "node": { "base_classes": [ "Message" @@ -1954,7 +1171,7 @@ "showNode": false, "type": "ChatOutput" }, - "id": "ChatOutput-IwY9Y", + "id": "ChatOutput-aHj8n", "measured": { "height": 66, "width": 192 @@ -1965,6 +1182,708 @@ }, "selected": false, "type": "genericNode" + }, + { + "data": { + "id": "Agent-qYZ9W", + "node": { + "base_classes": [ + "Message" + ], + "beta": false, + "category": "agents", + "conditional_paths": [], + "custom_fields": {}, + "description": "Define the agent's instructions, then enter a task to complete using tools.", + "display_name": "Agent", + "documentation": "", + "edited": false, + "field_order": [ + "agent_llm", + "max_tokens", + "model_kwargs", + "json_mode", + "model_name", + "openai_api_base", + "api_key", + "temperature", + "seed", + "max_retries", + "timeout", + "system_prompt", + "tools", + "input_value", + "handle_parsing_errors", + "verbose", + "max_iterations", + "agent_description", + "memory", + "sender", + "sender_name", + "n_messages", + "session_id", + "order", + "template", + "add_current_date_tool" + ], + "frozen": false, + "icon": "bot", + "key": "Agent", + "legacy": false, + "metadata": {}, + "minimized": false, + "output_types": [], + "outputs": [ + { + "allows_loop": false, + "cache": true, + "display_name": "Response", + "method": "message_response", + "name": "response", + "selected": "Message", + "tool_mode": true, + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "score": 1.1732828199964098e-19, + "template": { + "_type": "Component", + "add_current_date_tool": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Current Date", + "dynamic": false, + "info": "If true, will add a tool to the agent that returns the current date.", + "list": false, + "list_add_label": "Add More", + "name": "add_current_date_tool", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "agent_description": { + "_input_type": "MultilineInput", + "advanced": true, + "copy_field": false, + "display_name": "Agent Description [Deprecated]", + "dynamic": false, + "info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "agent_description", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "A helpful assistant with access to the following tools:" + }, + "agent_llm": { + "_input_type": "DropdownInput", + "advanced": false, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Model Provider", + "dynamic": false, + "info": "The provider of the language model that the agent will use to generate responses.", + "input_types": [], + "name": "agent_llm", + "options": [ + "Amazon Bedrock", + "Anthropic", + "Azure OpenAI", + "Google Generative AI", + "Groq", + "NVIDIA", + "OpenAI", + "SambaNova", + "Custom" + ], + "options_metadata": [ + { + "icon": "Amazon" + }, + { + "icon": "Anthropic" + }, + { + "icon": "Azure" + }, + { + "icon": "GoogleGenerativeAI" + }, + { + "icon": "Groq" + }, + { + "icon": "NVIDIA" + }, + { + "icon": "OpenAI" + }, + { + "icon": "SambaNova" + }, + { + "icon": "brain" + } + ], + "placeholder": "", + "real_time_refresh": true, + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "OpenAI" + }, + "api_key": { + "_input_type": "SecretStrInput", + "advanced": false, + "display_name": "OpenAI API Key", + "dynamic": false, + "info": "The OpenAI API Key to use for the OpenAI model.", + "input_types": [], + "load_from_db": true, + "name": "api_key", + "password": true, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "str", + "value": "OPENAI_API_KEY" + }, + "code": { + "advanced": true, + "dynamic": true, + "fileTypes": [], + "file_path": "", + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "code", + "password": false, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "code", + "value": "from langchain_core.tools import StructuredTool\n\nfrom langflow.base.agents.agent import LCToolsAgentComponent\nfrom langflow.base.agents.events import ExceptionWithMessageError\nfrom langflow.base.models.model_input_constants import (\n ALL_PROVIDER_FIELDS,\n MODEL_DYNAMIC_UPDATE_FIELDS,\n MODEL_PROVIDERS_DICT,\n MODELS_METADATA,\n)\nfrom langflow.base.models.model_utils import get_model_name\nfrom langflow.components.helpers import CurrentDateComponent\nfrom langflow.components.helpers.memory import MemoryComponent\nfrom langflow.components.langchain_utilities.tool_calling import ToolCallingAgentComponent\nfrom langflow.custom.utils import update_component_build_config\nfrom langflow.io import BoolInput, DropdownInput, MultilineInput, Output\nfrom langflow.logging import logger\nfrom langflow.schema.dotdict import dotdict\nfrom langflow.schema.message import Message\n\n\ndef set_advanced_true(component_input):\n component_input.advanced = True\n return component_input\n\n\nclass AgentComponent(ToolCallingAgentComponent):\n display_name: str = \"Agent\"\n description: str = \"Define the agent's instructions, then enter a task to complete using tools.\"\n icon = \"bot\"\n beta = False\n name = \"Agent\"\n\n memory_inputs = [set_advanced_true(component_input) for component_input in MemoryComponent().inputs]\n\n inputs = [\n DropdownInput(\n name=\"agent_llm\",\n display_name=\"Model Provider\",\n info=\"The provider of the language model that the agent will use to generate responses.\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"OpenAI\",\n real_time_refresh=True,\n input_types=[],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())] + [{\"icon\": \"brain\"}],\n ),\n *MODEL_PROVIDERS_DICT[\"OpenAI\"][\"inputs\"],\n MultilineInput(\n name=\"system_prompt\",\n display_name=\"Agent Instructions\",\n info=\"System Prompt: Initial instructions and context provided to guide the agent's behavior.\",\n value=\"You are a helpful assistant that can use tools to answer questions and perform tasks.\",\n advanced=False,\n ),\n *LCToolsAgentComponent._base_inputs,\n *memory_inputs,\n BoolInput(\n name=\"add_current_date_tool\",\n display_name=\"Current Date\",\n advanced=True,\n info=\"If true, will add a tool to the agent that returns the current date.\",\n value=True,\n ),\n ]\n outputs = [Output(name=\"response\", display_name=\"Response\", method=\"message_response\")]\n\n async def message_response(self) -> Message:\n try:\n # Get LLM model and validate\n llm_model, display_name = self.get_llm()\n if llm_model is None:\n msg = \"No language model selected. Please choose a model to proceed.\"\n raise ValueError(msg)\n self.model_name = get_model_name(llm_model, display_name=display_name)\n\n # Get memory data\n self.chat_history = await self.get_memory_data()\n\n # Add current date tool if enabled\n if self.add_current_date_tool:\n if not isinstance(self.tools, list): # type: ignore[has-type]\n self.tools = []\n current_date_tool = (await CurrentDateComponent(**self.get_base_args()).to_toolkit()).pop(0)\n if not isinstance(current_date_tool, StructuredTool):\n msg = \"CurrentDateComponent must be converted to a StructuredTool\"\n raise TypeError(msg)\n self.tools.append(current_date_tool)\n\n # Validate tools\n if not self.tools:\n msg = \"Tools are required to run the agent. Please add at least one tool.\"\n raise ValueError(msg)\n\n # Set up and run agent\n self.set(\n llm=llm_model,\n tools=self.tools,\n chat_history=self.chat_history,\n input_value=self.input_value,\n system_prompt=self.system_prompt,\n )\n agent = self.create_agent_runnable()\n return await self.run_agent(agent)\n\n except (ValueError, TypeError, KeyError) as e:\n logger.error(f\"{type(e).__name__}: {e!s}\")\n raise\n except ExceptionWithMessageError as e:\n logger.error(f\"ExceptionWithMessageError occurred: {e}\")\n raise\n except Exception as e:\n logger.error(f\"Unexpected error: {e!s}\")\n raise\n\n async def get_memory_data(self):\n memory_kwargs = {\n component_input.name: getattr(self, f\"{component_input.name}\") for component_input in self.memory_inputs\n }\n # filter out empty values\n memory_kwargs = {k: v for k, v in memory_kwargs.items() if v}\n\n return await MemoryComponent(**self.get_base_args()).set(**memory_kwargs).retrieve_messages()\n\n def get_llm(self):\n if not isinstance(self.agent_llm, str):\n return self.agent_llm, None\n\n try:\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if not provider_info:\n msg = f\"Invalid model provider: {self.agent_llm}\"\n raise ValueError(msg)\n\n component_class = provider_info.get(\"component_class\")\n display_name = component_class.display_name\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\", \"\")\n\n return self._build_llm_model(component_class, inputs, prefix), display_name\n\n except Exception as e:\n logger.error(f\"Error building {self.agent_llm} language model: {e!s}\")\n msg = f\"Failed to initialize language model: {e!s}\"\n raise ValueError(msg) from e\n\n def _build_llm_model(self, component, inputs, prefix=\"\"):\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n return component.set(**model_kwargs).build_model()\n\n def set_component_params(self, component):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n inputs = provider_info.get(\"inputs\")\n prefix = provider_info.get(\"prefix\")\n model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n\n return component.set(**model_kwargs)\n return component\n\n def delete_fields(self, build_config: dotdict, fields: dict | list[str]) -> None:\n \"\"\"Delete specified fields from build_config.\"\"\"\n for field in fields:\n build_config.pop(field, None)\n\n def update_input_types(self, build_config: dotdict) -> dotdict:\n \"\"\"Update input types for all fields in build_config.\"\"\"\n for key, value in build_config.items():\n if isinstance(value, dict):\n if value.get(\"input_types\") is None:\n build_config[key][\"input_types\"] = []\n elif hasattr(value, \"input_types\") and value.input_types is None:\n value.input_types = []\n return build_config\n\n async def update_build_config(\n self, build_config: dotdict, field_value: str, field_name: str | None = None\n ) -> dotdict:\n # Iterate over all providers in the MODEL_PROVIDERS_DICT\n # Existing logic for updating build_config\n if field_name in (\"agent_llm\",):\n build_config[\"agent_llm\"][\"value\"] = field_value\n provider_info = MODEL_PROVIDERS_DICT.get(field_value)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call the component class's update_build_config method\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n\n provider_configs: dict[str, tuple[dict, list[dict]]] = {\n provider: (\n MODEL_PROVIDERS_DICT[provider][\"fields\"],\n [\n MODEL_PROVIDERS_DICT[other_provider][\"fields\"]\n for other_provider in MODEL_PROVIDERS_DICT\n if other_provider != provider\n ],\n )\n for provider in MODEL_PROVIDERS_DICT\n }\n if field_value in provider_configs:\n fields_to_add, fields_to_delete = provider_configs[field_value]\n\n # Delete fields from other providers\n for fields in fields_to_delete:\n self.delete_fields(build_config, fields)\n\n # Add provider-specific fields\n if field_value == \"OpenAI\" and not any(field in build_config for field in fields_to_add):\n build_config.update(fields_to_add)\n else:\n build_config.update(fields_to_add)\n # Reset input types for agent_llm\n build_config[\"agent_llm\"][\"input_types\"] = []\n elif field_value == \"Custom\":\n # Delete all provider fields\n self.delete_fields(build_config, ALL_PROVIDER_FIELDS)\n # Update with custom component\n custom_component = DropdownInput(\n name=\"agent_llm\",\n display_name=\"Language Model\",\n options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n value=\"Custom\",\n real_time_refresh=True,\n input_types=[\"LanguageModel\"],\n options_metadata=[MODELS_METADATA[key] for key in sorted(MODELS_METADATA.keys())]\n + [{\"icon\": \"brain\"}],\n )\n build_config.update({\"agent_llm\": custom_component.to_dict()})\n # Update input types for all fields\n build_config = self.update_input_types(build_config)\n\n # Validate required keys\n default_keys = [\n \"code\",\n \"_type\",\n \"agent_llm\",\n \"tools\",\n \"input_value\",\n \"add_current_date_tool\",\n \"system_prompt\",\n \"agent_description\",\n \"max_iterations\",\n \"handle_parsing_errors\",\n \"verbose\",\n ]\n missing_keys = [key for key in default_keys if key not in build_config]\n if missing_keys:\n msg = f\"Missing required keys in build_config: {missing_keys}\"\n raise ValueError(msg)\n if (\n isinstance(self.agent_llm, str)\n and self.agent_llm in MODEL_PROVIDERS_DICT\n and field_name in MODEL_DYNAMIC_UPDATE_FIELDS\n ):\n provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n if provider_info:\n component_class = provider_info.get(\"component_class\")\n component_class = self.set_component_params(component_class)\n prefix = provider_info.get(\"prefix\")\n if component_class and hasattr(component_class, \"update_build_config\"):\n # Call each component class's update_build_config method\n # remove the prefix from the field_name\n if isinstance(field_name, str) and isinstance(prefix, str):\n field_name = field_name.replace(prefix, \"\")\n build_config = await update_component_build_config(\n component_class, build_config, field_value, \"model_name\"\n )\n return dotdict({k: v.to_dict() if hasattr(v, \"to_dict\") else v for k, v in build_config.items()})\n" + }, + "handle_parsing_errors": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Handle Parse Errors", + "dynamic": false, + "info": "Should the Agent fix errors when reading user input for better processing?", + "list": false, + "list_add_label": "Add More", + "name": "handle_parsing_errors", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "input_value": { + "_input_type": "MessageTextInput", + "advanced": false, + "display_name": "Input", + "dynamic": false, + "info": "The input provided by the user for the agent to process.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "input_value", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": true, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "json_mode": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "JSON Mode", + "dynamic": false, + "info": "If True, it will output JSON regardless of passing a schema.", + "list": false, + "list_add_label": "Add More", + "name": "json_mode", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": false + }, + "max_iterations": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Iterations", + "dynamic": false, + "info": "The maximum number of attempts the agent can make to complete its task before it stops.", + "list": false, + "list_add_label": "Add More", + "name": "max_iterations", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 15 + }, + "max_retries": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Retries", + "dynamic": false, + "info": "The maximum number of retries to make when generating.", + "list": false, + "list_add_label": "Add More", + "name": "max_retries", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, + "max_tokens": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Tokens", + "dynamic": false, + "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", + "list": false, + "list_add_label": "Add More", + "name": "max_tokens", + "placeholder": "", + "range_spec": { + "max": 128000, + "min": 0, + "step": 0.1, + "step_type": "float" + }, + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": "" + }, + "memory": { + "_input_type": "HandleInput", + "advanced": true, + "display_name": "External Memory", + "dynamic": false, + "info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.", + "input_types": [ + "Memory" + ], + "list": false, + "list_add_label": "Add More", + "name": "memory", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "other", + "value": "" + }, + "model_kwargs": { + "_input_type": "DictInput", + "advanced": true, + "display_name": "Model Kwargs", + "dynamic": false, + "info": "Additional keyword arguments to pass to the model.", + "list": false, + "list_add_label": "Add More", + "name": "model_kwargs", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "type": "dict", + "value": {} + }, + "model_name": { + "_input_type": "DropdownInput", + "advanced": false, + "combobox": true, + "dialog_inputs": {}, + "display_name": "Model Name", + "dynamic": false, + "info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.", + "name": "model_name", + "options": [ + "gpt-4o-mini", + "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-4.5-preview", + "gpt-4-turbo", + "gpt-4-turbo-preview", + "gpt-4", + "gpt-3.5-turbo", + "o1" + ], + "options_metadata": [], + "placeholder": "", + "real_time_refresh": false, + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "gpt-4.1" + }, + "n_messages": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Number of Messages", + "dynamic": false, + "info": "Number of messages to retrieve.", + "list": false, + "list_add_label": "Add More", + "name": "n_messages", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 100 + }, + "openai_api_base": { + "_input_type": "StrInput", + "advanced": true, + "display_name": "OpenAI API Base", + "dynamic": false, + "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "openai_api_base", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "order": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Order", + "dynamic": false, + "info": "Order of the messages.", + "name": "order", + "options": [ + "Ascending", + "Descending" + ], + "options_metadata": [], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": true, + "trace_as_metadata": true, + "type": "str", + "value": "Ascending" + }, + "seed": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Seed", + "dynamic": false, + "info": "The seed controls the reproducibility of the job.", + "list": false, + "list_add_label": "Add More", + "name": "seed", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 1 + }, + "sender": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Sender Type", + "dynamic": false, + "info": "Filter by sender type.", + "name": "sender", + "options": [ + "Machine", + "User", + "Machine and User" + ], + "options_metadata": [], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "toggle": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "Machine and User" + }, + "sender_name": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Sender Name", + "dynamic": false, + "info": "Filter by sender name.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "sender_name", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "session_id": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Session ID", + "dynamic": false, + "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "session_id", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "system_prompt": { + "_input_type": "MultilineInput", + "advanced": false, + "copy_field": false, + "display_name": "Agent Instructions", + "dynamic": false, + "info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "system_prompt", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "You are a helpful assistant that can use tools to answer questions and perform tasks." + }, + "temperature": { + "_input_type": "SliderInput", + "advanced": true, + "display_name": "Temperature", + "dynamic": false, + "info": "", + "max_label": "", + "max_label_icon": "", + "min_label": "", + "min_label_icon": "", + "name": "temperature", + "placeholder": "", + "range_spec": { + "max": 1, + "min": 0, + "step": 0.01, + "step_type": "float" + }, + "required": false, + "show": true, + "slider_buttons": false, + "slider_buttons_options": [], + "slider_input": false, + "title_case": false, + "tool_mode": false, + "type": "slider", + "value": 0.1 + }, + "template": { + "_input_type": "MultilineInput", + "advanced": true, + "copy_field": false, + "display_name": "Template", + "dynamic": false, + "info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "template", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "{sender_name}: {text}" + }, + "timeout": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Timeout", + "dynamic": false, + "info": "The timeout for requests to OpenAI completion API.", + "list": false, + "list_add_label": "Add More", + "name": "timeout", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 700 + }, + "tools": { + "_input_type": "HandleInput", + "advanced": false, + "display_name": "Tools", + "dynamic": false, + "info": "These are the tools that the agent can use to help with tasks.", + "input_types": [ + "Tool" + ], + "list": true, + "list_add_label": "Add More", + "name": "tools", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "other", + "value": "" + }, + "verbose": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Verbose", + "dynamic": false, + "info": "", + "list": false, + "list_add_label": "Add More", + "name": "verbose", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + } + }, + "tool_mode": false + }, + "showNode": true, + "type": "Agent" + }, + "dragging": false, + "id": "Agent-qYZ9W", + "measured": { + "height": 624, + "width": 320 + }, + "position": { + "x": 1641.6239626366948, + "y": 301.10345101561927 + }, + "selected": true, + "type": "genericNode" } ], "viewport": { @@ -1975,9 +1894,9 @@ }, "description": "A simple but powerful starter agent.", "endpoint_name": null, - "id": "1c666167-9a1f-47e2-a377-eacb2cbbc364", + "id": "85e419cd-33e0-43b7-b5ab-cac101c578f6", "is_component": false, - "last_tested_version": "1.2.0", + "last_tested_version": "1.3.4", "name": "Simple Agent", "tags": [ "assistants", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json b/src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json index 3deb28561..fed5bd6ad 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Social Media Agent.json @@ -1429,9 +1429,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -1629,11 +1627,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -1644,7 +1646,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json b/src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json index 37a01513c..63283d4a6 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Text Sentiment Analysis.json @@ -1084,7 +1084,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -1468,7 +1468,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -1981,7 +1981,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json b/src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json index 1929a1d8e..ec510f736 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Travel Planning Agents.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "SearchComponent", - "id": "SearchComponent-x6LSs", + "id": "SearchComponent-kgsWf", "name": "component_as_tool", "output_types": [ "Tool" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-uVdQJ", + "id": "Agent-H916j", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "xy-edge__SearchComponent-x6LSs{œdataTypeœ:œSearchComponentœ,œidœ:œSearchComponent-x6LSsœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-uVdQJ{œfieldNameœ:œtoolsœ,œidœ:œAgent-uVdQJœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-SearchComponent-kgsWf{œdataTypeœ:œSearchComponentœ,œidœ:œSearchComponent-kgsWfœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-H916j{œfieldNameœ:œtoolsœ,œidœ:œAgent-H916jœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "SearchComponent-x6LSs", - "sourceHandle": "{œdataTypeœ: œSearchComponentœ, œidœ: œSearchComponent-x6LSsœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-uVdQJ", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-uVdQJœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "SearchComponent-kgsWf", + "sourceHandle": "{œdataTypeœ: œSearchComponentœ, œidœ: œSearchComponent-kgsWfœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-H916j", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-H916jœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-AJeqr", + "id": "ChatInput-6dlgJ", "name": "message", "output_types": [ "Message" @@ -43,47 +43,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-uVdQJ", + "id": "Agent-H916j", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "xy-edge__ChatInput-AJeqr{œdataTypeœ:œChatInputœ,œidœ:œChatInput-AJeqrœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-uVdQJ{œfieldNameœ:œinput_valueœ,œidœ:œAgent-uVdQJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-6dlgJ{œdataTypeœ:œChatInputœ,œidœ:œChatInput-6dlgJœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-H916j{œfieldNameœ:œinput_valueœ,œidœ:œAgent-H916jœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-AJeqr", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-AJeqrœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-uVdQJ", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-uVdQJœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "URL", - "id": "URL-uqJt8", - "name": "component_as_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-XdRAi", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "xy-edge__URL-uqJt8{œdataTypeœ:œURLœ,œidœ:œURL-uqJt8œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XdRAi{œfieldNameœ:œtoolsœ,œidœ:œAgent-XdRAiœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "selected": false, - "source": "URL-uqJt8", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-uqJt8œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-XdRAi", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-XdRAiœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "ChatInput-6dlgJ", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-6dlgJœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-H916j", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-H916jœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -91,7 +63,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-uVdQJ", + "id": "Agent-H916j", "name": "response", "output_types": [ "Message" @@ -99,47 +71,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-XdRAi", + "id": "Agent-zFKST", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "xy-edge__Agent-uVdQJ{œdataTypeœ:œAgentœ,œidœ:œAgent-uVdQJœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-XdRAi{œfieldNameœ:œinput_valueœ,œidœ:œAgent-XdRAiœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-H916j{œdataTypeœ:œAgentœ,œidœ:œAgent-H916jœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-zFKST{œfieldNameœ:œinput_valueœ,œidœ:œAgent-zFKSTœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-uVdQJ", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-uVdQJœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-XdRAi", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-XdRAiœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "CalculatorComponent", - "id": "CalculatorComponent-nykGf", - "name": "component_as_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-ZvLnB", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "xy-edge__CalculatorComponent-nykGf{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-nykGfœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-ZvLnB{œfieldNameœ:œtoolsœ,œidœ:œAgent-ZvLnBœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "selected": false, - "source": "CalculatorComponent-nykGf", - "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-nykGfœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-ZvLnB", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-ZvLnBœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "Agent-H916j", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-H916jœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-zFKST", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-zFKSTœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -147,7 +91,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-XdRAi", + "id": "Agent-zFKST", "name": "response", "output_types": [ "Message" @@ -155,19 +99,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-ZvLnB", + "id": "Agent-3tuWs", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "xy-edge__Agent-XdRAi{œdataTypeœ:œAgentœ,œidœ:œAgent-XdRAiœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-ZvLnB{œfieldNameœ:œinput_valueœ,œidœ:œAgent-ZvLnBœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-zFKST{œdataTypeœ:œAgentœ,œidœ:œAgent-zFKSTœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-3tuWs{œfieldNameœ:œinput_valueœ,œidœ:œAgent-3tuWsœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-XdRAi", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-XdRAiœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-ZvLnB", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-ZvLnBœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Agent-zFKST", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-zFKSTœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-3tuWs", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-3tuWsœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -175,7 +119,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-ZvLnB", + "id": "Agent-3tuWs", "name": "response", "output_types": [ "Message" @@ -183,7 +127,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-HHJAW", + "id": "ChatOutput-n7Oik", "inputTypes": [ "Data", "DataFrame", @@ -192,18 +136,72 @@ "type": "str" } }, - "id": "xy-edge__Agent-ZvLnB{œdataTypeœ:œAgentœ,œidœ:œAgent-ZvLnBœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-HHJAW{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-HHJAWœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-3tuWs{œdataTypeœ:œAgentœ,œidœ:œAgent-3tuWsœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-n7Oik{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-n7Oikœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-ZvLnB", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-ZvLnBœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-HHJAW", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-HHJAWœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "Agent-3tuWs", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-3tuWsœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-n7Oik", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-n7Oikœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "URL", + "id": "URL-4LSRv", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-zFKST", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__URL-4LSRv{œdataTypeœ:œURLœ,œidœ:œURL-4LSRvœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-zFKST{œfieldNameœ:œtoolsœ,œidœ:œAgent-zFKSTœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "URL-4LSRv", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-4LSRvœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-zFKST", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-zFKSTœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "CalculatorComponent", + "id": "CalculatorComponent-hlWP4", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-3tuWs", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__CalculatorComponent-hlWP4{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-hlWP4œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-3tuWs{œfieldNameœ:œtoolsœ,œidœ:œAgent-3tuWsœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "CalculatorComponent-hlWP4", + "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-hlWP4œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-3tuWs", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-3tuWsœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" } ], "nodes": [ { "data": { - "id": "ChatInput-AJeqr", + "id": "ChatInput-6dlgJ", "node": { "base_classes": [ "Message" @@ -475,10 +473,10 @@ }, "dragging": false, "height": 262, - "id": "ChatInput-AJeqr", + "id": "ChatInput-6dlgJ", "measured": { "height": 262, - "width": 360 + "width": 320 }, "position": { "x": 1731.3224944651397, @@ -496,7 +494,7 @@ "data": { "description": "Display a chat message in the Playground.", "display_name": "Chat Output", - "id": "ChatOutput-HHJAW", + "id": "ChatOutput-n7Oik", "node": { "base_classes": [ "Message" @@ -778,10 +776,10 @@ }, "dragging": false, "height": 262, - "id": "ChatOutput-HHJAW", + "id": "ChatOutput-n7Oik", "measured": { "height": 262, - "width": 360 + "width": 320 }, "position": { "x": 4349.229697347143, @@ -797,7 +795,7 @@ }, { "data": { - "id": "note-MybTk", + "id": "note-NwG3w", "node": { "description": "# Travel Planning Agents \n\nThe travel planning system is a smart setup that uses several specialized \"agents\" to help plan incredible trips. Imagine each agent as a travel expert focusing on a part of your journey. Here's how it works:\n\n- **User-Friendly Start:** You start by telling the system about your travel needs—where you want to go and what you love to do.\n\n- **Data Collection:** The agents uses its tools to gather current info about various destinations, like the best travel times, weather, and costs.\n\n- **Three Key Agents:**\n - **City Selection Agent:** Picks the best places to visit based on your likes and current data.\n - **Local Expert Agent:** Gathers interesting details about what to do and see in the chosen city.\n - **Travel Concierge Agent:** Builds a day-by-day plan that includes where to stay, eat, and explore!\n\n- **Tools and Data:** Each agent uses tools to find and organize the latest information so you get recommendations that are both accurate and exciting.\n\n- **Final Plan:** Once everything is put together, you receive a complete, easy-to-follow travel itinerary, perfect for your adventure!\n", "display_name": "", @@ -808,10 +806,10 @@ }, "dragging": false, "height": 603, - "id": "note-MybTk", + "id": "note-NwG3w", "measured": { "height": 603, - "width": 328 + "width": 325 }, "position": { "x": 1319.2860379588103, @@ -832,7 +830,7 @@ }, { "data": { - "id": "note-bnshz", + "id": "note-zaSgy", "node": { "description": "# **City Selection Agent**\n - **Purpose:** This agent evaluates potential travel destinations based on user input and external data sources.\n - **Core Functions:** Analyzes factors such as weather, local events, and travel costs to recommend optimal cities.\n - **Tools Utilized:** Employs APIs and data-fetching tools to gather real-time information for decision-making.\n", "display_name": "", @@ -845,10 +843,10 @@ }, "dragging": false, "height": 334, - "id": "note-bnshz", + "id": "note-zaSgy", "measured": { "height": 334, - "width": 328 + "width": 325 }, "position": { "x": 2112.2352264274264, @@ -869,7 +867,7 @@ }, { "data": { - "id": "note-sOjBg", + "id": "note-imuMP", "node": { "description": "# **Local Expert Agent**\n - **Purpose:** Focused on gathering and providing an in-depth guide to the selected city.\n - **Core Functions:** Compiles insights into cultural attractions, local customs, and unique experiences.\n - **Tools Utilized:** Uses web content fetchers and data APIs to collect detailed local insights and enhance the user understanding with hidden gems.\n", "display_name": "", @@ -882,10 +880,10 @@ }, "dragging": false, "height": 342, - "id": "note-sOjBg", + "id": "note-imuMP", "measured": { "height": 342, - "width": 328 + "width": 325 }, "position": { "x": 2827.660803823376, @@ -906,7 +904,7 @@ }, { "data": { - "id": "note-2B81k", + "id": "note-KFInF", "node": { "description": "# **Travel Concierge Agent**\n - **Purpose:** Crafts detailed travel itineraries that are customized to the traveler's interests and needs.\n - **Core Functions:** Offers a comprehensive daily schedule, including accommodations, dining spots, and activities.\n - **Tools Utilized:** Integrates calculators and data tools for accurate budget planning and itinerary logistics.", "display_name": "", @@ -919,10 +917,10 @@ }, "dragging": false, "height": 336, - "id": "note-2B81k", + "id": "note-KFInF", "measured": { "height": 336, - "width": 328 + "width": 325 }, "position": { "x": 3536.084279543714, @@ -943,7 +941,7 @@ }, { "data": { - "id": "note-Ndgi9", + "id": "note-b1zMq", "node": { "description": "## Configure the agent by obtaining your OpenAI API key from [platform.openai.com](https://platform.openai.com). Under \"Model Provider\", choose:\n- OpenAI: Default, requires only API key\n- Anthropic/Azure/Groq/NVIDIA: Each requires their own API keys\n- Custom: Use your own model endpoint + authentication\n\nSelect model and input API key before running the flow.", "display_name": "", @@ -956,10 +954,10 @@ }, "dragging": false, "height": 324, - "id": "note-Ndgi9", + "id": "note-b1zMq", "measured": { "height": 324, - "width": 328 + "width": 325 }, "position": { "x": 2463.3881993480218, @@ -978,7 +976,7 @@ "data": { "description": "Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", "display_name": "URL", - "id": "URL-uqJt8", + "id": "URL-4LSRv", "node": { "base_classes": [ "Data", @@ -1010,9 +1008,10 @@ "allows_loop": false, "cache": true, "display_name": "Toolset", - "hidden": null, + "hidden": false, "method": "to_toolkit", "name": "component_as_tool", + "options": null, "required_inputs": null, "selected": "Tool", "tool_mode": true, @@ -1106,11 +1105,11 @@ "value": "langflow" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1118,94 +1117,72 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content", + "name": "fetch_content", + "status": true, "tags": [ - "URL-fetch_content" + "fetch_content" ] }, { - "description": "fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-fetch_content_text", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. fetch_content_text() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "fetch_content_text", + "name": "fetch_content_text", + "status": true, "tags": [ - "URL-fetch_content_text" + "fetch_content_text" ] }, { - "description": "as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", - "name": "URL-as_dataframe", + "args": { + "urls": { + "default": "", + "description": "", + "items": { + "type": "string" + }, + "title": "Urls", + "type": "array" + } + }, + "description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_description": "URL. as_dataframe() - Load and retrieve data from specified URLs. Supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs.", + "display_name": "as_dataframe", + "name": "as_dataframe", + "status": true, "tags": [ - "URL-as_dataframe" + "as_dataframe" ] } ] @@ -1240,10 +1217,10 @@ "type": "URL" }, "dragging": false, - "id": "URL-uqJt8", + "id": "URL-4LSRv", "measured": { - "height": 660, - "width": 360 + "height": 523, + "width": 320 }, "position": { "x": 2815.5187953791974, @@ -1254,7 +1231,7 @@ }, { "data": { - "id": "CalculatorComponent-nykGf", + "id": "CalculatorComponent-hlWP4", "node": { "base_classes": [ "Data" @@ -1283,11 +1260,13 @@ "allows_loop": false, "cache": true, "display_name": "Toolset", - "hidden": null, + "hidden": false, "method": "to_toolkit", "name": "component_as_tool", + "options": null, "required_inputs": null, "selected": "Tool", + "tool_mode": true, "types": [ "Tool" ], @@ -1340,11 +1319,11 @@ "value": "" }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1352,74 +1331,27 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "name": "name", - "sortable": false, - "type": "text" - }, - { - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "name": "description", - "sortable": false, - "type": "text" - }, - { - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "name": "tags", - "sortable": false, - "type": "text" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.", - "name": "CalculatorComponent-evaluate_expression", + "args": { + "expression": { + "default": "", + "description": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').", + "title": "Expression", + "type": "string" + } + }, + "description": "CalculatorComponent. evaluate_expression() - Perform basic arithmetic operations on a given expression.", + "display_description": "CalculatorComponent. evaluate_expression() - Perform basic arithmetic operations on a given expression.", + "display_name": "evaluate_expression", + "name": "evaluate_expression", + "status": true, "tags": [ - "CalculatorComponent-evaluate_expression" + "evaluate_expression" ] } ] @@ -1431,10 +1363,10 @@ "type": "CalculatorComponent" }, "dragging": false, - "id": "CalculatorComponent-nykGf", + "id": "CalculatorComponent-hlWP4", "measured": { - "height": 374, - "width": 360 + "height": 248, + "width": 320 }, "position": { "x": 3540.356346381247, @@ -1447,7 +1379,7 @@ "data": { "description": "Call the searchapi.io API with result limiting", "display_name": "Search API", - "id": "SearchComponent-x6LSs", + "id": "SearchComponent-kgsWf", "node": { "base_classes": [ "Data", @@ -1638,11 +1570,11 @@ "value": {} }, "tools_metadata": { - "_input_type": "TableInput", + "_input_type": "ToolsInput", "advanced": false, - "display_name": "Edit tools", + "display_name": "Actions", "dynamic": false, - "info": "", + "info": "Modify tool names and descriptions to help agents understand when to use each tool.", "is_list": true, "list_add_label": "Add More", "name": "tools_metadata", @@ -1650,110 +1582,42 @@ "real_time_refresh": true, "required": false, "show": true, - "table_icon": "Hammer", - "table_options": { - "block_add": true, - "block_delete": true, - "block_edit": true, - "block_filter": true, - "block_hide": true, - "block_select": true, - "block_sort": true, - "description": "Modify tool names and descriptions to help agents understand when to use each tool.", - "field_parsers": { - "commands": "commands", - "name": [ - "snake_case", - "no_blank" - ] - }, - "hide_options": true - }, - "table_schema": { - "columns": [ - { - "default": "None", - "description": "Specify the name of the tool.", - "disable_edit": false, - "display_name": "Tool Name", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "name", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "Describe the purpose of the tool.", - "disable_edit": false, - "display_name": "Tool Description", - "edit_mode": "popover", - "filterable": false, - "formatter": "text", - "hidden": false, - "name": "description", - "sortable": false, - "type": "str" - }, - { - "default": "None", - "description": "The default identifiers for the tools and cannot be changed.", - "disable_edit": true, - "display_name": "Tool Identifiers", - "edit_mode": "inline", - "filterable": false, - "formatter": "text", - "hidden": true, - "name": "tags", - "sortable": false, - "type": "str" - }, - { - "default": true, - "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", - "disable_edit": false, - "display_name": "Enable", - "edit_mode": "popover", - "filterable": true, - "formatter": "boolean", - "hidden": false, - "name": "status", - "sortable": true, - "type": "boolean" - } - ] - }, "title_case": false, "tool_mode": false, "trace_as_metadata": true, - "trigger_icon": "Hammer", - "trigger_text": "", - "type": "table", + "type": "tools", "value": [ { - "description": "fetch_content(api_key: Message) - Call the searchapi.io API with result limiting", - "name": "SearchComponent-fetch_content", + "args": {}, + "description": "SearchComponent. fetch_content(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_description": "SearchComponent. fetch_content(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_name": "fetch_content", + "name": "fetch_content", "status": true, "tags": [ - "SearchComponent-fetch_content" + "fetch_content" ] }, { - "description": "fetch_content_text(api_key: Message) - Call the searchapi.io API with result limiting", - "name": "SearchComponent-fetch_content_text", + "args": {}, + "description": "SearchComponent. fetch_content_text(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_description": "SearchComponent. fetch_content_text(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_name": "fetch_content_text", + "name": "fetch_content_text", "status": true, "tags": [ - "SearchComponent-fetch_content_text" + "fetch_content_text" ] }, { - "description": "as_dataframe(api_key: Message) - Call the searchapi.io API with result limiting", - "name": "SearchComponent-as_dataframe", + "args": {}, + "description": "SearchComponent. as_dataframe(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_description": "SearchComponent. as_dataframe(SearchComponent. api_key: FieldTypes.TEXT) - Call the searchapi.io API with result limiting", + "display_name": "as_dataframe", + "name": "as_dataframe", "status": true, "tags": [ - "SearchComponent-as_dataframe" + "as_dataframe" ] } ] @@ -1765,10 +1629,10 @@ "type": "SearchComponent" }, "dragging": false, - "id": "SearchComponent-x6LSs", + "id": "SearchComponent-kgsWf", "measured": { - "height": 536, - "width": 360 + "height": 421, + "width": 320 }, "position": { "x": 2089.0393126914205, @@ -1779,7 +1643,7 @@ }, { "data": { - "id": "Agent-uVdQJ", + "id": "Agent-H916j", "node": { "base_classes": [ "Message" @@ -1956,9 +1820,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -2156,11 +2018,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -2171,7 +2037,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", @@ -2462,10 +2328,10 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-uVdQJ", + "id": "Agent-H916j", "measured": { - "height": 698, - "width": 360 + "height": 624, + "width": 320 }, "position": { "x": 2462.5131863965653, @@ -2476,7 +2342,7 @@ }, { "data": { - "id": "Agent-XdRAi", + "id": "Agent-zFKST", "node": { "base_classes": [ "Message" @@ -2653,9 +2519,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -2853,11 +2717,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -2868,7 +2736,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", @@ -3159,10 +3027,10 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-XdRAi", + "id": "Agent-zFKST", "measured": { - "height": 698, - "width": 360 + "height": 624, + "width": 320 }, "position": { "x": 3168.5639981397626, @@ -3173,7 +3041,7 @@ }, { "data": { - "id": "Agent-ZvLnB", + "id": "Agent-3tuWs", "node": { "base_classes": [ "Message" @@ -3350,9 +3218,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -3550,11 +3416,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -3565,7 +3435,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o" + "value": "gpt-4.1" }, "n_messages": { "_input_type": "IntInput", @@ -3856,30 +3726,30 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-ZvLnB", + "id": "Agent-3tuWs", "measured": { - "height": 698, - "width": 360 + "height": 624, + "width": 320 }, "position": { "x": 3936.123532016018, "y": 356.3534774464019 }, - "selected": false, + "selected": true, "type": "genericNode" } ], "viewport": { - "x": -473.30523608095336, - "y": 108.76117467654905, - "zoom": 0.41164535038506667 + "x": -750.9105189752929, + "y": 96.67627127061348, + "zoom": 0.44896152055995414 } }, "description": "Create a travel planning chatbot that uses specialized agents to craft personalized trip itineraries.", "endpoint_name": null, - "id": "bb57ce7a-13e0-40c0-9e7a-7783fd6f32e8", + "id": "0148d85f-5339-4ba1-ae38-54b504c0223d", "is_component": false, - "last_tested_version": "1.2.0", + "last_tested_version": "1.3.4", "name": "Travel Planning Agents", "tags": [ "agents", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json b/src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json index f8124f0fa..b230209cf 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json @@ -2028,7 +2028,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json b/src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json index c5267fa59..9c0cb36a5 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Vector Store RAG.json @@ -3004,7 +3004,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json b/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json index 9ff160fc0..831b6b69e 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Youtube Analysis.json @@ -966,7 +966,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "openai_api_base": { "_input_type": "StrInput", @@ -1260,9 +1260,7 @@ "display_name": "OpenAI API Key", "dynamic": false, "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Message" - ], + "input_types": [], "load_from_db": true, "name": "api_key", "password": true, @@ -1460,11 +1458,15 @@ "options": [ "gpt-4o-mini", "gpt-4o", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", "gpt-4.5-preview", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4", - "gpt-3.5-turbo" + "gpt-3.5-turbo", + "o1" ], "options_metadata": [], "placeholder": "", @@ -1475,7 +1477,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "gpt-4o-mini" + "value": "gpt-4.1-mini" }, "n_messages": { "_input_type": "IntInput", diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeDialogComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeDialogComponent/index.tsx index daa5ff193..d099396c1 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeDialogComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeDialogComponent/index.tsx @@ -85,6 +85,7 @@ export const NodeDialog: React.FC = ({ if (dialogTemplate[fieldKey].real_time_refresh) { mutateTemplate( { [fieldKey]: newValue }, + nodeId, nodeClass, setNodeClass, postTemplateValue, @@ -136,6 +137,7 @@ export const NodeDialog: React.FC = ({ await mutateTemplate( fieldValues, + nodeId, nodeClass, setNodeClass, postTemplateValue, diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx index 639697d39..362dad546 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeInputField/index.tsx @@ -82,7 +82,13 @@ export default function NodeInputField({ }; }, [data?.node?.id, isAuth, name]); - useFetchDataOnMount(data.node!, handleNodeClass, name, postTemplateValue); + useFetchDataOnMount( + data.node!, + data.id, + handleNodeClass, + name, + postTemplateValue, + ); useEffect(() => { if (optionalHandle && optionalHandle.length === 0) { diff --git a/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx index 995340fee..771c158c5 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx @@ -106,6 +106,7 @@ export default function NodeStatus({ pollingInterval.current = setInterval(() => { mutateTemplate( { validate: data.node?.template?.auth?.value || "" }, + data.id, data.node, (newNode) => { setNode(nodeId, (old) => ({ @@ -136,6 +137,7 @@ export default function NodeStatus({ setIsPolling(true); mutateTemplate( "disconnect", + data.id, data.node, (newNode) => { setNode(nodeId, (old) => ({ diff --git a/src/frontend/src/CustomNodes/helpers/mutate-template.ts b/src/frontend/src/CustomNodes/helpers/mutate-template.ts index 21e7e5acc..7aeab13f8 100644 --- a/src/frontend/src/CustomNodes/helpers/mutate-template.ts +++ b/src/frontend/src/CustomNodes/helpers/mutate-template.ts @@ -7,42 +7,79 @@ import { APIClassType, ResponseErrorDetailAPI } from "@/types/api"; import { UseMutationResult } from "@tanstack/react-query"; import { cloneDeep, debounce } from "lodash"; -export const mutateTemplate = debounce( - async ( +// Map to store debounced functions for each node ID +const debouncedFunctions = new Map>(); + +export const mutateTemplate = async ( + newValue, + nodeId: string, + node: APIClassType, + setNodeClass, + postTemplateValue: UseMutationResult< + APIClassType | undefined, + ResponseErrorDetailAPI, + any + >, + setErrorData, + parameterName?: string, + callback?: () => void, + toolMode?: boolean, +) => { + // Get or create a debounced function for this node ID + if (!debouncedFunctions.has(nodeId)) { + debouncedFunctions.set( + nodeId, + debounce( + async ( + newValue, + node: APIClassType, + setNodeClass, + postTemplateValue: UseMutationResult< + APIClassType | undefined, + ResponseErrorDetailAPI, + any + >, + setErrorData, + parameterName?: string, + callback?: () => void, + toolMode?: boolean, + ) => { + try { + const newNode = cloneDeep(node); + const newTemplate = await postTemplateValue.mutateAsync({ + value: newValue, + field_name: parameterName, + tool_mode: toolMode ?? node.tool_mode, + }); + if (newTemplate) { + newNode.template = newTemplate.template; + newNode.outputs = newTemplate.outputs; + newNode.tool_mode = toolMode ?? node.tool_mode; + } + setNodeClass(newNode); + callback?.(); + } catch (e) { + const error = e as ResponseErrorDetailAPI; + setErrorData({ + title: TITLE_ERROR_UPDATING_COMPONENT, + list: [error.response?.data?.detail || ERROR_UPDATING_COMPONENT], + }); + } + }, + SAVE_DEBOUNCE_TIME, + ), + ); + } + + // Call the debounced function for this specific node + debouncedFunctions.get(nodeId)?.( newValue, - node: APIClassType, + node, setNodeClass, - postTemplateValue: UseMutationResult< - APIClassType | undefined, - ResponseErrorDetailAPI, - any - >, + postTemplateValue, setErrorData, - parameterName?: string, - callback?: () => void, - toolMode?: boolean, - ) => { - try { - const newNode = cloneDeep(node); - const newTemplate = await postTemplateValue.mutateAsync({ - value: newValue, - field_name: parameterName, - tool_mode: toolMode ?? node.tool_mode, - }); - if (newTemplate) { - newNode.template = newTemplate.template; - newNode.outputs = newTemplate.outputs; - newNode.tool_mode = toolMode ?? node.tool_mode; - } - setNodeClass(newNode); - callback?.(); - } catch (e) { - const error = e as ResponseErrorDetailAPI; - setErrorData({ - title: TITLE_ERROR_UPDATING_COMPONENT, - list: [error.response?.data?.detail || ERROR_UPDATING_COMPONENT], - }); - } - }, - SAVE_DEBOUNCE_TIME, -); + parameterName, + callback, + toolMode, + ); +}; diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts index 471e0bc0d..832f306c0 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.ts @@ -6,6 +6,7 @@ import { mutateTemplate } from "../helpers/mutate-template"; const useFetchDataOnMount = ( node: APIClassType, + nodeId: string, setNodeClass: (node: APIClassType) => void, name: string, postTemplateValue: UseMutationResult< @@ -20,16 +21,22 @@ const useFetchDataOnMount = ( async function fetchData() { const template = node.template[name]; if ( - (template?.real_time_refresh || template?.refresh_button) && + (template?.real_time_refresh || + template?.refresh_button || + (node.tool_mode && name === "tools_metadata")) && // options can be undefined but not an empty array (template?.options?.length ?? 0) === 0 ) { mutateTemplate( template?.value, + nodeId, node, setNodeClass, postTemplateValue, setErrorData, + name, + () => {}, + node.tool_mode, ); } } diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts index 219116e10..c58b29159 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.ts @@ -130,6 +130,7 @@ const useHandleOnNewValue = ({ ) => { await mutateTemplate( value, + nodeId, node, setNodeClassFn, postTemplateFn, diff --git a/src/frontend/src/components/core/dropdownComponent/index.tsx b/src/frontend/src/components/core/dropdownComponent/index.tsx index 4af956d0f..9312719fd 100644 --- a/src/frontend/src/components/core/dropdownComponent/index.tsx +++ b/src/frontend/src/components/core/dropdownComponent/index.tsx @@ -180,6 +180,7 @@ export default function Dropdown({ await mutateTemplate( value, + nodeId, nodeClass!, handleNodeClass, postTemplateValue, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx index f3488d0dc..7469cf926 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/connectionComponent/index.tsx @@ -117,6 +117,7 @@ const ConnectionComponent = ({ pollingInterval.current = setInterval(() => { mutateTemplate( { validate: selectedItem[0]?.name || "" }, + nodeId, nodeClass, handleNodeClass, postTemplateValue, diff --git a/src/frontend/src/components/core/parameterRenderComponent/components/refreshParameterComponent/index.tsx b/src/frontend/src/components/core/parameterRenderComponent/components/refreshParameterComponent/index.tsx index 024daab88..b7b35c4d2 100644 --- a/src/frontend/src/components/core/parameterRenderComponent/components/refreshParameterComponent/index.tsx +++ b/src/frontend/src/components/core/parameterRenderComponent/components/refreshParameterComponent/index.tsx @@ -36,6 +36,7 @@ export function RefreshParameterComponent({ const handleRefreshButtonPress = () => mutateTemplate( templateData.value, + nodeId, nodeClass, handleNodeClass, postTemplateValue, diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index fbaafb85b..93c8c3535 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -177,6 +177,7 @@ const NodeToolbarComponent = memo( setToolMode(newValue); mutateTemplate( newValue, + data.id, data.node!, handleNodeClass, postToolModeValue, diff --git a/src/frontend/tests/core/integrations/Portfolio Website Code Generator.spec.ts b/src/frontend/tests/core/integrations/Portfolio Website Code Generator.spec.ts index eab90afa4..224590f2c 100644 --- a/src/frontend/tests/core/integrations/Portfolio Website Code Generator.spec.ts +++ b/src/frontend/tests/core/integrations/Portfolio Website Code Generator.spec.ts @@ -71,7 +71,7 @@ withEventDeliveryModes( expect(concatAllText.length).toBeGreaterThan(200); - expect(concatAllText).toContain("html"); + expect(concatAllText).toContain("div"); expect(concatAllText).toContain("body"); }, );