Langflow
What this article covers
- What Langflow is and how it fits with LangChain.
- How to install Langflow.
- How to build your first visual workflow.
- How to integrate a local Ollama model.
- When Langflow makes sense.
Introduction
Langflow is a visual interface for LangChain. You connect building blocks like models, prompts, tools, and memory via drag and drop. This lets you build AI workflows with minimal code. Langflow runs locally and supports Ollama. If you’re familiar with LangChain, you’ll find your way around quickly.
Langflow in brief
Langflow provides components that you connect on a canvas. A component can be a model, a prompt, a file, or a tool. The connections determine the data flow. Finished flows can be deployed as API endpoints.
Installation
Option 1: Using pip
pip install langflow
langflow run
Langflow will then be available at http://localhost:7860.
Option 2: Using Docker
docker run -it --rm -p 7860:7860 langflowai/langflow:latest
Option 3: From the repository
git clone https://github.com/langflow-ai/langflow.git
cd langflow
docker compose up
Adding Ollama as a model
Add an Ollama component in the interface. Enter http://localhost:11434 as the base URL and select a downloaded model:
ollama pull llama3.1
Getting started: A simple flow
- Open Langflow in your browser.
- Click New Flow.
- Drag an Ollama component and a Prompt component onto the canvas.
- Connect the prompt and model.
- Enter a prompt and run the flow.
You’ll immediately see how the model responds to your input.
When Langflow is useful
| Use case | Benefit |
|---|---|
| Prompt prototypes | Test quickly without writing code |
| RAG flows | Connect documents, embeddings, and models |
| Agent workflows | Visually link tools and memory |
| Learning | Understand how LangChain components work together |
Common pitfalls
- Dependencies - The pip installation can cause issues with older Python versions. Python 3.11 or newer is recommended.
- Port 7860 in use - Langflow uses this port. You may need to change it when starting.
- Model not found - The model must be downloaded in Ollama first using
ollama pull.
Further reading
FAQ - Common questions
Is Langflow free?
Yes, the open-source version is free. There’s also a paid cloud option.
Can I run Langflow locally?
Yes, via pip, Docker, or Docker Compose. You don’t need a cloud service.
Do I need LangChain experience?
No, but it helps. Langflow makes the concepts visually understandable.


