Langflow and Ollama: building an AI flow visuel

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.
#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?
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.
| Method | Operating systems | Published requirements | A limitation to know |
|---|---|---|---|
| Langflow Desktop | macOS 13 or later, Windows (.msi) | No Python to manage; on Windows, the Microsoft C++ Build Tools may be required | Download after a contact form; no Shareable Playground or Voice Mode |
| Python package (uv) | macOS, Linux, Windows | Python 3.10 to 3.14 and uv; 2 GB of RAM minimum, 4 GB recommended | Startup can take a few minutes; you need to set an admin password |
| Docker | Any system with Docker | Docker installed and running | The 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.
- 01Create a virtual environmentIn 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.
- 02Install the langflow packageRun 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.
- 03Set the admin passwordSince 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.
- 04Start LangflowRun 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.
#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.
- 01Verify that Ollama respondsRun 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.
- 02Add the Ollama componentIn 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.
- 03Choose the modelClick Refresh next to Model Name, then select gemma4 from the list. Settings such as temperature open when you click the component.
- 04Connect the right outputConnect 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.
#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.
- 01Create the flowClick New Flow, then choose the Simple Agent template. The canvas shows the agent, the two tools, and the chat components already connected.
- 02Replace the modelAdd 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.
- 03Test in the PlaygroundOpen 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.
- 04Verify that everything stays localDisconnect 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.
#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.
| Item | Where it goes | How to control it |
|---|---|---|
| Your prompts and responses | Ollama, on your machine, if the flow uses only local components | Check that no online provider component is connected |
| Usage telemetry | Sent to the Langflow team via Segment | DO_NOT_TRACK=True before startup |
| Web tools (URL, search) | Internet, by nature | Remove these tools if the flow must stay offline |
| Langflow UI and API | Port 7860 on your machine | Don'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.
| Your needs | Best-suited tool | Why |
|---|---|---|
| Prototyping an agent or RAG pipeline and modifying it in Python | Langflow | Each component is editable Python code; MIT license |
| Publish a flow as a tool for an MCP client | Langflow | Built-in MCP server per project |
| Staying in the Node.js ecosystem | Flowise | Launched with npx flowise start; Apache 2.0 license except for the enterprise portion |
| Connecting emails, spreadsheets, and business APIs with a bit of AI | n8n | A 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.
Does Langflow run on Mac, Windows, and Linux?+
Is Langflow free?+
Does Langflow work without an internet connection?+
Which Ollama model should you choose for a Langflow agent?+
Why can't Langflow find my Ollama models?+
Do you need a password to open Langflow?+
#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.
- Source: Langflow GitHub repository (langflow-ai)
- Source: Langflow 1.13.3, GitHub release page
- Source: Install Langflow (official documentation)
- Source: Langflow's Ollama components (official documentation)
- Source: Langflow 1.13 release notes
- Source: Langflow telemetry (official documentation)
- Source: CVE-2025-3248 security advisory (GitHub Advisory Database)
- Source: Gemma 4 in the Ollama library
Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.