Files
langflow/components-logic.html
github-merge-queue[bot] dff8ebb9fa deploy: d4fca1fe40
2025-06-20 18:43:03 +00:00

193 lines
52 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-Components/components-logic" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.7.0">
<title data-rh="true">Logic | Langflow Documentation</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.langflow.org/components-logic"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Logic | Langflow Documentation"><meta data-rh="true" name="description" content="Logic components provide functionalities for routing, conditional processing, and flow management."><meta data-rh="true" property="og:description" content="Logic components provide functionalities for routing, conditional processing, and flow management."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.langflow.org/components-logic"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-logic" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-logic" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://UZK6BDPCVY-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLQFLQ3KPT"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SLQFLQ3KPT",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Langflow Documentation" href="/opensearch.xml">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&amp;display=swap">
<script>!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/datastax/langflow_org_web/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}()</script>
<script defer="true">!function(){const e=e=>{if(window.gtag&&e.purposes&&"analytics"in e.purposes&&"targeted_advertising"in e.purposes){const n=!0===e.purposes.analytics?"granted":"denied",t=!0===e.purposes.targeted_advertising?"granted":"denied",a={analytics_storage:n,ad_personalization:t,ad_storage:t,ad_user_data:t};window.gtag("consent","update",a)}};window.ketch&&window.ketch("on","consent",e)}()</script><link rel="stylesheet" href="/assets/css/styles.556d0cc8.css">
<script src="/assets/js/runtime~main.36d0d05a.js" defer="defer"></script>
<script src="/assets/js/main.01cab6af.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();null!==e?t(e):window.matchMedia("(prefers-color-scheme: dark)").matches?t("dark"):(window.matchMedia("(prefers-color-scheme: light)").matches,t("light"))}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/langflow-ai/langflow" target="_blank" class="navbar__item navbar__link header-github-link"></a><a href="https://twitter.com/langflow_ai" target="_blank" class="navbar__item navbar__link header-twitter-link"></a><a href="https://discord.gg/EqksyE2EX9" target="_blank" class="navbar__item navbar__link header-discord-link"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite" aria-pressed="false"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd sidebarWithHideableNavbar_wUlq"><a tabindex="-1" class="sidebarLogo_isFc" href="/"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></a><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">Welcome to Langflow</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/get-started-installation">Get started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/basic-prompting">Templates</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-overview">Concepts</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/components-agents">Components</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-agents">Agents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-bundle-components">Bundles</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-custom-components">Create custom Python components</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-data">Data</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-embedding-models">Embeddings</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-helpers">Helpers</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-io">Inputs and outputs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/components-logic">Logic</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-memories">Memories</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-models">Models</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-processing">Processing</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-prompts">Prompts</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-tools">Tools</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-vector-stores">Vector stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/agents-overview">Agents</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/mcp-server">Model Context Protocol (MCP)</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/configuration-api-keys">Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/develop-overview">Develop</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deployment-overview">Deployment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/integrations-apify">Integrations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/contributing-community">Contributing</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a href="https://github.com/langflow-ai/langflow/releases/latest" target="_blank" rel="noopener noreferrer" class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false">Changelog</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/luna-for-langflow">Support</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 sidebar-ad">
<a href="https://astra.datastax.com/signup?type=langflow" target="_blank" class="menu__link">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></svg>
<div class="sidebar-ad-text-container">
<span class="sidebar-ad-text">Use Langflow in the cloud</span>
<span class="sidebar-ad-text sidebar-ad-text-gradient">Sign up for DataStax Langflow</span>
</div>
</a>
</li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Components</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Logic</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><style>[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }</style>
<header><h1>Logic components in Langflow</h1></header>
<p>Logic components provide functionalities for routing, conditional processing, and flow management.</p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="use-a-logic-component-in-a-flow">Use a logic component in a flow<a href="#use-a-logic-component-in-a-flow" class="hash-link" aria-label="Direct link to Use a logic component in a flow" title="Direct link to Use a logic component in a flow"></a></h2>
<p>This flow creates a summarizing &quot;for each&quot; loop with the <a href="/components-logic#loop">Loop</a> component.</p>
<p>The component iterates over a list of <a href="/concepts-objects#data-object">Data</a> objects until it&#x27;s completed, and then the <strong>Done</strong> loop aggregates the results.</p>
<p>The <strong>File</strong> component loads text files from your local machine, and then the <strong>Parser</strong> component parses them into a list of structured <code>Data</code> objects.
The <strong>Loop</strong> component passes each <code>Data</code> object to a <strong>Prompt</strong> to be summarized.</p>
<p>When the <strong>Loop</strong> component runs out of <code>Data</code>, the <strong>Done</strong> loop activates, which counts the number of pages and summarizes their tone with another <strong>Prompt</strong>.
This is represented in Langflow by connecting the Parser component&#x27;s <strong>Data List</strong> output to the Loop component&#x27;s <code>Data</code> loop input.</p>
<p><img decoding="async" loading="lazy" alt="Sample Flow looping summarizer" src="/assets/images/loop-text-summarizer-bd1d7be6d26bb47765931e3ab9f98dfa.png" width="2676" height="1512" class="img_ev3q"></p>
<p>The output is similar to this:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Document Summary</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Total Pages Processed</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Total Pages: 2</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Overall Tone of Document</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Tone: Informative and Instructional</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>The documentation outlines microservices architecture patterns and best practices.</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>It emphasizes service isolation and inter-service communication protocols.</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>The use of asynchronous messaging patterns is recommended for system scalability.</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>It includes code examples of REST and gRPC implementations to demonstrate integration approaches.</span></div></div><br></code></div></div>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="conditional-router-if-else-component">Conditional router (If-Else component)<a href="#conditional-router-if-else-component" class="hash-link" aria-label="Direct link to Conditional router (If-Else component)" title="Direct link to Conditional router (If-Else component)"></a></h2>
<p>This component routes messages by comparing two strings.
It evaluates a condition by comparing two text inputs using the specified operator and routes the message to <code>true_result</code> or <code>false_result</code>.</p>
<p>The operator looks for single strings based on your defined <a href="#operator-behavior">operator behavior</a>, but it can also search for multiple words by regex matching.</p>
<p>To use the <strong>Conditional router</strong> component to check incoming messages with regex matching, do the following:</p>
<ol>
<li>Connect the <strong>If-Else</strong> component&#x27;s <strong>Text Input</strong> port to a <strong>Chat Input</strong> component.</li>
<li>In the If-Else component, enter the following values.</li>
</ol>
<ul>
<li>In the <strong>Match Text</strong> field, enter <code>.*(urgent|warning|caution).*</code>. The component looks for these values. The regex match is case sensitive, so to look for all permutations of <code>warning</code>, enter <code>warning|Warning|WARNING</code>.</li>
<li>In the <strong>Operator</strong> field, enter <code>regex</code>. The component looks for the strings <code>urgent</code>, <code>warning</code>, and <code>caution</code>. For more operators, see <a href="#operator-behavior">Operator behavior</a>.</li>
<li>In the <strong>Message</strong> field, enter <code>New Message Detected</code>. This field is optional. The message is sent to both the <strong>True</strong> and <strong>False</strong> ports.
The component is now set up to send a <code>New Message Detected</code> message out of its <strong>True</strong> port if it matches any of the strings.
If no strings are detected, it sends a message out of the <strong>False</strong> port.</li>
</ul>
<ol start="3">
<li>Create two identical flows to process the messages. Connect an <strong>Open AI</strong> component, a <strong>Prompt</strong>, and a <strong>Chat Output</strong> component together.</li>
<li>Connect one chain to the <strong>If-Else</strong> component&#x27;s <strong>True</strong> port, and one chain to the <strong>False</strong> port.</li>
</ol>
<p>The flow looks like this:</p>
<p><img decoding="async" loading="lazy" alt="A conditional router connected to two OpenAI components" src="/assets/images/component-conditional-router-be8cad83b612bf7c86bc861a1842fda3.png" width="1888" height="1754" class="img_ev3q"></p>
<ol start="5">
<li>Add your <strong>OpenAI API key</strong> to both <strong>OpenAI</strong> components.</li>
<li>In both <strong>Prompt</strong> components, enter the behavior you want each route to take.
When a match is found:</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Send a message that a new message has been received and added to the Urgent queue.</span></div></div><br></code></div></div>
<p>When a match is not found:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Send a message that a new message has been received and added to the backlog.</span></div></div><br></code></div></div>
<ol start="7">
<li>Open the <strong>Playground</strong>.</li>
<li>Send the flow some messages. Your messages route differently based on the if-else component&#x27;s evaluation.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>User</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>A new user was created.</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>AI</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>A new message has been received and added to the backlog.</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>User</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>Sign-in warning: new user locked out.</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>AI</span></div></div><div><span class="ch-code-line-number">_<!-- -->11</span><div style="display:inline-block;margin-left:16px"><span>A new message has been received and added to the Urgent queue. Please review it at your earliest convenience.</span></div></div><br></code></div></div>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>input_text</td><td>String</td><td>The primary text input for the operation.</td></tr><tr><td>match_text</td><td>String</td><td>The text to compare against.</td></tr><tr><td>operator</td><td>Dropdown</td><td>The operator used to compare texts. Options include equals, not equals, contains, starts with, ends with, and regex. The default is equals.</td></tr><tr><td>case_sensitive</td><td>Boolean</td><td>When set to true, the comparison is case sensitive. This setting does not apply to regex comparison. The default is false.</td></tr><tr><td>message</td><td>Message</td><td>The message to pass through either route.</td></tr><tr><td>max_iterations</td><td>Integer</td><td>The maximum number of iterations allowed for the conditional router. The default is 10.</td></tr><tr><td>default_route</td><td>Dropdown</td><td>The route to take when max iterations are reached. Options include true_result or false_result. The default is false_result.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>true_result</td><td>Message</td><td>The output produced when the condition is true.</td></tr><tr><td>false_result</td><td>Message</td><td>The output produced when the condition is false.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="operator-behavior">Operator Behavior<a href="#operator-behavior" class="hash-link" aria-label="Direct link to Operator Behavior" title="Direct link to Operator Behavior"></a></h3>
<p>The <strong>If-else</strong> component includes a comparison operator to compare the values in <code>input_text</code> and <code>match_text</code>.</p>
<p>All options respect the <code>case_sensitive</code> setting except <strong>regex</strong>.</p>
<ul>
<li><strong>equals</strong>: Exact match comparison.</li>
<li><strong>not equals</strong>: Inverse of exact match.</li>
<li><strong>contains</strong>: Checks if match_text is found within input_text.</li>
<li><strong>starts with</strong>: Checks if input_text begins with match_text.</li>
<li><strong>ends with</strong>: Checks if input_text ends with match_text.</li>
<li><strong>regex</strong>: Performs regular expression matching. It is always case sensitive and ignores the case_sensitive setting.</li>
</ul>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="listen">Listen<a href="#listen" class="hash-link" aria-label="Direct link to Listen" title="Direct link to Listen"></a></h2>
<p>This component listens for a notification and retrieves its associated state.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>The name of the notification to listen for.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>output</td><td>Data</td><td>The state associated with the notification.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="loop">Loop<a href="#loop" class="hash-link" aria-label="Direct link to Loop" title="Direct link to Loop"></a></h2>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_BuS1"><p>For another <strong>Loop</strong> component example, see the <strong>Research Translation Loop</strong> template.</p></div></div>
<p>This component iterates over a list of <a href="/concepts-objects#data-object">Data</a> objects, outputting one item at a time and aggregating results from loop inputs.</p>
<p>In this example, the <strong>Loop</strong> component iterates over a CSV file through the <strong>Item</strong> port until there are no rows left to process. Then, the <strong>Loop</strong> component performs the actions connected to the <strong>Done</strong> port, which in this case is loading the structured data into <strong>Chroma DB</strong>.</p>
<p>Think of it this way: the <strong>Item</strong> port forms the &quot;main&quot; loop that repeats until a &quot;complete&quot; condition is reached.</p>
<ol>
<li>The <strong>Loop</strong> component accepts <strong>Data</strong> from the <strong>Load CSV</strong> component, and outputs the data from the <strong>Item</strong> port.</li>
<li>Each CSV row is converted to a <strong>Message</strong> and processed into structured data with the <strong>Structured Output</strong> component.
The dotted line connected from the <strong>Structured Output</strong> component&#x27;s <strong>Looping</strong> port tells you where the loop begins again.</li>
<li>The <strong>Loop</strong> component repeatedly extracts rows by <strong>Text Key</strong> until there are no more rows to extract.</li>
</ol>
<p>Once all items are processed, the action connected to the <strong>Done</strong> port is performed.
In this example, the data is loaded into <strong>Chroma DB</strong>.</p>
<p><img decoding="async" loading="lazy" alt="Loop CSV parser" src="/assets/images/component-loop-csv-5e6704f4f2b8d511b70336ff3ddc1328.png" width="3008" height="3172" class="img_ev3q"></p>
<p>Follow along with this step-by-step video guide for creating this flow and adding agentic RAG: <a href="https://www.youtube.com/watch?v=9Wx7WODSKTo" target="_blank" rel="noopener noreferrer">Mastering the Loop Component &amp; Agentic RAG in Langflow</a>.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>Data/List</td><td>The initial list of Data objects to process.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>item</td><td>Data</td><td>The current item being processed from the data list.</td></tr><tr><td>done</td><td>Data</td><td>The aggregated results after all items are processed.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="notify">Notify<a href="#notify" class="hash-link" aria-label="Direct link to Notify" title="Direct link to Notify"></a></h2>
<p>This component generates a notification for the Listen component to use.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>The name of the notification.</td></tr><tr><td>data</td><td>Data</td><td>The data to store in the notification.</td></tr><tr><td>append</td><td>Boolean</td><td>When set to true, the record is added to the existing notification.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>output</td><td>Data</td><td>The data stored in the notification.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="pass">Pass<a href="#pass" class="hash-link" aria-label="Direct link to Pass" title="Direct link to Pass"></a></h2>
<p>This component forwards the input message, unchanged.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>input_message</td><td>Input Message</td><td>The message to forward.</td></tr><tr><td>ignored_message</td><td>Ignored Message</td><td>A second message that is ignored. Used as a workaround for continuity.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>output_message</td><td>Output Message</td><td>The forwarded message from the input.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="run-flow">Run flow<a href="#run-flow" class="hash-link" aria-label="Direct link to Run flow" title="Direct link to Run flow"></a></h2>
<p>This component allows you to run any flow stored in your Langflow database without opening the flow editor.</p>
<p>The Run Flow component can also be used as a tool when connected to an <a href="/components-agents">Agent</a>. The <code>name</code> and <code>description</code> metadata that the Agent uses to register the tool are created automatically.</p>
<p>When you select a flow, the component fetches the flow&#x27;s graph structure and uses it to generate the inputs and outputs for the Run Flow component.</p>
<p>To use the Run Flow component as a tool, do the following:</p>
<ol>
<li>Add the <strong>Run Flow</strong> component to the <a href="/simple-agent">Simple Agent</a> flow.</li>
<li>In the <strong>Flow Name</strong> menu, select the sub-flow you want to run.
The appearance of the <strong>Run Flow</strong> component changes to reflect the inputs and outputs of the selected flow.</li>
<li>On the <strong>Run Flow</strong> component, enable <strong>Tool Mode</strong>.</li>
<li>Connect the <strong>Run Flow</strong> component to the <strong>Toolset</strong> input of the Agent.
Your flow should now look like this:
<img decoding="async" loading="lazy" alt="Run Flow component" src="/assets/images/component-run-flow-78e94e2ede1b4b853f0e4de6b9561f6f.png" width="2036" height="1582" class="img_ev3q"></li>
<li>Run the flow. The Agent uses the Run Flow component as a tool to run the selected sub-flow.</li>
</ol>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>flow_name_selected</td><td>Dropdown</td><td>The name of the flow to run.</td></tr><tr><td>flow_tweak_data</td><td>Dict</td><td>Dictionary of tweaks to customize the flow&#x27;s behavior.</td></tr><tr><td>dynamic inputs</td><td>Various</td><td>Additional inputs that are generated based on the selected flow.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>run_outputs</td><td>A <code>List</code> of types <code>Data</code>, <code>Message,</code> or <code>DataFrame</code></td><td>All outputs are generated from running the flow.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="legacy-components">Legacy components<a href="#legacy-components" class="hash-link" aria-label="Direct link to Legacy components" title="Direct link to Legacy components"></a></h2>
<p><strong>Legacy</strong> components are available for use but are no longer supported.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="data-conditional-router">Data Conditional Router<a href="#data-conditional-router" class="hash-link" aria-label="Direct link to Data Conditional Router" title="Direct link to Data Conditional Router"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is in <strong>Legacy</strong>, which means it is no longer in active development as of Langflow version 1.3.</p></div></div>
<p>This component routes <code>Data</code> objects based on a condition applied to a specified key, including boolean validation. It can process either a single Data object or a list of Data objects.</p>
<p>This component is particularly useful in workflows that require conditional routing of complex data structures, enabling dynamic decision-making based on data content.</p>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="inputs">Inputs<a href="#inputs" class="hash-link" aria-label="Direct link to Inputs" title="Direct link to Inputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data_input</td><td>Data</td><td>The Data object or list of Data objects to process. This input can handle both single items and lists.</td></tr><tr><td>key_name</td><td>String</td><td>The name of the key in the Data object to check.</td></tr><tr><td>operator</td><td>Dropdown</td><td>The operator to apply. Options: &quot;equals&quot;, &quot;not equals&quot;, &quot;contains&quot;, &quot;starts with&quot;, &quot;ends with&quot;, &quot;boolean validator&quot;. Default: &quot;equals&quot;.</td></tr><tr><td>compare_value</td><td>String</td><td>The value to compare against. Not shown/used when operator is &quot;boolean validator&quot;.</td></tr></tbody></table>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="outputs">Outputs<a href="#outputs" class="hash-link" aria-label="Direct link to Outputs" title="Direct link to Outputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>true_output</td><td>Data/List</td><td>Output when the condition is met.</td></tr><tr><td>false_output</td><td>Data/List</td><td>Output when the condition is not met.</td></tr></tbody></table>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="operator-behavior-1">Operator behavior<a href="#operator-behavior-1" class="hash-link" aria-label="Direct link to Operator behavior" title="Direct link to Operator behavior"></a></h4>
<ul>
<li><strong>equals</strong>: Exact match comparison between the key&#x27;s value and compare_value.</li>
<li><strong>not equals</strong>: Inverse of exact match.</li>
<li><strong>contains</strong>: Checks if compare_value is found within the key&#x27;s value.</li>
<li><strong>starts with</strong>: Checks if the key&#x27;s value begins with compare_value.</li>
<li><strong>ends with</strong>: Checks if the key&#x27;s value ends with compare_value.</li>
<li><strong>boolean validator</strong>: Treats the key&#x27;s value as a boolean. The following values are considered true:<!-- -->
<ul>
<li>Boolean <code>true</code>.</li>
<li>Strings: &quot;true&quot;, &quot;1&quot;, &quot;yes&quot;, &quot;y&quot;, &quot;on&quot; (case-insensitive).</li>
<li>Any other value is converted using Python&#x27;s <code>bool()</code> function.</li>
</ul>
</li>
</ul>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="list-processing">List processing<a href="#list-processing" class="hash-link" aria-label="Direct link to List processing" title="Direct link to List processing"></a></h4>
<p>The following actions occur when processing a list of Data objects:</p>
<ul>
<li>Each object in the list is evaluated individually</li>
<li>Objects meeting the condition go to true_output</li>
<li>Objects not meeting the condition go to false_output</li>
<li>If all objects go to one output, the other output is empty</li>
</ul>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="deprecated-components">Deprecated components<a href="#deprecated-components" class="hash-link" aria-label="Direct link to Deprecated components" title="Direct link to Deprecated components"></a></h2>
<p>Deprecated components have been replaced by newer alternatives and should not be used in new projects.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="flow-as-tool">Flow as tool<a href="#flow-as-tool" class="hash-link" aria-label="Direct link to Flow as tool" title="Direct link to Flow as tool"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.1.2.
Instead, use the <a href="/components-logic#run-flow">Run flow component</a></p></div></div>
<p>This component constructs a tool from a function that runs a loaded flow.</p>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="inputs-1">Inputs<a href="#inputs-1" class="hash-link" aria-label="Direct link to Inputs" title="Direct link to Inputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>flow_name</td><td>Dropdown</td><td>The name of the flow to run.</td></tr><tr><td>tool_name</td><td>String</td><td>The name of the tool.</td></tr><tr><td>tool_description</td><td>String</td><td>The description of the tool.</td></tr><tr><td>return_direct</td><td>Boolean</td><td>If true, returns the result directly from the tool.</td></tr></tbody></table>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="outputs-1">Outputs<a href="#outputs-1" class="hash-link" aria-label="Direct link to Outputs" title="Direct link to Outputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>api_build_tool</td><td>Tool</td><td>The constructed tool from the flow.</td></tr></tbody></table>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="sub-flow">Sub flow<a href="#sub-flow" class="hash-link" aria-label="Direct link to Sub flow" title="Direct link to Sub flow"></a></h3>
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.1.2.
Instead, use the <a href="/components-logic#run-flow">Run flow component</a></p></div></div>
<p>This <code>SubFlowComponent</code> generates a component from a flow with all of its inputs and outputs.</p>
<p>This component can integrate entire flows as components within a larger workflow. It dynamically generates inputs based on the selected flow and executes the flow with provided parameters.</p>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="inputs-2">Inputs<a href="#inputs-2" class="hash-link" aria-label="Direct link to Inputs" title="Direct link to Inputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>flow_name</td><td>Dropdown</td><td>The name of the flow to run.</td></tr></tbody></table>
<h4 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="outputs-2">Outputs<a href="#outputs-2" class="hash-link" aria-label="Direct link to Outputs" title="Direct link to Outputs"></a></h4>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>flow_outputs</td><td>List[Data]</td><td>The outputs generated from the flow.</td></tr></tbody></table></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/components-io"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Inputs and outputs</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/components-memories"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Memories</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#use-a-logic-component-in-a-flow" class="table-of-contents__link toc-highlight">Use a logic component in a flow</a></li><li><a href="#conditional-router-if-else-component" class="table-of-contents__link toc-highlight">Conditional router (If-Else component)</a><ul><li><a href="#operator-behavior" class="table-of-contents__link toc-highlight">Operator Behavior</a></li></ul></li><li><a href="#listen" class="table-of-contents__link toc-highlight">Listen</a></li><li><a href="#loop" class="table-of-contents__link toc-highlight">Loop</a></li><li><a href="#notify" class="table-of-contents__link toc-highlight">Notify</a></li><li><a href="#pass" class="table-of-contents__link toc-highlight">Pass</a></li><li><a href="#run-flow" class="table-of-contents__link toc-highlight">Run flow</a></li><li><a href="#legacy-components" class="table-of-contents__link toc-highlight">Legacy components</a><ul><li><a href="#data-conditional-router" class="table-of-contents__link toc-highlight">Data Conditional Router</a></li></ul></li><li><a href="#deprecated-components" class="table-of-contents__link toc-highlight">Deprecated components</a><ul><li><a href="#flow-as-tool" class="table-of-contents__link toc-highlight">Flow as tool</a></li><li><a href="#sub-flow" class="table-of-contents__link toc-highlight">Sub flow</a></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><div class="footer-links">
<span>© 2025 Langflow</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="https://langflow.org/preferences">Manage Privacy Choices</a></span>
</div></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/lf-docs-light.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="160" height="40"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="160" height="40"></div></div></div></footer><div style="position:fixed;right:20px;bottom:20px;z-index:100;display:flex;align-items:center;gap:10px;cursor:pointer"><div style="background-color:#f6f6f6;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)"><img src="/img/langflow-icon-black-transparent.svg" style="width:40px" alt="Search"></div></div></div>
</body>
</html>