Intermediate 13 minNo-code

Langflow and Ollama: building an AI flow visuel

BestLLMfor — Langflow and Ollama — Visual AI workflow
Direct response

Langflow is an open source platform (MIT license) for building AI agents and flows by connecting blocks on a visual canvas. With Ollama, the Ollama component connects to http://127.0.0.1:11434 and runs the model on your machine, with no API key. Stable version as of November 18, 2026: Langflow 1.13.3, installable with uv, Docker, or Langflow Desktop.

Langflow turns building an agent or a RAG pipeline into a diagram you draw rather than code you write. Paired with Ollama, it runs entirely locally. Here you'll learn how to install Langflow, connect a Ollama model to it, build your first flow, publish it as an API or MCP tool, and secure it.

By Mohamed Meguedmi·Update 2026-12-03·Tested on Windows, macOS, and Linux

#What is Langflow?

Langflow is an open-source platform for building AI agents and flows by connecting blocks on a canvas, then serving them as an API or an MCP server. The code is published under the MIT license on GitHub, and every block can still be modified in Python.

A Langflow flow is a graph of components connected through their inputs and outputs: a chat input, a language model, a prompt template, a file loader, a vector store, an agent and its tools. You draw the path the data follows, and Langflow runs the graph.

Component
A block on the canvas that does a single thing (calling a model, splitting text, reading a file), with its own parameters and input and output ports.
Flow
An assembly of connected components. A flow can be a simple chatbot, a RAG pipeline, or an agent that chooses its own tools.
Playground
The built-in test window. It lets you chat with the flow and, for an agent, display the reasoning and the tools called.
Bundle
A set of components dedicated to a third-party provider, such as Ollama, LM Studio, or vLLM. The Ollama bundle is included when Langflow is installed with the langflow package.

The latest stable version is Langflow 1.13.3, released on November 17, 2026 on the project's GitHub releases page. Development pre-releases of 1.14.0 are published in parallel on PyPI (1.14.0.dev31 on November 18, 2026): they're meant for testing, not for a working installation.

#Why combine Langflow and Ollama?

The complete kit for creating your images with local AI.

Benefit from our experience and a guided path to get comfortable with your tools and create your images locally.

  • Lifetime online access
  • PDF + files
  • Refunded within 30 days

Langflow and Ollama complement each other: Ollama runs the model on your machine and exposes it on port 11434, while Langflow lays out what the model should do. Together, they give you a complete AI flow without a paid API key and without sending your text to an online model service.

Langflow offers two ways to use Ollama. The core Language Model component can already connect to an Ollama provider configured in the global settings. The Ollama bundle adds a dedicated component with Ollama-specific parameters, plus an Ollama Embeddings component for converting text into vectors. According to the bundle documentation, the default address is http://127.0.0.1:11434, the same one that Ollama uses by default.

#How do you install Langflow locally?

You can install Langflow in three ways: Langflow Desktop for macOS and Windows, the Python package with uv, or the official Docker image. The Python package is the most transparent option; Desktop is the simplest; Docker isolates everything in a container.

The three Langflow installation methods compared (official documentation, November 18, 2026)
MethodOperating systemsPublished requirementsA limitation to know
Langflow DesktopmacOS 13 or later, Windows (.msi)No Python to manage; on Windows, the Microsoft C++ Build Tools may be requiredDownload after a contact form; no Shareable Playground or Voice Mode
Python package (uv)macOS, Linux, WindowsPython 3.10 to 3.14 and uv; 2 GB of RAM minimum, 4 GB recommendedStartup can take a few minutes; you need to set an admin password
DockerAny system with DockerDocker installed and runningThe container must be able to reach Ollama on the host machine

These memory figures cover Langflow alone: the model loaded by Ollama comes on top, from 6.6 to 9.5 GB for Gemma 4 in its default version (gemma4:latest, i.e. e4b), according to the Ollama model page.

  1. 01
    Create a virtual environment
    In an empty folder, create an environment with uv venv followed by a name, then activate it with source NOM/bin/activate on macOS or Linux, or NOM\Scripts\activate on Windows. The environment isolates Langflow from your other Python projects.
  2. 02
    Install the langflow package
    Run uv pip install langflow -U. This package installs the application and its provider extensions, including the Ollama bundle. The langflow-base package installs the same interface without these extensions.
  3. 03
    Set the admin password
    Since Langflow 1.13, automatic login is disabled in official releases. Create a .env file containing LANGFLOW_AUTO_LOGIN=false and LANGFLOW_SUPERUSER_PASSWORD followed by a strong password.
  4. 04
    Start Langflow
    Run uv run langflow run --env-file .env, wait for startup to finish, then open http://127.0.0.1:7860 in your browser. Sign in with the langflow user and the password you chose.
