From aa7eb90d94e38513552b143419f7d7f1fc6ff0f8 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Tue, 21 Jan 2025 16:44:08 -0300 Subject: [PATCH] feat: Update basic examples (#5846) * fix examples - simple agent * update templates * formatting --- .../starter_projects/Research Agent.json | 826 +++++++++-------- .../Sequential Tasks Agents .json | 863 ++++++++++-------- .../starter_projects/Simple Agent.json | 131 +-- 3 files changed, 992 insertions(+), 828 deletions(-) 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 58265282e..c030f8769 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 @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-wWNhZ", + "id": "OpenAIModel-gqyjP", "name": "text_output", "output_types": [ "Message" @@ -15,7 +15,7 @@ }, "targetHandle": { "fieldName": "previous_response", - "id": "Prompt-MTcxq", + "id": "Prompt-0I0H4", "inputTypes": [ "Message", "Text" @@ -23,12 +23,12 @@ "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-wWNhZ{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-wWNhZœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-MTcxq{œfieldNameœ:œprevious_responseœ,œidœ:œPrompt-MTcxqœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-OpenAIModel-gqyjP{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-gqyjPœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-0I0H4{œfieldNameœ:œprevious_responseœ,œidœ:œPrompt-0I0H4œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "OpenAIModel-wWNhZ", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-wWNhZœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-MTcxq", - "targetHandle": "{œfieldNameœ: œprevious_responseœ, œidœ: œPrompt-MTcxqœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "OpenAIModel-gqyjP", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-gqyjPœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-0I0H4", + "targetHandle": "{œfieldNameœ: œprevious_responseœ, œidœ: œPrompt-0I0H4œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -36,7 +36,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-hBw61", + "id": "Prompt-eSKKr", "name": "prompt", "output_types": [ "Message" @@ -44,19 +44,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-ILQV8", + "id": "OpenAIModel-S0zP4", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-hBw61{œdataTypeœ:œPromptœ,œidœ:œPrompt-hBw61œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-ILQV8{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-ILQV8œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-eSKKr{œdataTypeœ:œPromptœ,œidœ:œPrompt-eSKKrœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-S0zP4{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-S0zP4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-hBw61", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-hBw61œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-ILQV8", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-ILQV8œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-eSKKr", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-eSKKrœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-S0zP4", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-S0zP4œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -64,7 +64,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-YWCg2", + "id": "ChatInput-NO5CC", "name": "message", "output_types": [ "Message" @@ -72,7 +72,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Prompt-hBw61", + "id": "Prompt-eSKKr", "inputTypes": [ "Message", "Text" @@ -80,12 +80,12 @@ "type": "str" } }, - "id": "reactflow__edge-ChatInput-YWCg2{œdataTypeœ:œChatInputœ,œidœ:œChatInput-YWCg2œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-hBw61{œfieldNameœ:œinput_valueœ,œidœ:œPrompt-hBw61œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-NO5CC{œdataTypeœ:œChatInputœ,œidœ:œChatInput-NO5CCœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-eSKKr{œfieldNameœ:œinput_valueœ,œidœ:œPrompt-eSKKrœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-YWCg2", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-YWCg2œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-hBw61", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œPrompt-hBw61œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "ChatInput-NO5CC", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-NO5CCœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-eSKKr", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œPrompt-eSKKrœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -93,7 +93,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-ILQV8", + "id": "OpenAIModel-S0zP4", "name": "text_output", "output_types": [ "Message" @@ -101,47 +101,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-jGyp6", + "id": "ChatOutput-ZN3tc", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-ILQV8{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-ILQV8œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-jGyp6{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-jGyp6œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-OpenAIModel-S0zP4{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-S0zP4œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-ZN3tc{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-ZN3tcœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "OpenAIModel-ILQV8", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-ILQV8œ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-jGyp6", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-jGyp6œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "TavilyAISearch", - "id": "TavilyAISearch-wu6YR", - "name": "api_build_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-lD2aY", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "reactflow__edge-TavilyAISearch-wu6YR{œdataTypeœ:œTavilyAISearchœ,œidœ:œTavilyAISearch-wu6YRœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-lD2aY{œfieldNameœ:œtoolsœ,œidœ:œAgent-lD2aYœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "selected": false, - "source": "TavilyAISearch-wu6YR", - "sourceHandle": "{œdataTypeœ: œTavilyAISearchœ, œidœ: œTavilyAISearch-wu6YRœ, œnameœ: œapi_build_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-lD2aY", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-lD2aYœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "OpenAIModel-S0zP4", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-S0zP4œ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-ZN3tc", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-ZN3tcœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -149,7 +121,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-MTcxq", + "id": "Prompt-0I0H4", "name": "prompt", "output_types": [ "Message" @@ -157,19 +129,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-lD2aY", + "id": "Agent-YS55M", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-MTcxq{œdataTypeœ:œPromptœ,œidœ:œPrompt-MTcxqœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-lD2aY{œfieldNameœ:œinput_valueœ,œidœ:œAgent-lD2aYœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-0I0H4{œdataTypeœ:œPromptœ,œidœ:œPrompt-0I0H4œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-YS55M{œfieldNameœ:œinput_valueœ,œidœ:œAgent-YS55Mœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-MTcxq", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-MTcxqœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-lD2aY", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-lD2aYœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-0I0H4", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-0I0H4œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-YS55M", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-YS55Mœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -177,7 +149,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-lD2aY", + "id": "Agent-YS55M", "name": "response", "output_types": [ "Message" @@ -185,7 +157,7 @@ }, "targetHandle": { "fieldName": "search_results", - "id": "Prompt-hBw61", + "id": "Prompt-eSKKr", "inputTypes": [ "Message", "Text" @@ -193,12 +165,12 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-lD2aY{œdataTypeœ:œAgentœ,œidœ:œAgent-lD2aYœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-hBw61{œfieldNameœ:œsearch_resultsœ,œidœ:œPrompt-hBw61œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-YS55M{œdataTypeœ:œAgentœ,œidœ:œAgent-YS55Mœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-eSKKr{œfieldNameœ:œsearch_resultsœ,œidœ:œPrompt-eSKKrœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-lD2aY", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-lD2aYœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-hBw61", - "targetHandle": "{œfieldNameœ: œsearch_resultsœ, œidœ: œPrompt-hBw61œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "Agent-YS55M", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-YS55Mœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-eSKKr", + "targetHandle": "{œfieldNameœ: œsearch_resultsœ, œidœ: œPrompt-eSKKrœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -206,7 +178,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-Unjx8", + "id": "Prompt-CadaL", "name": "prompt", "output_types": [ "Message" @@ -214,18 +186,18 @@ }, "targetHandle": { "fieldName": "system_message", - "id": "OpenAIModel-wWNhZ", + "id": "OpenAIModel-gqyjP", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-Unjx8{œdataTypeœ:œPromptœ,œidœ:œPrompt-Unjx8œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-wWNhZ{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-wWNhZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-Unjx8", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-Unjx8œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-wWNhZ", - "targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-wWNhZœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-CadaL{œdataTypeœ:œPromptœ,œidœ:œPrompt-CadaLœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-gqyjP{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-gqyjPœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-CadaL", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-CadaLœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-gqyjP", + "targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-gqyjPœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -233,7 +205,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-YWCg2", + "id": "ChatInput-NO5CC", "name": "message", "output_types": [ "Message" @@ -241,18 +213,18 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-wWNhZ", + "id": "OpenAIModel-gqyjP", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-YWCg2{œdataTypeœ:œChatInputœ,œidœ:œChatInput-YWCg2œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-wWNhZ{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-wWNhZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "ChatInput-YWCg2", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-YWCg2œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-wWNhZ", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-wWNhZœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-ChatInput-NO5CC{œdataTypeœ:œChatInputœ,œidœ:œChatInput-NO5CCœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-gqyjP{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-gqyjPœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "ChatInput-NO5CC", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-NO5CCœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-gqyjP", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-gqyjPœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -260,7 +232,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-U0O7D", + "id": "Prompt-KWWyW", "name": "prompt", "output_types": [ "Message" @@ -268,18 +240,43 @@ }, "targetHandle": { "fieldName": "system_message", - "id": "OpenAIModel-ILQV8", + "id": "OpenAIModel-S0zP4", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-U0O7D{œdataTypeœ:œPromptœ,œidœ:œPrompt-U0O7Dœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-ILQV8{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-ILQV8œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-U0O7D", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-U0O7Dœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-ILQV8", - "targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-ILQV8œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-KWWyW{œdataTypeœ:œPromptœ,œidœ:œPrompt-KWWyWœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-S0zP4{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-S0zP4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-KWWyW", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-KWWyWœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-S0zP4", + "targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-S0zP4œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "TavilySearchComponent", + "id": "TavilySearchComponent-KcrPr", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-YS55M", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__TavilySearchComponent-KcrPr{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-KcrPrœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-YS55M{œfieldNameœ:œtoolsœ,œidœ:œAgent-YS55Mœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "TavilySearchComponent-KcrPr", + "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-KcrPrœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-YS55M", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-YS55Mœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" } ], "nodes": [ @@ -287,7 +284,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-MTcxq", + "id": "Prompt-0I0H4", "node": { "base_classes": [ "Message" @@ -417,14 +414,14 @@ }, "dragging": false, "height": 347, - "id": "Prompt-MTcxq", + "id": "Prompt-0I0H4", "measured": { "height": 347, - "width": 320 + "width": 360 }, "position": { - "x": 1803.2315476328304, - "y": 839.0423490089254 + "x": 1818.6564755787988, + "y": 857.0380982792217 }, "positionAbsolute": { "x": 1803.2315476328304, @@ -436,7 +433,7 @@ }, { "data": { - "id": "ChatInput-YWCg2", + "id": "ChatInput-NO5CC", "node": { "base_classes": [ "Message" @@ -711,10 +708,10 @@ }, "dragging": false, "height": 234, - "id": "ChatInput-YWCg2", + "id": "ChatInput-NO5CC", "measured": { "height": 234, - "width": 320 + "width": 360 }, "position": { "x": 756.0075981758582, @@ -732,7 +729,7 @@ "data": { "description": "Display a chat message in the Playground.", "display_name": "Chat Output", - "id": "ChatOutput-jGyp6", + "id": "ChatOutput-ZN3tc", "node": { "base_classes": [ "Message" @@ -993,10 +990,10 @@ }, "dragging": false, "height": 234, - "id": "ChatOutput-jGyp6", + "id": "ChatOutput-ZN3tc", "measured": { "height": 234, - "width": 320 + "width": 360 }, "position": { "x": 3200.774558432761, @@ -1014,7 +1011,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-hBw61", + "id": "Prompt-eSKKr", "node": { "base_classes": [ "Message" @@ -1168,10 +1165,10 @@ }, "dragging": false, "height": 433, - "id": "Prompt-hBw61", + "id": "Prompt-eSKKr", "measured": { "height": 433, - "width": 320 + "width": 360 }, "position": { "x": 2504.138359606453, @@ -1185,258 +1182,11 @@ "type": "genericNode", "width": 320 }, - { - "data": { - "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n", - "display_name": "Tavily AI Search [DEPRECATED]", - "id": "TavilyAISearch-wu6YR", - "node": { - "base_classes": [ - "Data", - "Tool" - ], - "beta": false, - "conditional_paths": [], - "custom_fields": {}, - "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n", - "display_name": "Tavily AI Search [DEPRECATED]", - "documentation": "https://docs.tavily.com/", - "edited": false, - "field_order": [ - "api_key", - "query", - "search_depth", - "topic", - "max_results", - "include_images", - "include_answer" - ], - "frozen": false, - "icon": "TavilyIcon", - "legacy": true, - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "cache": true, - "display_name": "Data", - "method": "run_model", - "name": "api_run_model", - "required_inputs": [ - "api_key" - ], - "selected": "Data", - "types": [ - "Data" - ], - "value": "__UNDEFINED__" - }, - { - "cache": true, - "display_name": "Tool", - "method": "build_tool", - "name": "api_build_tool", - "required_inputs": [ - "api_key" - ], - "selected": "Tool", - "types": [ - "Tool" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "template": { - "_type": "Component", - "api_key": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "Tavily API Key", - "dynamic": false, - "info": "Your Tavily API Key.", - "input_types": [ - "Message" - ], - "load_from_db": true, - "name": "api_key", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "" - }, - "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 enum import Enum\n\nimport httpx\nfrom langchain.tools import StructuredTool\nfrom langchain_core.tools import ToolException\nfrom loguru import logger\nfrom pydantic import BaseModel, Field\n\nfrom langflow.base.langchain_utilities.model import LCToolComponent\nfrom langflow.field_typing import Tool\nfrom langflow.inputs import BoolInput, DropdownInput, IntInput, MessageTextInput, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass TavilySearchDepth(Enum):\n BASIC = \"basic\"\n ADVANCED = \"advanced\"\n\n\nclass TavilySearchTopic(Enum):\n GENERAL = \"general\"\n NEWS = \"news\"\n\n\nclass TavilySearchSchema(BaseModel):\n query: str = Field(..., description=\"The search query you want to execute with Tavily.\")\n search_depth: TavilySearchDepth = Field(TavilySearchDepth.BASIC, description=\"The depth of the search.\")\n topic: TavilySearchTopic = Field(TavilySearchTopic.GENERAL, description=\"The category of the search.\")\n max_results: int = Field(5, description=\"The maximum number of search results to return.\")\n include_images: bool = Field(default=False, description=\"Include a list of query-related images in the response.\")\n include_answer: bool = Field(default=False, description=\"Include a short answer to original query.\")\n\n\nclass TavilySearchToolComponent(LCToolComponent):\n display_name = \"Tavily AI Search [DEPRECATED]\"\n description = \"\"\"**Tavily AI** is a search engine optimized for LLMs and RAG, \\\n aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n\"\"\"\n icon = \"TavilyIcon\"\n name = \"TavilyAISearch\"\n documentation = \"https://docs.tavily.com/\"\n legacy = True\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Tavily API Key\",\n required=True,\n info=\"Your Tavily API Key.\",\n ),\n MessageTextInput(\n name=\"query\",\n display_name=\"Search Query\",\n info=\"The search query you want to execute with Tavily.\",\n ),\n DropdownInput(\n name=\"search_depth\",\n display_name=\"Search Depth\",\n info=\"The depth of the search.\",\n options=list(TavilySearchDepth),\n value=TavilySearchDepth.ADVANCED,\n advanced=True,\n ),\n DropdownInput(\n name=\"topic\",\n display_name=\"Search Topic\",\n info=\"The category of the search.\",\n options=list(TavilySearchTopic),\n value=TavilySearchTopic.GENERAL,\n advanced=True,\n ),\n IntInput(\n name=\"max_results\",\n display_name=\"Max Results\",\n info=\"The maximum number of search results to return.\",\n value=5,\n advanced=True,\n ),\n BoolInput(\n name=\"include_images\",\n display_name=\"Include Images\",\n info=\"Include a list of query-related images in the response.\",\n value=True,\n advanced=True,\n ),\n BoolInput(\n name=\"include_answer\",\n display_name=\"Include Answer\",\n info=\"Include a short answer to original query.\",\n value=True,\n advanced=True,\n ),\n ]\n\n def run_model(self) -> list[Data]:\n # Convert string values to enum instances with validation\n try:\n search_depth_enum = (\n self.search_depth\n if isinstance(self.search_depth, TavilySearchDepth)\n else TavilySearchDepth(str(self.search_depth).lower())\n )\n except ValueError as e:\n error_message = f\"Invalid search depth value: {e!s}\"\n self.status = error_message\n return [Data(data={\"error\": error_message})]\n\n try:\n topic_enum = (\n self.topic if isinstance(self.topic, TavilySearchTopic) else TavilySearchTopic(str(self.topic).lower())\n )\n except ValueError as e:\n error_message = f\"Invalid topic value: {e!s}\"\n self.status = error_message\n return [Data(data={\"error\": error_message})]\n\n return self._tavily_search(\n self.query,\n search_depth=search_depth_enum,\n topic=topic_enum,\n max_results=self.max_results,\n include_images=self.include_images,\n include_answer=self.include_answer,\n )\n\n def build_tool(self) -> Tool:\n return StructuredTool.from_function(\n name=\"tavily_search\",\n description=\"Perform a web search using the Tavily API.\",\n func=self._tavily_search,\n args_schema=TavilySearchSchema,\n )\n\n def _tavily_search(\n self,\n query: str,\n *,\n search_depth: TavilySearchDepth = TavilySearchDepth.BASIC,\n topic: TavilySearchTopic = TavilySearchTopic.GENERAL,\n max_results: int = 5,\n include_images: bool = False,\n include_answer: bool = False,\n ) -> list[Data]:\n # Validate enum values\n if not isinstance(search_depth, TavilySearchDepth):\n msg = f\"Invalid search_depth value: {search_depth}\"\n raise TypeError(msg)\n if not isinstance(topic, TavilySearchTopic):\n msg = f\"Invalid topic value: {topic}\"\n raise TypeError(msg)\n\n try:\n url = \"https://api.tavily.com/search\"\n headers = {\n \"content-type\": \"application/json\",\n \"accept\": \"application/json\",\n }\n payload = {\n \"api_key\": self.api_key,\n \"query\": query,\n \"search_depth\": search_depth.value,\n \"topic\": topic.value,\n \"max_results\": max_results,\n \"include_images\": include_images,\n \"include_answer\": include_answer,\n }\n\n with httpx.Client() as client:\n response = client.post(url, json=payload, headers=headers)\n\n response.raise_for_status()\n search_results = response.json()\n\n data_results = [\n Data(\n data={\n \"title\": result.get(\"title\"),\n \"url\": result.get(\"url\"),\n \"content\": result.get(\"content\"),\n \"score\": result.get(\"score\"),\n }\n )\n for result in search_results.get(\"results\", [])\n ]\n\n if include_answer and search_results.get(\"answer\"):\n data_results.insert(0, Data(data={\"answer\": search_results[\"answer\"]}))\n\n if include_images and search_results.get(\"images\"):\n data_results.append(Data(data={\"images\": search_results[\"images\"]}))\n\n self.status = data_results # type: ignore[assignment]\n\n except httpx.HTTPStatusError as e:\n error_message = f\"HTTP error: {e.response.status_code} - {e.response.text}\"\n logger.debug(error_message)\n self.status = error_message\n raise ToolException(error_message) from e\n except Exception as e:\n error_message = f\"Unexpected error: {e}\"\n logger.opt(exception=True).debug(\"Error running Tavily Search\")\n self.status = error_message\n raise ToolException(error_message) from e\n return data_results\n" - }, - "include_answer": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Include Answer", - "dynamic": false, - "info": "Include a short answer to original query.", - "list": false, - "list_add_label": "Add More", - "name": "include_answer", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "include_images": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Include Images", - "dynamic": false, - "info": "Include a list of query-related images in the response.", - "list": false, - "list_add_label": "Add More", - "name": "include_images", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "max_results": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Results", - "dynamic": false, - "info": "The maximum number of search results to return.", - "list": false, - "list_add_label": "Add More", - "name": "max_results", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 5 - }, - "query": { - "_input_type": "MessageTextInput", - "advanced": false, - "display_name": "Search Query", - "dynamic": false, - "info": "The search query you want to execute with Tavily.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "query", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "search_depth": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Search Depth", - "dynamic": false, - "info": "The depth of the search.", - "load_from_db": false, - "name": "search_depth", - "options": [ - "basic", - "advanced" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "advanced" - }, - "topic": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Search Topic", - "dynamic": false, - "info": "The category of the search.", - "load_from_db": false, - "name": "topic", - "options": [ - "general", - "news" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "general" - } - }, - "tool_mode": false - }, - "type": "TavilyAISearch" - }, - "dragging": false, - "height": 481, - "id": "TavilyAISearch-wu6YR", - "measured": { - "height": 481, - "width": 320 - }, - "position": { - "x": 1802.2291194402355, - "y": 381.88177151343945 - }, - "positionAbsolute": { - "x": 1802.2291194402355, - "y": 381.88177151343945 - }, - "selected": true, - "type": "genericNode", - "width": 320 - }, { "data": { "description": "Generates text using OpenAI LLMs.", "display_name": "OpenAI", - "id": "OpenAIModel-wWNhZ", + "id": "OpenAIModel-gqyjP", "node": { "base_classes": [ "LanguageModel", @@ -1510,7 +1260,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -1733,10 +1483,10 @@ }, "dragging": false, "height": 630, - "id": "OpenAIModel-wWNhZ", + "id": "OpenAIModel-gqyjP", "measured": { "height": 630, - "width": 320 + "width": 360 }, "position": { "x": 1457.8987895868838, @@ -1754,7 +1504,7 @@ "data": { "description": "Generates text using OpenAI LLMs.", "display_name": "OpenAI", - "id": "OpenAIModel-ILQV8", + "id": "OpenAIModel-S0zP4", "node": { "base_classes": [ "LanguageModel", @@ -1828,7 +1578,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -2051,10 +1801,10 @@ }, "dragging": false, "height": 630, - "id": "OpenAIModel-ILQV8", + "id": "OpenAIModel-S0zP4", "measured": { "height": 630, - "width": 320 + "width": 360 }, "position": { "x": 2860.2941186979524, @@ -2070,7 +1820,7 @@ }, { "data": { - "id": "note-kzU8Y", + "id": "note-pNJhC", "node": { "description": "# Research Agent \n\nWelcome to the Research Agent! This flow helps you conduct in-depth research on various topics using AI-powered tools and analysis.\n\n## Instructions\n1. Enter Your Research Query\n - Type your research question or topic into the Chat Input node.\n - Be specific and clear about what you want to investigate.\n\n2. Generate Research Plan\n - The system will create a focused research plan based on your query.\n - This plan includes key search queries and priorities.\n\n3. Conduct Web Search\n - The Tavily AI Search tool will perform web searches using the generated queries.\n - It focuses on finding academic and reliable sources.\n\n4. Analyze and Synthesize\n - The AI agent will review the search results and create a comprehensive synthesis.\n - The report includes an executive summary, methodology, findings, and conclusions.\n\n5. Review the Output\n - Read the final report in the Chat Output node.\n - Use this information as a starting point for further research or decision-making.\n\nRemember: You can refine your initial query for more specific results! 🔍📊", "display_name": "", @@ -2083,10 +1833,10 @@ }, "dragging": false, "height": 765, - "id": "note-kzU8Y", + "id": "note-pNJhC", "measured": { "height": 765, - "width": 325 + "width": 328 }, "position": { "x": 471.4335708918645, @@ -2109,7 +1859,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Agent", - "id": "Agent-lD2aY", + "id": "Agent-YS55M", "node": { "base_classes": [ "Message" @@ -2248,7 +1998,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -2669,10 +2419,10 @@ }, "dragging": false, "height": 658, - "id": "Agent-lD2aY", + "id": "Agent-YS55M", "measured": { "height": 658, - "width": 320 + "width": 360 }, "position": { "x": 2156.60686936856, @@ -2690,7 +2440,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-Unjx8", + "id": "Prompt-CadaL", "node": { "base_classes": [ "Message" @@ -2795,10 +2545,10 @@ }, "dragging": false, "height": 260, - "id": "Prompt-Unjx8", + "id": "Prompt-CadaL", "measured": { "height": 260, - "width": 320 + "width": 360 }, "position": { "x": 1102.6079408836365, @@ -2816,7 +2566,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-U0O7D", + "id": "Prompt-KWWyW", "node": { "base_classes": [ "Message" @@ -2921,10 +2671,10 @@ }, "dragging": false, "height": 260, - "id": "Prompt-U0O7D", + "id": "Prompt-KWWyW", "measured": { "height": 260, - "width": 320 + "width": 360 }, "position": { "x": 2498.9482347755306, @@ -2940,7 +2690,7 @@ }, { "data": { - "id": "note-ZeCGk", + "id": "note-OSBLo", "node": { "description": "# 🔑 Tavily AI Search Needs API Key\n\nYou can get 1000 searches/month free [here](https://tavily.com/) ", "display_name": "", @@ -2953,10 +2703,10 @@ }, "dragging": false, "height": 325, - "id": "note-ZeCGk", + "id": "note-OSBLo", "measured": { "height": 325, - "width": 325 + "width": 328 }, "position": { "x": 1797.5781951055678, @@ -2969,12 +2719,330 @@ "selected": false, "type": "noteNode", "width": 325 + }, + { + "data": { + "id": "TavilySearchComponent-KcrPr", + "node": { + "base_classes": [ + "Data", + "Message" + ], + "beta": false, + "category": "tools", + "conditional_paths": [], + "custom_fields": {}, + "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "display_name": "Tavily AI Search", + "documentation": "", + "edited": false, + "field_order": [ + "api_key", + "query", + "search_depth", + "topic", + "max_results", + "include_images", + "include_answer" + ], + "frozen": false, + "icon": "TavilyIcon", + "key": "TavilySearchComponent", + "legacy": false, + "metadata": {}, + "minimized": false, + "output_types": [], + "outputs": [ + { + "cache": true, + "display_name": "Toolset", + "hidden": null, + "method": "to_toolkit", + "name": "component_as_tool", + "required_inputs": null, + "selected": "Tool", + "types": [ + "Tool" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "score": 0.0075846556637275304, + "template": { + "_type": "Component", + "api_key": { + "_input_type": "SecretStrInput", + "advanced": false, + "display_name": "Tavily API Key", + "dynamic": false, + "info": "Your Tavily API Key.", + "input_types": [ + "Message" + ], + "load_from_db": false, + "name": "api_key", + "password": true, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "str", + "value": "" + }, + "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": "import httpx\nfrom loguru import logger\n\nfrom langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\nfrom langflow.schema.message import Message\n\n\nclass TavilySearchComponent(Component):\n display_name = \"Tavily AI Search\"\n description = \"\"\"**Tavily AI** is a search engine optimized for LLMs and RAG, \\\n aimed at efficient, quick, and persistent search results.\"\"\"\n icon = \"TavilyIcon\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Tavily API Key\",\n required=True,\n info=\"Your Tavily API Key.\",\n ),\n MessageTextInput(\n name=\"query\",\n display_name=\"Search Query\",\n info=\"The search query you want to execute with Tavily.\",\n tool_mode=True,\n ),\n DropdownInput(\n name=\"search_depth\",\n display_name=\"Search Depth\",\n info=\"The depth of the search.\",\n options=[\"basic\", \"advanced\"],\n value=\"advanced\",\n advanced=True,\n ),\n DropdownInput(\n name=\"topic\",\n display_name=\"Search Topic\",\n info=\"The category of the search.\",\n options=[\"general\", \"news\"],\n value=\"general\",\n advanced=True,\n ),\n IntInput(\n name=\"max_results\",\n display_name=\"Max Results\",\n info=\"The maximum number of search results to return.\",\n value=5,\n advanced=True,\n ),\n BoolInput(\n name=\"include_images\",\n display_name=\"Include Images\",\n info=\"Include a list of query-related images in the response.\",\n value=True,\n advanced=True,\n ),\n BoolInput(\n name=\"include_answer\",\n display_name=\"Include Answer\",\n info=\"Include a short answer to original query.\",\n value=True,\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"fetch_content\"),\n Output(display_name=\"Text\", name=\"text\", method=\"fetch_content_text\"),\n ]\n\n def fetch_content(self) -> list[Data]:\n try:\n url = \"https://api.tavily.com/search\"\n headers = {\n \"content-type\": \"application/json\",\n \"accept\": \"application/json\",\n }\n payload = {\n \"api_key\": self.api_key,\n \"query\": self.query,\n \"search_depth\": self.search_depth,\n \"topic\": self.topic,\n \"max_results\": self.max_results,\n \"include_images\": self.include_images,\n \"include_answer\": self.include_answer,\n }\n\n with httpx.Client() as client:\n response = client.post(url, json=payload, headers=headers)\n\n response.raise_for_status()\n search_results = response.json()\n\n data_results = []\n\n if self.include_answer and search_results.get(\"answer\"):\n data_results.append(Data(text=search_results[\"answer\"]))\n\n for result in search_results.get(\"results\", []):\n content = result.get(\"content\", \"\")\n data_results.append(\n Data(\n text=content,\n data={\n \"title\": result.get(\"title\"),\n \"url\": result.get(\"url\"),\n \"content\": content,\n \"score\": result.get(\"score\"),\n },\n )\n )\n\n if self.include_images and search_results.get(\"images\"):\n data_results.append(Data(text=\"Images found\", data={\"images\": search_results[\"images\"]}))\n except httpx.HTTPStatusError as exc:\n error_message = f\"HTTP error occurred: {exc.response.status_code} - {exc.response.text}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n except httpx.RequestError as exc:\n error_message = f\"Request error occurred: {exc}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n except ValueError as exc:\n error_message = f\"Invalid response format: {exc}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n else:\n self.status = data_results\n return data_results\n\n def fetch_content_text(self) -> Message:\n data = self.fetch_content()\n result_string = data_to_text(\"{text}\", data)\n self.status = result_string\n return Message(text=result_string)\n" + }, + "include_answer": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Include Answer", + "dynamic": false, + "info": "Include a short answer to original query.", + "list": false, + "list_add_label": "Add More", + "name": "include_answer", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "include_images": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Include Images", + "dynamic": false, + "info": "Include a list of query-related images in the response.", + "list": false, + "list_add_label": "Add More", + "name": "include_images", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "max_results": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Results", + "dynamic": false, + "info": "The maximum number of search results to return.", + "list": false, + "list_add_label": "Add More", + "name": "max_results", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, + "query": { + "_input_type": "MessageTextInput", + "advanced": false, + "display_name": "Search Query", + "dynamic": false, + "info": "The search query you want to execute with Tavily.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "query", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": true, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "search_depth": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "display_name": "Search Depth", + "dynamic": false, + "info": "The depth of the search.", + "name": "search_depth", + "options": [ + "basic", + "advanced" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "advanced" + }, + "tools_metadata": { + "_input_type": "TableInput", + "advanced": false, + "display_name": "Edit tools", + "dynamic": false, + "info": "", + "is_list": true, + "list_add_label": "Add More", + "name": "tools_metadata", + "placeholder": "", + "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", + "value": [ + { + "description": "fetch_content(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "name": "TavilySearchComponent-fetch_content", + "tags": [ + "TavilySearchComponent-fetch_content" + ] + }, + { + "description": "fetch_content_text(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "name": "TavilySearchComponent-fetch_content_text", + "tags": [ + "TavilySearchComponent-fetch_content_text" + ] + } + ] + }, + "topic": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "display_name": "Search Topic", + "dynamic": false, + "info": "The category of the search.", + "name": "topic", + "options": [ + "general", + "news" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "general" + } + }, + "tool_mode": true + }, + "showNode": true, + "type": "TavilySearchComponent" + }, + "dragging": false, + "id": "TavilySearchComponent-KcrPr", + "measured": { + "height": 489, + "width": 360 + }, + "position": { + "x": 1802.928183797125, + "y": 368.90338283211725 + }, + "selected": false, + "type": "genericNode" } ], "viewport": { - "x": -135.41177004024598, - "y": 333.07279532015843, - "zoom": 0.4245328613083133 + "x": -406.960259959106, + "y": -33.16211370837854, + "zoom": 0.5577809840170954 } }, "description": "Agent that generates focused plans, conducts web searches, and synthesizes findings into comprehensive reports.", 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 33cd0e7c0..069947950 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 @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-cisfj", + "id": "Prompt-h73y0", "name": "prompt", "output_types": [ "Message" @@ -15,18 +15,18 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-b9Ndr", + "id": "Agent-uuZ76", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-cisfj{œdataTypeœ:œPromptœ,œidœ:œPrompt-cisfjœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-b9Ndr{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-b9Ndrœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-cisfj", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-cisfjœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-b9Ndr", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-b9Ndrœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-h73y0{œdataTypeœ:œPromptœ,œidœ:œPrompt-h73y0œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-uuZ76{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-uuZ76œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-h73y0", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-h73y0œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-uuZ76", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-uuZ76œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -34,7 +34,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-uNyIS", + "id": "Prompt-kaNRB", "name": "prompt", "output_types": [ "Message" @@ -42,18 +42,18 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-opLbj", + "id": "Agent-9kiKa", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-uNyIS{œdataTypeœ:œPromptœ,œidœ:œPrompt-uNyISœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-opLbj{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-opLbjœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-uNyIS", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-uNyISœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-opLbj", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-opLbjœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-kaNRB{œdataTypeœ:œPromptœ,œidœ:œPrompt-kaNRBœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-9kiKa{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-9kiKaœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-kaNRB", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-kaNRBœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-9kiKa", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-9kiKaœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -61,7 +61,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-b9Ndr", + "id": "Agent-uuZ76", "name": "response", "output_types": [ "Message" @@ -69,18 +69,18 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-E20qD", + "id": "ChatOutput-r9E97", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Agent-b9Ndr{œdataTypeœ:œAgentœ,œidœ:œAgent-b9Ndrœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-E20qD{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-E20qDœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Agent-b9Ndr", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-b9Ndrœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-E20qD", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-E20qDœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-uuZ76{œdataTypeœ:œAgentœ,œidœ:œAgent-uuZ76œ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-r9E97{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-r9E97œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Agent-uuZ76", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-uuZ76œ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-r9E97", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-r9E97œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -88,7 +88,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-opLbj", + "id": "Agent-9kiKa", "name": "response", "output_types": [ "Message" @@ -96,7 +96,7 @@ }, "targetHandle": { "fieldName": "finance_agent_output", - "id": "Prompt-cisfj", + "id": "Prompt-h73y0", "inputTypes": [ "Message", "Text" @@ -104,11 +104,11 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-opLbj{œdataTypeœ:œAgentœ,œidœ:œAgent-opLbjœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-cisfj{œfieldNameœ:œfinance_agent_outputœ,œidœ:œPrompt-cisfjœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "Agent-opLbj", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-opLbjœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-cisfj", - "targetHandle": "{œfieldNameœ: œfinance_agent_outputœ, œidœ: œPrompt-cisfjœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-9kiKa{œdataTypeœ:œAgentœ,œidœ:œAgent-9kiKaœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-h73y0{œfieldNameœ:œfinance_agent_outputœ,œidœ:œPrompt-h73y0œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "source": "Agent-9kiKa", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-9kiKaœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-h73y0", + "targetHandle": "{œfieldNameœ: œfinance_agent_outputœ, œidœ: œPrompt-h73y0œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -116,7 +116,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-hE8ZA", + "id": "ChatInput-udfr5", "name": "message", "output_types": [ "Message" @@ -124,18 +124,18 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-hE8ZA{œdataTypeœ:œChatInputœ,œidœ:œChatInput-hE8ZAœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-AngMf{œfieldNameœ:œinput_valueœ,œidœ:œAgent-AngMfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "ChatInput-hE8ZA", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-hE8ZAœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-AngMf", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-AngMfœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-ChatInput-udfr5{œdataTypeœ:œChatInputœ,œidœ:œChatInput-udfr5œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-i5i7H{œfieldNameœ:œinput_valueœ,œidœ:œAgent-i5i7Hœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "ChatInput-udfr5", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-udfr5œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-i5i7H", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-i5i7Hœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -143,7 +143,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-IG0jU", + "id": "Prompt-62kjh", "name": "prompt", "output_types": [ "Message" @@ -151,45 +151,18 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-IG0jU{œdataTypeœ:œPromptœ,œidœ:œPrompt-IG0jUœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-AngMf{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-AngMfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-IG0jU", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-IG0jUœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-AngMf", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-AngMfœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "TavilyAISearch", - "id": "TavilyAISearch-KZP5i", - "name": "api_build_tool", - "output_types": [ - "Tool" - ] - }, - "targetHandle": { - "fieldName": "tools", - "id": "Agent-AngMf", - "inputTypes": [ - "Tool" - ], - "type": "other" - } - }, - "id": "reactflow__edge-TavilyAISearch-KZP5i{œdataTypeœ:œTavilyAISearchœ,œidœ:œTavilyAISearch-KZP5iœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-AngMf{œfieldNameœ:œtoolsœ,œidœ:œAgent-AngMfœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "TavilyAISearch-KZP5i", - "sourceHandle": "{œdataTypeœ: œTavilyAISearchœ, œidœ: œTavilyAISearch-KZP5iœ, œnameœ: œapi_build_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-AngMf", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-AngMfœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-Prompt-62kjh{œdataTypeœ:œPromptœ,œidœ:œPrompt-62kjhœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-i5i7H{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-i5i7Hœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-62kjh", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-62kjhœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-i5i7H", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-i5i7Hœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -197,7 +170,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "name": "response", "output_types": [ "Message" @@ -205,18 +178,18 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-opLbj", + "id": "Agent-9kiKa", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Agent-AngMf{œdataTypeœ:œAgentœ,œidœ:œAgent-AngMfœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-opLbj{œfieldNameœ:œinput_valueœ,œidœ:œAgent-opLbjœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Agent-AngMf", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-AngMfœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-opLbj", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-opLbjœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-i5i7H{œdataTypeœ:œAgentœ,œidœ:œAgent-i5i7Hœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-9kiKa{œfieldNameœ:œinput_valueœ,œidœ:œAgent-9kiKaœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Agent-i5i7H", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-i5i7Hœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-9kiKa", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-9kiKaœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -224,7 +197,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "name": "response", "output_types": [ "Message" @@ -232,7 +205,7 @@ }, "targetHandle": { "fieldName": "research_agent_output", - "id": "Prompt-cisfj", + "id": "Prompt-h73y0", "inputTypes": [ "Message", "Text" @@ -240,17 +213,18 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-AngMf{œdataTypeœ:œAgentœ,œidœ:œAgent-AngMfœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-cisfj{œfieldNameœ:œresearch_agent_outputœ,œidœ:œPrompt-cisfjœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "Agent-AngMf", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-AngMfœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-cisfj", - "targetHandle": "{œfieldNameœ: œresearch_agent_outputœ, œidœ: œPrompt-cisfjœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-i5i7H{œdataTypeœ:œAgentœ,œidœ:œAgent-i5i7Hœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-h73y0{œfieldNameœ:œresearch_agent_outputœ,œidœ:œPrompt-h73y0œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "source": "Agent-i5i7H", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-i5i7Hœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-h73y0", + "targetHandle": "{œfieldNameœ: œresearch_agent_outputœ, œidœ: œPrompt-h73y0œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { + "className": "", "data": { "sourceHandle": { "dataType": "CalculatorComponent", - "id": "CalculatorComponent-ZUJg0", + "id": "CalculatorComponent-RNHql", "name": "component_as_tool", "output_types": [ "Tool" @@ -258,24 +232,50 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-b9Ndr", + "id": "Agent-uuZ76", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "xy-edge__CalculatorComponent-ZUJg0{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-ZUJg0œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-b9Ndr{œfieldNameœ:œtoolsœ,œidœ:œAgent-b9Ndrœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "CalculatorComponent-ZUJg0", - "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-ZUJg0œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-b9Ndr", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-b9Ndrœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-CalculatorComponent-RNHql{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-RNHqlœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-uuZ76{œfieldNameœ:œtoolsœ,œidœ:œAgent-uuZ76œ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "CalculatorComponent-RNHql", + "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-RNHqlœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-uuZ76", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-uuZ76œ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "className": "", + "data": { + "sourceHandle": { + "dataType": "YfinanceComponent", + "id": "YfinanceComponent-FS7QO", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-9kiKa", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "reactflow__edge-YfinanceComponent-FS7QO{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-FS7QOœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-9kiKa{œfieldNameœ:œtoolsœ,œidœ:œAgent-9kiKaœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "YfinanceComponent-FS7QO", + "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-FS7QOœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-9kiKa", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-9kiKaœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "data": { "sourceHandle": { - "dataType": "YfinanceComponent", - "id": "YfinanceComponent-gHp4w", + "dataType": "TavilySearchComponent", + "id": "TavilySearchComponent-uLUDV", "name": "component_as_tool", "output_types": [ "Tool" @@ -283,18 +283,18 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-opLbj", + "id": "Agent-i5i7H", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "xy-edge__YfinanceComponent-gHp4w{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-gHp4wœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-opLbj{œfieldNameœ:œtoolsœ,œidœ:œAgent-opLbjœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "YfinanceComponent-gHp4w", - "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-gHp4wœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-opLbj", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-opLbjœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "xy-edge__TavilySearchComponent-uLUDV{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-uLUDVœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-i5i7H{œfieldNameœ:œtoolsœ,œidœ:œAgent-i5i7Hœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "TavilySearchComponent-uLUDV", + "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-uLUDVœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-i5i7H", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-i5i7Hœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" } ], "nodes": [ @@ -302,7 +302,7 @@ "data": { "description": "Display a chat message in the Playground.", "display_name": "Chat Output", - "id": "ChatOutput-E20qD", + "id": "ChatOutput-r9E97", "node": { "base_classes": [ "Message" @@ -563,10 +563,10 @@ }, "dragging": false, "height": 234, - "id": "ChatOutput-E20qD", + "id": "ChatOutput-r9E97", "measured": { "height": 234, - "width": 320 + "width": 360 }, "position": { "x": 1239.222567317785, @@ -584,7 +584,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Finance Agent", - "id": "Agent-opLbj", + "id": "Agent-9kiKa", "node": { "base_classes": [ "Message" @@ -723,7 +723,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -1144,10 +1144,10 @@ }, "dragging": false, "height": 650, - "id": "Agent-opLbj", + "id": "Agent-9kiKa", "measured": { "height": 650, - "width": 320 + "width": 360 }, "position": { "x": 45.70736046026991, @@ -1165,7 +1165,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Analysis & Editor Agent", - "id": "Agent-b9Ndr", + "id": "Agent-uuZ76", "node": { "base_classes": [ "Message" @@ -1304,7 +1304,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -1725,10 +1725,10 @@ }, "dragging": false, "height": 650, - "id": "Agent-b9Ndr", + "id": "Agent-uuZ76", "measured": { "height": 650, - "width": 320 + "width": 360 }, "position": { "x": 815.1900903820148, @@ -1746,7 +1746,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-IG0jU", + "id": "Prompt-62kjh", "node": { "base_classes": [ "Message" @@ -1857,10 +1857,10 @@ }, "dragging": false, "height": 260, - "id": "Prompt-IG0jU", + "id": "Prompt-62kjh", "measured": { "height": 260, - "width": 320 + "width": 360 }, "position": { "x": -1142.2312935529987, @@ -1878,7 +1878,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-uNyIS", + "id": "Prompt-kaNRB", "node": { "base_classes": [ "Message" @@ -1989,10 +1989,10 @@ }, "dragging": false, "height": 260, - "id": "Prompt-uNyIS", + "id": "Prompt-kaNRB", "measured": { "height": 260, - "width": 320 + "width": 360 }, "position": { "x": -344.9674638932195, @@ -2010,7 +2010,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-cisfj", + "id": "Prompt-h73y0", "node": { "base_classes": [ "Message" @@ -2170,10 +2170,10 @@ }, "dragging": false, "height": 433, - "id": "Prompt-cisfj", + "id": "Prompt-h73y0", "measured": { "height": 433, - "width": 320 + "width": 360 }, "position": { "x": 416.02309796632085, @@ -2189,7 +2189,7 @@ }, { "data": { - "id": "ChatInput-hE8ZA", + "id": "ChatInput-udfr5", "node": { "base_classes": [ "Message" @@ -2470,10 +2470,10 @@ }, "dragging": false, "height": 234, - "id": "ChatInput-hE8ZA", + "id": "ChatInput-udfr5", "measured": { "height": 234, - "width": 320 + "width": 360 }, "position": { "x": -1510.6054210793818, @@ -2489,254 +2489,7 @@ }, { "data": { - "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n", - "display_name": "Tavily AI Search [DEPRECATED]", - "id": "TavilyAISearch-KZP5i", - "node": { - "base_classes": [ - "Data", - "Tool" - ], - "beta": false, - "conditional_paths": [], - "custom_fields": {}, - "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n", - "display_name": "Tavily AI Search [DEPRECATED]", - "documentation": "https://docs.tavily.com/", - "edited": false, - "field_order": [ - "api_key", - "query", - "search_depth", - "topic", - "max_results", - "include_images", - "include_answer" - ], - "frozen": false, - "icon": "TavilyIcon", - "legacy": true, - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "cache": true, - "display_name": "Data", - "method": "run_model", - "name": "api_run_model", - "required_inputs": [ - "api_key" - ], - "selected": "Data", - "types": [ - "Data" - ], - "value": "__UNDEFINED__" - }, - { - "cache": true, - "display_name": "Tool", - "method": "build_tool", - "name": "api_build_tool", - "required_inputs": [ - "api_key" - ], - "selected": "Tool", - "types": [ - "Tool" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "template": { - "_type": "Component", - "api_key": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "Tavily API Key", - "dynamic": false, - "info": "Your Tavily API Key.", - "input_types": [ - "Message" - ], - "load_from_db": false, - "name": "api_key", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "" - }, - "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 enum import Enum\n\nimport httpx\nfrom langchain.tools import StructuredTool\nfrom langchain_core.tools import ToolException\nfrom loguru import logger\nfrom pydantic import BaseModel, Field\n\nfrom langflow.base.langchain_utilities.model import LCToolComponent\nfrom langflow.field_typing import Tool\nfrom langflow.inputs import BoolInput, DropdownInput, IntInput, MessageTextInput, SecretStrInput\nfrom langflow.schema import Data\n\n\nclass TavilySearchDepth(Enum):\n BASIC = \"basic\"\n ADVANCED = \"advanced\"\n\n\nclass TavilySearchTopic(Enum):\n GENERAL = \"general\"\n NEWS = \"news\"\n\n\nclass TavilySearchSchema(BaseModel):\n query: str = Field(..., description=\"The search query you want to execute with Tavily.\")\n search_depth: TavilySearchDepth = Field(TavilySearchDepth.BASIC, description=\"The depth of the search.\")\n topic: TavilySearchTopic = Field(TavilySearchTopic.GENERAL, description=\"The category of the search.\")\n max_results: int = Field(5, description=\"The maximum number of search results to return.\")\n include_images: bool = Field(default=False, description=\"Include a list of query-related images in the response.\")\n include_answer: bool = Field(default=False, description=\"Include a short answer to original query.\")\n\n\nclass TavilySearchToolComponent(LCToolComponent):\n display_name = \"Tavily AI Search [DEPRECATED]\"\n description = \"\"\"**Tavily AI** is a search engine optimized for LLMs and RAG, \\\n aimed at efficient, quick, and persistent search results. It can be used independently or as an agent tool.\n\nNote: Check 'Advanced' for all options.\n\"\"\"\n icon = \"TavilyIcon\"\n name = \"TavilyAISearch\"\n documentation = \"https://docs.tavily.com/\"\n legacy = True\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Tavily API Key\",\n required=True,\n info=\"Your Tavily API Key.\",\n ),\n MessageTextInput(\n name=\"query\",\n display_name=\"Search Query\",\n info=\"The search query you want to execute with Tavily.\",\n ),\n DropdownInput(\n name=\"search_depth\",\n display_name=\"Search Depth\",\n info=\"The depth of the search.\",\n options=list(TavilySearchDepth),\n value=TavilySearchDepth.ADVANCED,\n advanced=True,\n ),\n DropdownInput(\n name=\"topic\",\n display_name=\"Search Topic\",\n info=\"The category of the search.\",\n options=list(TavilySearchTopic),\n value=TavilySearchTopic.GENERAL,\n advanced=True,\n ),\n IntInput(\n name=\"max_results\",\n display_name=\"Max Results\",\n info=\"The maximum number of search results to return.\",\n value=5,\n advanced=True,\n ),\n BoolInput(\n name=\"include_images\",\n display_name=\"Include Images\",\n info=\"Include a list of query-related images in the response.\",\n value=True,\n advanced=True,\n ),\n BoolInput(\n name=\"include_answer\",\n display_name=\"Include Answer\",\n info=\"Include a short answer to original query.\",\n value=True,\n advanced=True,\n ),\n ]\n\n def run_model(self) -> list[Data]:\n # Convert string values to enum instances with validation\n try:\n search_depth_enum = (\n self.search_depth\n if isinstance(self.search_depth, TavilySearchDepth)\n else TavilySearchDepth(str(self.search_depth).lower())\n )\n except ValueError as e:\n error_message = f\"Invalid search depth value: {e!s}\"\n self.status = error_message\n return [Data(data={\"error\": error_message})]\n\n try:\n topic_enum = (\n self.topic if isinstance(self.topic, TavilySearchTopic) else TavilySearchTopic(str(self.topic).lower())\n )\n except ValueError as e:\n error_message = f\"Invalid topic value: {e!s}\"\n self.status = error_message\n return [Data(data={\"error\": error_message})]\n\n return self._tavily_search(\n self.query,\n search_depth=search_depth_enum,\n topic=topic_enum,\n max_results=self.max_results,\n include_images=self.include_images,\n include_answer=self.include_answer,\n )\n\n def build_tool(self) -> Tool:\n return StructuredTool.from_function(\n name=\"tavily_search\",\n description=\"Perform a web search using the Tavily API.\",\n func=self._tavily_search,\n args_schema=TavilySearchSchema,\n )\n\n def _tavily_search(\n self,\n query: str,\n *,\n search_depth: TavilySearchDepth = TavilySearchDepth.BASIC,\n topic: TavilySearchTopic = TavilySearchTopic.GENERAL,\n max_results: int = 5,\n include_images: bool = False,\n include_answer: bool = False,\n ) -> list[Data]:\n # Validate enum values\n if not isinstance(search_depth, TavilySearchDepth):\n msg = f\"Invalid search_depth value: {search_depth}\"\n raise TypeError(msg)\n if not isinstance(topic, TavilySearchTopic):\n msg = f\"Invalid topic value: {topic}\"\n raise TypeError(msg)\n\n try:\n url = \"https://api.tavily.com/search\"\n headers = {\n \"content-type\": \"application/json\",\n \"accept\": \"application/json\",\n }\n payload = {\n \"api_key\": self.api_key,\n \"query\": query,\n \"search_depth\": search_depth.value,\n \"topic\": topic.value,\n \"max_results\": max_results,\n \"include_images\": include_images,\n \"include_answer\": include_answer,\n }\n\n with httpx.Client() as client:\n response = client.post(url, json=payload, headers=headers)\n\n response.raise_for_status()\n search_results = response.json()\n\n data_results = [\n Data(\n data={\n \"title\": result.get(\"title\"),\n \"url\": result.get(\"url\"),\n \"content\": result.get(\"content\"),\n \"score\": result.get(\"score\"),\n }\n )\n for result in search_results.get(\"results\", [])\n ]\n\n if include_answer and search_results.get(\"answer\"):\n data_results.insert(0, Data(data={\"answer\": search_results[\"answer\"]}))\n\n if include_images and search_results.get(\"images\"):\n data_results.append(Data(data={\"images\": search_results[\"images\"]}))\n\n self.status = data_results # type: ignore[assignment]\n\n except httpx.HTTPStatusError as e:\n error_message = f\"HTTP error: {e.response.status_code} - {e.response.text}\"\n logger.debug(error_message)\n self.status = error_message\n raise ToolException(error_message) from e\n except Exception as e:\n error_message = f\"Unexpected error: {e}\"\n logger.opt(exception=True).debug(\"Error running Tavily Search\")\n self.status = error_message\n raise ToolException(error_message) from e\n return data_results\n" - }, - "include_answer": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Include Answer", - "dynamic": false, - "info": "Include a short answer to original query.", - "list": false, - "list_add_label": "Add More", - "name": "include_answer", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "include_images": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Include Images", - "dynamic": false, - "info": "Include a list of query-related images in the response.", - "list": false, - "list_add_label": "Add More", - "name": "include_images", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "max_results": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Max Results", - "dynamic": false, - "info": "The maximum number of search results to return.", - "list": false, - "list_add_label": "Add More", - "name": "max_results", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 5 - }, - "query": { - "_input_type": "MessageTextInput", - "advanced": false, - "display_name": "Search Query", - "dynamic": false, - "info": "The search query you want to execute with Tavily.", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "query", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "search_depth": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Search Depth", - "dynamic": false, - "info": "The depth of the search.", - "load_from_db": false, - "name": "search_depth", - "options": [ - "basic", - "advanced" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "advanced" - }, - "topic": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Search Topic", - "dynamic": false, - "info": "The category of the search.", - "load_from_db": false, - "name": "topic", - "options": [ - "general", - "news" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "general" - } - }, - "tool_mode": false - }, - "type": "TavilyAISearch" - }, - "dragging": false, - "height": 394, - "id": "TavilyAISearch-KZP5i", - "measured": { - "height": 394, - "width": 320 - }, - "position": { - "x": -1132.8634419233736, - "y": -770.0391255413992 - }, - "positionAbsolute": { - "x": -1132.8634419233736, - "y": -770.0391255413992 - }, - "selected": false, - "type": "genericNode", - "width": 320 - }, - { - "data": { - "id": "note-e59F1", + "id": "note-rwLko", "node": { "description": "# Sequential Tasks Agents\n\n## Overview\nThis flow demonstrates how to chain multiple AI agents for comprehensive research and analysis. Each agent specializes in different aspects of the research process, building upon the previous agent's work.\n\n## How to Use the Flow\n\n1. **Input Your Query** 🎯\n - Be specific and clear\n - Include key aspects you want analyzed\n - Examples:\n ```\n Good: \"Should I invest in Tesla (TSLA)? Focus on AI development impact\"\n Bad: \"Tell me about Tesla\"\n ```\n\n2. **Research Agent Process** 🔍\n - Utilizes Tavily Search for comprehensive research\n\n\n3. **Specialized Analysis** 📊\n - Each agent adds unique value:\n ```\n Research Agent → Deep Research & Context\n ↓\n Finance Agent → Data Analysis & Metrics\n ↓\n Editor Agent → Final Synthesis & Report\n ```\n\n4. **Output Format** 📝\n - Structured report\n - Embedded images and charts\n - Data-backed insights\n - Clear recommendations\n\n## Pro Tips\n\n### Query Construction\n- Include specific points of interest\n- Mention required metrics or data points\n- Specify time frames if relevant\n\n### Flow Customization\n- Modify agent prompts for different use cases\n- Add or remove tools as needed\n\n## Common Applications\n- Investment Research\n- Market Analysis\n- Competitive Intelligence\n- Industry Reports\n- Technology Impact Studies\n\n⚡ **Best Practice**: Start with a test query to understand the flow's capabilities before running complex analyses.\n\n---\n*Note: This flow template uses financial analysis as an example but can be adapted for any research-intensive task requiring multiple perspectives and data sources.*", "display_name": "", @@ -2747,10 +2500,10 @@ }, "dragging": false, "height": 800, - "id": "note-e59F1", + "id": "note-rwLko", "measured": { "height": 800, - "width": 325 + "width": 328 }, "position": { "x": -2122.739127560837, @@ -2771,7 +2524,7 @@ }, { "data": { - "id": "note-7HeUD", + "id": "note-f0wVd", "node": { "description": "## What Are Sequential Task Agents?\nA system where multiple AI agents work in sequence, each specializing in specific tasks and passing their output to the next agent in the chain. Think of it as an assembly line where each agent adds value to the final result.\n\n## How It Works\n1. **First Agent** → **Second Agent** → **Third Agent** → **Final Output**\n - Each agent receives input from the previous one\n - Processes and enhances the information\n - Passes refined output forward\n\n## Key Benefits\n- **Specialization**: Each agent focuses on specific tasks\n- **Progressive Refinement**: Information gets enhanced at each step\n- **Structured Output**: Final result combines multiple perspectives\n- **Quality Control**: Each agent validates and improves previous work\n\n## Building Your Own Sequence\n1. **Plan Your Chain**\n - Identify distinct tasks\n - Determine logical order\n - Define input/output requirements\n\n2. **Configure Agents**\n - Give each agent clear instructions\n - Ensure compatible outputs/inputs\n - Set appropriate tools for each agent\n\n3. **Connect the Flow**\n - Link agents in proper order\n - Test data flow between agents\n - Verify final output format\n\n## Example Applications\n- Research → Analysis → Report Writing\n- Data Collection → Processing → Visualization\n- Content Research → Writing → Editing\n- Market Analysis → Financial Review → Investment Advice\n\n⭐ **Pro Tip**: The strength of sequential agents comes from how well they complement each other's capabilities.\n\nThis template uses financial analysis as an example, but you can adapt it for any multi-step process requiring different expertise at each stage.", "display_name": "", @@ -2784,10 +2537,10 @@ }, "dragging": false, "height": 800, - "id": "note-7HeUD", + "id": "note-f0wVd", "measured": { "height": 800, - "width": 325 + "width": 328 }, "position": { "x": -1456.0688717707517, @@ -2810,7 +2563,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Researcher Agent", - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "node": { "base_classes": [ "Message" @@ -2949,7 +2702,7 @@ "input_types": [ "Message" ], - "load_from_db": true, + "load_from_db": false, "name": "api_key", "password": true, "placeholder": "", @@ -3370,10 +3123,10 @@ }, "dragging": false, "height": 650, - "id": "Agent-AngMf", + "id": "Agent-i5i7H", "measured": { "height": 650, - "width": 320 + "width": 360 }, "position": { "x": -715.1798010873374, @@ -3389,7 +3142,7 @@ }, { "data": { - "id": "note-RNWTM", + "id": "note-MGiP3", "node": { "description": "## Get your API key at [https://tavily.com](https://tavily.com)\n", "display_name": "", @@ -3402,10 +3155,10 @@ }, "dragging": false, "height": 324, - "id": "note-RNWTM", + "id": "note-MGiP3", "measured": { "height": 324, - "width": 325 + "width": 328 }, "position": { "x": -1144.3898055225054, @@ -3426,7 +3179,7 @@ }, { "data": { - "id": "note-Rv3Gc", + "id": "note-Luc39", "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": "", @@ -3439,10 +3192,10 @@ }, "dragging": false, "height": 324, - "id": "note-Rv3Gc", + "id": "note-Luc39", "measured": { "height": 324, - "width": 325 + "width": 328 }, "position": { "x": -739.4383746675942, @@ -3463,7 +3216,7 @@ }, { "data": { - "id": "YfinanceComponent-gHp4w", + "id": "YfinanceComponent-FS7QO", "node": { "base_classes": [ "Data", @@ -3710,21 +3463,21 @@ "type": "YfinanceComponent" }, "dragging": true, - "id": "YfinanceComponent-gHp4w", + "id": "YfinanceComponent-FS7QO", "measured": { - "height": 517, - "width": 320 + "height": 581, + "width": 360 }, "position": { "x": -347.05382068428014, "y": -950.8279673971418 }, - "selected": true, + "selected": false, "type": "genericNode" }, { "data": { - "id": "CalculatorComponent-ZUJg0", + "id": "CalculatorComponent-RNHql", "node": { "base_classes": [ "Data" @@ -3899,10 +3652,10 @@ "type": "CalculatorComponent" }, "dragging": false, - "id": "CalculatorComponent-ZUJg0", + "id": "CalculatorComponent-RNHql", "measured": { - "height": 333, - "width": 320 + "height": 374, + "width": 360 }, "position": { "x": 418.5430081507146, @@ -3910,12 +3663,330 @@ }, "selected": false, "type": "genericNode" + }, + { + "data": { + "id": "TavilySearchComponent-uLUDV", + "node": { + "base_classes": [ + "Data", + "Message" + ], + "beta": false, + "category": "tools", + "conditional_paths": [], + "custom_fields": {}, + "description": "**Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "display_name": "Tavily AI Search", + "documentation": "", + "edited": false, + "field_order": [ + "api_key", + "query", + "search_depth", + "topic", + "max_results", + "include_images", + "include_answer" + ], + "frozen": false, + "icon": "TavilyIcon", + "key": "TavilySearchComponent", + "legacy": false, + "metadata": {}, + "minimized": false, + "output_types": [], + "outputs": [ + { + "cache": true, + "display_name": "Toolset", + "hidden": null, + "method": "to_toolkit", + "name": "component_as_tool", + "required_inputs": null, + "selected": "Tool", + "types": [ + "Tool" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "score": 0.0075846556637275304, + "template": { + "_type": "Component", + "api_key": { + "_input_type": "SecretStrInput", + "advanced": false, + "display_name": "Tavily API Key", + "dynamic": false, + "info": "Your Tavily API Key.", + "input_types": [ + "Message" + ], + "load_from_db": false, + "name": "api_key", + "password": true, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "str", + "value": "" + }, + "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": "import httpx\nfrom loguru import logger\n\nfrom langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output, SecretStrInput\nfrom langflow.schema import Data\nfrom langflow.schema.message import Message\n\n\nclass TavilySearchComponent(Component):\n display_name = \"Tavily AI Search\"\n description = \"\"\"**Tavily AI** is a search engine optimized for LLMs and RAG, \\\n aimed at efficient, quick, and persistent search results.\"\"\"\n icon = \"TavilyIcon\"\n\n inputs = [\n SecretStrInput(\n name=\"api_key\",\n display_name=\"Tavily API Key\",\n required=True,\n info=\"Your Tavily API Key.\",\n ),\n MessageTextInput(\n name=\"query\",\n display_name=\"Search Query\",\n info=\"The search query you want to execute with Tavily.\",\n tool_mode=True,\n ),\n DropdownInput(\n name=\"search_depth\",\n display_name=\"Search Depth\",\n info=\"The depth of the search.\",\n options=[\"basic\", \"advanced\"],\n value=\"advanced\",\n advanced=True,\n ),\n DropdownInput(\n name=\"topic\",\n display_name=\"Search Topic\",\n info=\"The category of the search.\",\n options=[\"general\", \"news\"],\n value=\"general\",\n advanced=True,\n ),\n IntInput(\n name=\"max_results\",\n display_name=\"Max Results\",\n info=\"The maximum number of search results to return.\",\n value=5,\n advanced=True,\n ),\n BoolInput(\n name=\"include_images\",\n display_name=\"Include Images\",\n info=\"Include a list of query-related images in the response.\",\n value=True,\n advanced=True,\n ),\n BoolInput(\n name=\"include_answer\",\n display_name=\"Include Answer\",\n info=\"Include a short answer to original query.\",\n value=True,\n advanced=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"fetch_content\"),\n Output(display_name=\"Text\", name=\"text\", method=\"fetch_content_text\"),\n ]\n\n def fetch_content(self) -> list[Data]:\n try:\n url = \"https://api.tavily.com/search\"\n headers = {\n \"content-type\": \"application/json\",\n \"accept\": \"application/json\",\n }\n payload = {\n \"api_key\": self.api_key,\n \"query\": self.query,\n \"search_depth\": self.search_depth,\n \"topic\": self.topic,\n \"max_results\": self.max_results,\n \"include_images\": self.include_images,\n \"include_answer\": self.include_answer,\n }\n\n with httpx.Client() as client:\n response = client.post(url, json=payload, headers=headers)\n\n response.raise_for_status()\n search_results = response.json()\n\n data_results = []\n\n if self.include_answer and search_results.get(\"answer\"):\n data_results.append(Data(text=search_results[\"answer\"]))\n\n for result in search_results.get(\"results\", []):\n content = result.get(\"content\", \"\")\n data_results.append(\n Data(\n text=content,\n data={\n \"title\": result.get(\"title\"),\n \"url\": result.get(\"url\"),\n \"content\": content,\n \"score\": result.get(\"score\"),\n },\n )\n )\n\n if self.include_images and search_results.get(\"images\"):\n data_results.append(Data(text=\"Images found\", data={\"images\": search_results[\"images\"]}))\n except httpx.HTTPStatusError as exc:\n error_message = f\"HTTP error occurred: {exc.response.status_code} - {exc.response.text}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n except httpx.RequestError as exc:\n error_message = f\"Request error occurred: {exc}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n except ValueError as exc:\n error_message = f\"Invalid response format: {exc}\"\n logger.error(error_message)\n return [Data(text=error_message, data={\"error\": error_message})]\n else:\n self.status = data_results\n return data_results\n\n def fetch_content_text(self) -> Message:\n data = self.fetch_content()\n result_string = data_to_text(\"{text}\", data)\n self.status = result_string\n return Message(text=result_string)\n" + }, + "include_answer": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Include Answer", + "dynamic": false, + "info": "Include a short answer to original query.", + "list": false, + "list_add_label": "Add More", + "name": "include_answer", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "include_images": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Include Images", + "dynamic": false, + "info": "Include a list of query-related images in the response.", + "list": false, + "list_add_label": "Add More", + "name": "include_images", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "max_results": { + "_input_type": "IntInput", + "advanced": true, + "display_name": "Max Results", + "dynamic": false, + "info": "The maximum number of search results to return.", + "list": false, + "list_add_label": "Add More", + "name": "max_results", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "int", + "value": 5 + }, + "query": { + "_input_type": "MessageTextInput", + "advanced": false, + "display_name": "Search Query", + "dynamic": false, + "info": "The search query you want to execute with Tavily.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "query", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": true, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "search_depth": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "display_name": "Search Depth", + "dynamic": false, + "info": "The depth of the search.", + "name": "search_depth", + "options": [ + "basic", + "advanced" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "advanced" + }, + "tools_metadata": { + "_input_type": "TableInput", + "advanced": false, + "display_name": "Edit tools", + "dynamic": false, + "info": "", + "is_list": true, + "list_add_label": "Add More", + "name": "tools_metadata", + "placeholder": "", + "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", + "value": [ + { + "description": "fetch_content(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "name": "TavilySearchComponent-fetch_content", + "tags": [ + "TavilySearchComponent-fetch_content" + ] + }, + { + "description": "fetch_content_text(api_key: Message) - **Tavily AI** is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.", + "name": "TavilySearchComponent-fetch_content_text", + "tags": [ + "TavilySearchComponent-fetch_content_text" + ] + } + ] + }, + "topic": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "display_name": "Search Topic", + "dynamic": false, + "info": "The category of the search.", + "name": "topic", + "options": [ + "general", + "news" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "general" + } + }, + "tool_mode": true + }, + "showNode": true, + "type": "TavilySearchComponent" + }, + "dragging": false, + "id": "TavilySearchComponent-uLUDV", + "measured": { + "height": 489, + "width": 360 + }, + "position": { + "x": -1138.848513020278, + "y": -764.5604109436156 + }, + "selected": false, + "type": "genericNode" } ], "viewport": { - "x": 686.0720439459279, - "y": 1171.2612829417405, - "zoom": 0.6863456377538562 + "x": 1043.611076363603, + "y": 930.7679466669072, + "zoom": 0.5467702171368981 } }, "description": "This Agent is designed to systematically execute a series of tasks following a meticulously predefined sequence. By adhering to this structured order, the Agent ensures that each task is completed efficiently and effectively, optimizing overall performance and maintaining a high level of accuracy.", 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 5611012c4..528ea7f11 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 @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-Hr2If", + "id": "ChatInput-GnVa9", "name": "message", "output_types": [ "Message" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-BStBJ", + "id": "Agent-3ilRg", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-Hr2If{œdataTypeœ:œChatInputœ,œidœ:œChatInput-Hr2Ifœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-BStBJ{œfieldNameœ:œinput_valueœ,œidœ:œAgent-BStBJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-GnVa9{œdataTypeœ:œChatInputœ,œidœ:œChatInput-GnVa9œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-3ilRg{œfieldNameœ:œinput_valueœ,œidœ:œAgent-3ilRgœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-Hr2If", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-Hr2Ifœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-BStBJ", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-BStBJœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-GnVa9", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-GnVa9œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-3ilRg", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-3ilRgœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-BStBJ", + "id": "Agent-3ilRg", "name": "response", "output_types": [ "Message" @@ -43,26 +43,26 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-c2K0x", + "id": "ChatOutput-KeRVx", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Agent-BStBJ{œdataTypeœ:œAgentœ,œidœ:œAgent-BStBJœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-c2K0x{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-c2K0xœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Agent-3ilRg{œdataTypeœ:œAgentœ,œidœ:œAgent-3ilRgœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-KeRVx{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-KeRVxœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Agent-BStBJ", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-BStBJœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-c2K0x", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-c2K0xœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Agent-3ilRg", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-3ilRgœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-KeRVx", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-KeRVxœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "className": "", "data": { "sourceHandle": { "dataType": "CalculatorComponent", - "id": "CalculatorComponent-RGZ02", + "id": "CalculatorComponent-sh2uy", "name": "component_as_tool", "output_types": [ "Tool" @@ -70,18 +70,43 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-BStBJ", + "id": "Agent-3ilRg", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-CalculatorComponent-RGZ02{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-RGZ02œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-BStBJ{œfieldNameœ:œtoolsœ,œidœ:œAgent-BStBJœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "CalculatorComponent-RGZ02", - "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-RGZ02œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-BStBJ", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-BStBJœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-CalculatorComponent-sh2uy{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-sh2uyœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-3ilRg{œfieldNameœ:œtoolsœ,œidœ:œAgent-3ilRgœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "CalculatorComponent-sh2uy", + "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-sh2uyœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-3ilRg", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-3ilRgœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "URL", + "id": "URL-fbsLh", + "name": "component_as_tool", + "output_types": [ + "Tool" + ] + }, + "targetHandle": { + "fieldName": "tools", + "id": "Agent-3ilRg", + "inputTypes": [ + "Tool" + ], + "type": "other" + } + }, + "id": "xy-edge__URL-fbsLh{œdataTypeœ:œURLœ,œidœ:œURL-fbsLhœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-3ilRg{œfieldNameœ:œtoolsœ,œidœ:œAgent-3ilRgœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "source": "URL-fbsLh", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-fbsLhœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-3ilRg", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-3ilRgœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" } ], "nodes": [ @@ -89,7 +114,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Agent", - "id": "Agent-BStBJ", + "id": "Agent-3ilRg", "node": { "base_classes": [ "Message" @@ -648,10 +673,10 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-BStBJ", + "id": "Agent-3ilRg", "measured": { - "height": 621, - "width": 320 + "height": 698, + "width": 360 }, "position": { "x": 1652.2479633316434, @@ -662,7 +687,7 @@ }, { "data": { - "id": "ChatInput-Hr2If", + "id": "ChatInput-GnVa9", "node": { "base_classes": [ "Message" @@ -942,10 +967,10 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-Hr2If", + "id": "ChatInput-GnVa9", "measured": { - "height": 229, - "width": 320 + "height": 257, + "width": 360 }, "position": { "x": 1241.9566260691947, @@ -958,7 +983,7 @@ "data": { "description": "Display a chat message in the Playground.", "display_name": "Chat Output", - "id": "ChatOutput-c2K0x", + "id": "ChatOutput-KeRVx", "node": { "base_classes": [ "Message" @@ -1217,10 +1242,10 @@ }, "type": "ChatOutput" }, - "id": "ChatOutput-c2K0x", + "id": "ChatOutput-KeRVx", "measured": { - "height": 229, - "width": 320 + "height": 257, + "width": 360 }, "position": { "x": 2029.726227044409, @@ -1233,7 +1258,7 @@ "data": { "description": "Load and retrive data from specified URLs.", "display_name": "URL", - "id": "URL-Cns6P", + "id": "URL-fbsLh", "node": { "base_classes": [ "Data", @@ -1442,21 +1467,21 @@ "type": "URL" }, "dragging": false, - "id": "URL-Cns6P", + "id": "URL-fbsLh", "measured": { - "height": 403, - "width": 320 + "height": 453, + "width": 360 }, "position": { "x": 1225.8773509111968, "y": 27.333577318641687 }, - "selected": true, + "selected": false, "type": "genericNode" }, { "data": { - "id": "note-gIi2r", + "id": "note-159PR", "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": "", @@ -1468,10 +1493,10 @@ "type": "note" }, "dragging": false, - "id": "note-gIi2r", + "id": "note-159PR", "measured": { - "height": 325, - "width": 325 + "height": 328, + "width": 328 }, "position": { "x": 775.5268622081468, @@ -1482,7 +1507,7 @@ }, { "data": { - "id": "note-E1ls9", + "id": "note-ELRXf", "node": { "description": "### 💡 Add your OpenAI API key here👇", "display_name": "", @@ -1493,10 +1518,10 @@ }, "type": "note" }, - "id": "note-E1ls9", + "id": "note-ELRXf", "measured": { - "height": 324, - "width": 324 + "height": 326, + "width": 326 }, "position": { "x": 1648.6876745095624, @@ -1507,7 +1532,7 @@ }, { "data": { - "id": "CalculatorComponent-RGZ02", + "id": "CalculatorComponent-sh2uy", "node": { "base_classes": [ "Data" @@ -1683,10 +1708,10 @@ "type": "CalculatorComponent" }, "dragging": false, - "id": "CalculatorComponent-RGZ02", + "id": "CalculatorComponent-sh2uy", "measured": { - "height": 333, - "width": 320 + "height": 374, + "width": 360 }, "position": { "x": 1233.166256931297, @@ -1697,9 +1722,9 @@ } ], "viewport": { - "x": -573.0285266811966, - "y": 96.72381189311284, - "zoom": 0.8223516559988604 + "x": -311.5761975342741, + "y": 21.53149314357762, + "zoom": 0.7039413065053529 } }, "description": "A simple but powerful starter agent.",