Skip to main content

Build flows

A flow is a functional representation of an application workflow. Flows receive input, process it, and produce output.

Flows consist of components that represent individual steps in your application's workflow.

Basic prompting flow within the Workspace

Langflow flows are fully serializable and can be saved and loaded from the file system where Langflow is installed.

tip

To try building and running a flow in a few minutes, see the Langflow quickstart.

Create a flow

There are four ways to create a flow in the Langflow UI:

  • Create a blank flow: From the Projects page, select a project, and then click New Flow.
  • Create a flow from a template: From the Projects page, select a project, and then click New Flow.
  • Duplicate an existing flow: From the Projects page, locate the flow you want to copy, click More, and then select Duplicate.
  • Import a flow: See Import and export flows.

You can also create a flow with the Langflow API, but the Langflow team recommends using the visual editor until you are familiar with flow creation.

Add components

Flows consist of components, which are nodes that you configure and connect in the Langflow visual editor. Each component performs a specific task, like serving an AI model or connecting a data source.

Drag and drop components from the Components menu to add them to your flow. Then, configure the component settings and connect the components together.

Chat input and output connected to Language model component

Each component has configuration settings and options. Some of these are common to all components, and some are unique to specific components.

To form a cohesive flow, you connect components by edges or ports, which have a specific data type they receive or send. For example, message ports send text strings between components.

For more information about component configuration, including port types and underlying component code, see Components overview.

Run a flow

After you build a flow, you can test it in the Playground, and then publish your flow to embed or share your flow. For more information about application development with Langflow, see Develop an application with Langflow.

If you need to build Langflow as a dependency of an application or deploy a Langflow server for API access over the public internet, see Langflow deployment overview.

Flow graphs

When a flow runs, Langflow builds a Directed Acyclic Graph (DAG) object from the nodes (components) and edges (connections), and the nodes are sorted to determine the order of execution.

The graph build calls each component's def_build function to validate and prepare the nodes. This graph is then processed in dependency order. Each node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on that node's results.

Manage flows in projects

The Projects page is where you arrive when you launch Langflow. It is where you view and manage flows on a high level.

Langflow projects are like folders that you can use to organize related flows. The default project is Starter Project, and your flows are stored here unless you create another project. To create a project, click Create new project.

Projects page with multiple flows in a project

From the Projects page, you can manage flows within each of your projects:

  • View flows in a project: Select the project name in the Projects list.
  • Create flows: See Create a flow.
  • Edit a flow's name and description: Locate the flow you want to edit, click More, and then select Edit details.
  • Delete a flow: Locate the flow you want to delete, click More, and then select Delete.
  • Serve flows as MCP tools: See Use Langflow as an MCP server.

Flow storage

Flows and flow logs are stored on local disk at the following default locations:

  • Linux and WSL: home/<username>/.cache/langflow/
  • macOS: /Users/<username>/Library/Caches/langflow/
  • Windows: %LOCALAPPDATA%\langflow\langflow\Cache

The flow storage location can be customized with the LANGFLOW_CONFIG_DIR environment variable.

Flow logs

When viewing a flow in the Workspace, click Logs to examine logs for that flow and its components.

Logs pane

Langflow logs are stored in .log files in the same place as your flows. For filepaths, see Flow storage.

The flow storage location can be customized with the LANGFLOW_CONFIG_DIR environment variable:

  1. Add LANGFLOW_LOG_FILE=path/to/logfile.log in your .env file.

    An example .env file is available in the Langflow repository.

  2. Start Langflow with the values from your .env file by running uv run langflow run --env-file .env.

See also

Search