macOS or Linux (uv)
uv venv VENV_NAME
source VENV_NAME/bin/activate
uv pip install langflow -U
uv run langflow run --env-file .env
.env file (all systems)
LANGFLOW_AUTO_LOGIN=false
LANGFLOW_SUPERUSER_PASSWORD=REPLACE_WITH_A_STRONG_PASSWORD
!
Upgrading from an older installation
An installation older than 1.13 that logged in automatically must be prepared before upgrading. The Langflow documentation advises against deleting or reinstalling to regain access, as this can permanently erase your flows. Export your projects before any upgrade.

#How do you connect Ollama to Langflow?

To connect Ollama to Langflow, first download a model with Ollama, add the Ollama component to the canvas, leave the http://127.0.0.1:11434 address in Base URL, then click Refresh and choose the model in Model Name.

The model must support tool calling if you want to build an agent. The Gemma 4 page on Ollama lists the tools capability, a 128K context window, and a default version of 6.6 to 9.5 GB. Estimate: at most 9.5 GB for the model plus the recommended 4 GB for Langflow comes to 13.5 GB; a 16 GB machine is enough, with a narrow margin for the context and the system. For a RAG flow, add an embedding model: EmbeddingGemma, released by Google, has 300 million parameters according to its Ollama page.

macOS, Linux, or Windows (Ollama)
ollama run gemma4
ollama pull embeddinggemma
  1. 01
    Verify that Ollama responds
    Run ollama run gemma4 and ask a short question in the terminal. If the model responds, the Ollama server is running and the model is present. Exit the conversation with /bye.
  2. 02
    Add the Ollama component
    In Langflow, open a flow, search for Ollama in the component list, and drop it onto the canvas. The Base URL field defaults to http://127.0.0.1:11434.
  3. 03
    Choose the model
    Click Refresh next to Model Name, then select gemma4 from the list. Settings such as temperature open when you click the component.
  4. 04
    Connect the right output
    Connect the Model Response output to a Chat Output component for a simple chatbot. Connect the Language Model output to the port of the same name on an Agent component so that Gemma 4 drives the agent.

#Langflow in Docker and Ollama on the host machine

When Langflow runs in a Docker container, the address 127.0.0.1 refers to the container itself, not your computer. The Docker Desktop documentation (macOS, Windows) states that the special name host.docker.internal points to the host machine. With Docker Desktop, the Base URL to try is therefore http://host.docker.internal:11434: this is an inference drawn from both sets of documentation, not guidance published by Langflow. On Linux with Docker Engine alone, this setting isn't covered by that documentation, so check your container's network configuration.

macOS or Linux (Docker)
docker run -p 7860:7860 \
  -e LANGFLOW_AUTO_LOGIN=false \
  -e LANGFLOW_SUPERUSER_PASSWORD=SUPERUSER_PASSWORD \
  langflowai/langflow:latest

#How do you build your first visual AI flow in Langflow?

The fastest way to build your first Langflow flow is to start from the Simple Agent template, switch the provider to Ollama, then test in the Playground. This template already connects an agent, a chat input and output, and two tools.

According to the official getting started guide, the Simple Agent template connects an Agent component to Chat Input and Chat Output, with a Calculator tool and a URL tool. The agent decides on its own which tool to call based on the question. To make it work without an online provider, connect the Language Model output of the Ollama component to the agent's Language Model port, or configure the Ollama provider in the Model Providers settings.

  1. 01
    Create the flow
    Click New Flow, then choose the Simple Agent template. The canvas shows the agent, the two tools, and the chat components already connected.
  2. 02
    Replace the model
    Add the Ollama component, select gemma4, and connect its Language Model output to the agent's Language Model port. No API key is needed for a model served locally by Ollama.
  3. 03
    Test in the Playground
    Open the Playground and ask it, for example, to add 4 and 4. The Playground shows the agent's reasoning, the tool it picks (here, Calculator), and the resulting answer.
  4. 04
    Verify that everything stays local
    Disconnect from the internet and ask a calculation question again. If the agent still answers, the model and the Calculator tool are indeed running on your machine. The URL tool, however, needs the network to read a page.

A RAG flow is built on the same principle: a file loader component, a text splitter, Ollama Embeddings with embeddinggemma, then storage. Since Langflow 1.13, local knowledge and memory are stored in SQLite, and the Chroma DB and Local DB components are marked legacy, to be replaced by a knowledge base. So an older tutorial that shows Chroma DB is out of date.

→
If the model won't load
The Ollama bundle documentation lists the error model requires more system memory than is available. This error means that the machine doesn't have enough memory for the model. Choose a smaller version, such as gemma4:e2b, or close memory-hungry applications.

#How do you use a Langflow flow from an application or an agent?

You can reuse a Langflow flow in two ways: as an HTTP API called by your scripts, or as an MCP tool exposed to an MCP client, such as a desktop assistant or a code editor. Either way, the flow keeps running on your machine with Ollama.

