Components
A component is a single building block within a flow and consists of inputs, outputs, and parameters that define its functionality.
The handles (circles) on the side of a component indicate the types of inputs and outputs that can be connected at that port. Hover over a handle to see connection details.
Click the
to preview a component’s output.To run a single component, click
Play. A Check indicates that the component ran successfully.To run the entire flow, click
Play on the last component in the flow. A Check on all components indicates that the flow ran successfully.Component handles
Langflow uses handles (circles) of different colors to visually indicate the type of data that can be sent or received.
Click a handle to sort the component menu by compatibility.
Handles with matching colors typically indicate that you can connect those ports. For example, a green handle means Embeddings. You can connect a green output handle to a green input handle to pass embeddings data between components.
The following table lists the handle colors and their corresponding data types:
Data Type | Handle Color | Hex Code |
---|---|---|
BaseLanguageModel |
Fuchsia |
#c026d3 |
Data |
Red |
#dc2626 |
Document |
Lime |
#65a30d |
Embeddings |
Emerald |
#10b981 |
LanguageModel |
Fuchsia |
#c026d3 |
Message |
Indigo |
#4f46e5 |
Prompt |
Violet |
#7c3aed |
str |
Indigo |
#4F46E5 |
Text |
Indigo |
#4F46E5 |
unknown |
Gray |
#9CA3AF |
Component menu
Click on a component to open the component menu.
-
Code: Modify and save component code.
-
Advanced Settings: Modify parameters for the component.
-
Freeze Path: After a component runs, lock its previous output state to prevent it from re-running.
-
All: Open a menu of all component options.
Code
Click the Code button to view and edit the Python code for a component.
Click Check & Save to save your changes.
A validation check will run to ensure that the new code is correct (the equivalent of clicking
Play on the component).Advanced Settings
Langflow components can be edited by clicking the Advanced Settings button.
Hide parameters with the Show button.
To modify a component’s name and description, double-click on them. Component descriptions accept Markdown syntax.
Freeze Path
After a component runs, lock its previous output state to prevent it from re-running.
If you’re expecting consistent output from a component and don’t need to re-run it, click Freeze Path.
This freezes all components downstream of the selected component.
All
Click All to open a menu of all component options.
Menu Item | Shortcut | Description |
---|---|---|
Code |
⌘ + C |
Opens the code editor for the component. |
Advanced |
⌘ + A |
Opens advanced settings for component. |
Save |
⌘ + S |
Saves the current state of the component to Saved components in the sidebar. |
Duplicate |
⌘ + D |
Creates a duplicate of the component. |
Copy |
⌘ + C |
Copies the selected component. Can be pasted in the workspace with ⌘ + V. |
Docs |
⌘ + D |
Opens related documentation. |
Minimize |
⌘ + Q |
Minimizes the current component. |
Freeze |
⌘ + F |
Freezes the current component state. |
Freeze Path |
⌘ + F |
Freezes the current component state and all upstream components. |
Download |
⌘ + D |
Downloads the current component as a JSON file. |
Delete |
⌘ + ⌫ |
Deletes the component. |
Group multiple components
Multiple components can be grouped into a single component for reuse. Combine large flows into single components (like RAG with a vector database, for example) to save space.
-
Hold Shift and drag to select components.
-
Select Group.
-
The components merge into a single component.
-
Double-click the name and description to rename them.
-
Save your grouped component in the sidebar for later use.
Save a component
-
Click
All and select Save. Your component is saved in the sidebar for later use. -
To use the component in another flow, drag it from the sidebar to the workspace.
Update a component version
When you create a new component by moving it from the sidebar to the workspace, the two components are no longer in parity. A component will keep the version number it was initialized to the workspace with.
To update a component to the latest version, do the following:
-
Click the
icon. This will update the version of the component in the workspace. -
Click
Play. A Check indicates that the component ran successfully.