Langflow — Quick reference
Drag-and-drop builder for AI agents & RAG — free, MIT-licensed, self-hosted, bring your own model key.
Langflow is free and open-source (MIT). You self-host it at no cost and pay only your own infrastructure plus any LLM API key you bring. There's no first-party managed cloud anymore (the DataStax cloud retired April 2026) — run it on your laptop or server. Needs Python 3.10–3.14 and about 2 GB RAM.
Install & run
| Path | Command / how |
| easiest Desktop app | Download the Langflow Desktop app — install and open, no terminal needed. |
| Docker | docker run -p 7860:7860 langflowai/langflow:latest → open http://localhost:7860/ |
| uv / pip | uv pip install langflow then uv run langflow run → open http://127.0.0.1:7860 |
First run: open Langflow → New Flow → pick the Simple Agent template → paste an OpenAI API key into the model block → click Playground and send a message. Langflow itself is free; you bring the key.
Core building blocks
A flow is blocks wired together — each block does one job, the wires decide how information moves. Every block is real, editable Python underneath.
Input / Output
Chat Input · Chat Output
Where a typed message enters the flow and where the reply leaves it.
Model
Language Model
The LLM block. Pick a provider, paste that provider's API key. Model-agnostic.
Agent
Agent node
Exposes Role, Language Model, Tools and Input Message — reasons and picks a tool.
Retrieval
Document store + Vector DB
Load a PDF / website, retrieve relevant passages — the basis of a RAG flow.
Tools
Calculator · Web-fetch · more
Capabilities the agent can call, e.g. the Calculator that turns "add 4 and 4" into 8.
Canvas
Wires & ports
Drag blocks from the component list, connect ports left → right. No glue code for common cases.
Build your first flow
1 · Start from a template
New Flow → Simple Agent. The template gallery also has Content Search, Code Debugger, Basic Prompting, Basic Agent and Doc Assistant.
2 · Add your key
Open the model block, paste an OpenAI API key (or another provider's).
3 · Run it
Click Playground, type "I want to add 4 and 4." → the agent reasons, picks the Calculator and answers 8.
4 · Wire by hand
On a blank flow: drag Chat Input → Language Model → Chat Output and connect left-to-right to see the message flow through.
Connect a model, tools & memory
| Do this | How |
| Swap the model | Open the Language Model block → pick a different provider (e.g. OpenAI → Anthropic) → paste that provider's API key → re-run. |
| Bring your own key | Langflow stays free — no per-seat or per-message fee. Your only spend is the providers you call. |
| Choose a vector store | Point the retrieval block at the vector database you prefer. Swapping a component rarely means rebuilding the flow. |
| Ground on your docs (RAG) | Load a PDF or website into the document block → ask a question only that source can answer. The bot retrieves, then answers from your content. |
Providers seen in the gallery sidebar: Anthropic, MistralAI, Langchain, Glean, Cohere, OpenAI, NVIDIA. Langflow is a visual layer over Python / LangChain.
Debug in the Playground
Trace
Watch it think
Send a message and read the agent's step-by-step reasoning and the tool it picks in real time — not just the final answer.
Diagnose
Find the failing step
Wrong answer? The trace shows where: skipped retrieval, wrong tool, bad input. Fix that one block instead of guessing.
Iterate
Tweak → re-run
Adjust a block or its Role/instructions, re-run in the Playground, confirm the reasoning before you ship.
Deploy / export / API
Open the flow's API dialog — Langflow exposes any flow as a REST API with ready-to-run snippets.
| Tab | Use it to |
Run cURL | Call the flow from a terminal or any shell. |
Python API | Call the flow over HTTP from a Python script. |
Python Code | Embed / run the flow's logic from Python. |
JS API | Call the flow from a website or JS app. |
You can also export the flow as an MCP server, so AI assistants and other tools can use it as a capability — a literature-Q&A or data-lookup bot a whole lab can plug into. Exporting and self-hosting cost only your own infrastructure plus model usage per call.
Tips
• Start from a template, not a blank canvas — the gallery turns a complex RAG/agent pipeline into a working starting point.
• Every block is real Python — beginners never touch it, but open a block when you want to customise or understand a step.
• You self-host and bring your own key — there's no managed cloud, so plan for an install + a machine to run it; complex flows benefit from light Python knowledge.
• Debug in the Playground first — confirm the reasoning goes the way you intended before exporting the flow as a service.