Clicking Share, then API access, automatically generates Python, JavaScript, and curl snippets to call the flow. Since Langflow 1.5, most API endpoints require a Langflow API key, passed in the x-api-key header or via the LANGFLOW_API_KEY variable. On the MCP side, each Langflow project can expose its flows as tools, provided each flow contains a Chat Output component. The default transport is streamable HTTP, with Server-Sent Events as a fallback.

#Is Langflow safe and truly local?

Langflow stays local as long as you keep it on your machine and your components only call local services such as Ollama. Two things still need attention: usage telemetry, which is enabled by default, and the server's network exposure.

According to the Telemetry page of the documentation, Langflow collects pseudonymous usage statistics, sent via Segment, and free-form error messages are excluded. To disable it, set DO_NOT_TRACK=True before startup, for example in your .env file.

The main risk lies elsewhere. In 2025, vulnerability CVE-2025-3248 allowed an unauthenticated attacker to execute code on versions prior to 1.3.0, according to GitHub security advisory GHSA-rvqx-wpfh-mfx7. Langflow executes Python code by design: a server exposed to the internet is an open door. The documentation says to never expose Langflow's ports directly, and to use your own secret key and an authenticated reverse proxy.

What stays on your machine with Langflow and Ollama (official documentation, November 18, 2026)
ItemWhere it goesHow to control it
Your prompts and responsesOllama, on your machine, if the flow uses only local componentsCheck that no online provider component is connected
Usage telemetrySent to the Langflow team via SegmentDO_NOT_TRACK=True before startup
Web tools (URL, search)Internet, by natureRemove these tools if the flow must stay offline
Langflow UI and APIPort 7860 on your machineDon't expose this port to the internet; admin password required

#Langflow, Flowise, or n8n: which should you choose?

Choose Langflow if you want a canvas for agents and RAG that you can modify in Python and publish as an API or MCP tool. Go with Flowise if you work in JavaScript, and n8n if your main need is automating business applications.

Langflow, Flowise, and n8n, depending on your needs
Your needsBest-suited toolWhy
Prototyping an agent or RAG pipeline and modifying it in PythonLangflowEach component is editable Python code; MIT license
Publish a flow as a tool for an MCP clientLangflowBuilt-in MCP server per project
Staying in the Node.js ecosystemFlowiseLaunched with npx flowise start; Apache 2.0 license except for the enterprise portion
Connecting emails, spreadsheets, and business APIs with a bit of AIn8nA process automation tool more than an agent design tool

The tools can be combined: a Langflow flow published as an API can be called from an n8n workflow.

Frequently asked questions
Does Langflow run on Mac, Windows, and Linux?+
Langflow runs on all three systems. The documentation describes Langflow Desktop for macOS 13 or later and for Windows (.msi installer); on Linux, Langflow is installed with the Python package, which requires Python 3.10 to 3.14, or with the Docker image. On both Mac and PC, Ollama serves the local model at http://127.0.0.1:11434.
Is Langflow free?+
Langflow is free, open-source software under the MIT license, whether you install it with Python, Docker, or Langflow Desktop. With a model served by Ollama on your machine, there are no API costs. A professional support offering, IBM Elite Support for Langflow, is mentioned in the documentation for businesses.
Does Langflow work without an internet connection?+
Langflow works offline if the model runs in Ollama and the flow doesn't use any web tools. Downloading Langflow and the models requires Internet access, but running a local flow afterward doesn't. Tools such as URL or web search still depend on the network, and telemetry is turned off with DO_NOT_TRACK=True.
Which Ollama model should you choose for a Langflow agent?+
For a Langflow agent, choose an Ollama model that shows the tools capability, since the agent needs to call tools. Gemma 4 in its default version takes up 6.6 to 9.5 GB according to the Ollama model page; by estimate, it fits on a 16 GB machine. On a more modest machine, gemma4:e2b, at 4.6 to 7.5 GB according to the same page, reduces the memory required.
Why can't Langflow find my Ollama models?+
Langflow only sees models already downloaded in Ollama and reachable at the address set in Base URL. Check that Ollama is running and that the model has actually been downloaded, then click Refresh in the component. If Langflow runs in Docker, the address 127.0.0.1 refers to the container: try http://host.docker.internal:11434.
Do you need a password to open Langflow?+
Yes. Since Langflow 1.13, the official packages and Docker images disable automatic login. You need to set LANGFLOW_SUPERUSER_PASSWORD before the first startup, then sign in with the langflow user. This change protects a Langflow server reachable by other machines on the network, since Langflow can execute code.

#Sources and verification as of November 18, 2026

The versions, commands, prerequisites, and security settings in this guide were checked on November 18, 2026, against the Langflow GitHub repository, its 1.13 documentation, the Ollama model pages, and the Docker documentation. Langflow ships releases very frequently, so check the releases page before installing.

Did this guide help you?

Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.