To install Langflow for AI agents, use the official Docker route: run the langflowai/langflow image on port 7860 with automatic login disabled and a strong superuser password, or clone the repository and start the ready-made Docker Compose file for a persistent PostgreSQL setup. The Python route needs Python 3.10 to 3.14 and uv, then uv pip install langflow and uv run langflow run. Langflow is free under the MIT licence. In our worked example, the model bill for a busy support agent comes to $21 a month, and self-hosting avoids a $420-a-year paid-builder subscription, before your own hosting cost.
Most visual AI builders ask you to choose between a friendly canvas and real control. Langflow refuses that trade. You drag components into a flow, test it in a playground, and when the canvas is not enough, every component opens into Python you can read and change. When you install Langflow for AI agents on your own server, the flows, the documents, and the API keys stay on hardware you control, and the licence fee is $0.
That combination matters in December 2026 for a plain reason: maintenance. Our previous guide in this series covered Flowise, a capable visual builder whose project has since been archived. Langflow is the opposite case. The official repository is active, the documentation covers current releases, and IBM now publishes Langflow editions and support alongside the open-source code. This guide shows you the official installs exactly as documented, the security steps you must not skip, and the honest cost maths for a small business.
Quick Answer
To install Langflow for AI agents, use the official Docker route: run the langflowai/langflow image on port 7860 with automatic login disabled and a strong superuser password, or clone the repository and start the ready-made Docker Compose file for a persistent PostgreSQL setup. The Python route needs Python 3.10 to 3.14 and uv, then uv pip install langflow and uv run langflow run. Langflow is free under the MIT licence. In our worked example below, the model bill for a busy support agent comes to $21 a month, and self-hosting avoids a $420-a-year paid-builder subscription, before your own hosting cost.
In this article
- How we checked this guide
- Read this first: the licence and the maintenance picture
- What Langflow replaces, and what it does not
- How flows, agents, and MCP deployment work
- Routes: self-hosted, Desktop, or IBM support
- Requirements before you install Langflow for AI agents
- Step 1: prepare the server and Docker
- Step 2: install Langflow with Docker Compose
- Step 3: the uv Python route for a quick local test
- Step 4: first login and your first agent flow
- Step 5: add your domain, HTTPS, and API access
- First-login security steps you must not skip
- Backup and update routine
- Common errors and fixes
- Tips and tricks that save money
- The real cost maths
- When not to self-host Langflow
- Pros and cons
- Our verdict
- FAQ
- Strategic Pivot
- Sources
How we checked this guide
We verified every install step, requirement, and licence fact on the official Langflow GitHub repository, the official Langflow documentation, and the official IBM Langflow product page on December 3, 2026. The comparison model price comes from the official OpenAI API pricing page, checked the same day. The paid-builder comparison price comes from the official Flowise site, also checked on December 3, 2026.
Where the official pages name a limit — a Python version, a memory floor, a token price — we say so plainly. If a claim could not be verified on an official page, it stays out of this guide. That rule matters here because third-party roundups still quote old hosted Langflow tiers. The current official pages describe an open-source product, a desktop app, and IBM support editions with no published support price, and this guide follows those pages.
Read this first: the licence and the maintenance picture

Langflow is released under the MIT licence, which the official GitHub repository states plainly. In plain words, MIT lets you use, copy, modify, and distribute the software, including commercially, provided you keep the copyright and licence notices. There is no per-seat fee, no per-flow fee, and no vendor run meter on your own server. For a small business building agents for its own customers or its own team, the free route is permitted.
The maintenance picture is the second fact to weigh. The repository is active and not archived, releases continue, and the documentation describes current behaviour, including the change in Langflow 1.13 that disables automatic login in official release packages. IBM’s product page lists Langflow OSS with community support, IBM Elite Support for teams that need SLAs, a Desktop edition, and integration with watsonx Orchestrate. A maintained codebase does not remove your share of the work — you still run the server — but it means security fixes and provider updates have an upstream home.
One honest limit belongs in this first screen. Langflow is a builder, not a model and not a hosting company. It does not supply the language model your agent calls, and it does not run your server for you. The canvas is free; the tokens and the machine are yours. The cost section below prices that split with real numbers.
What Langflow replaces, and what it does not
Langflow replaces hand-written orchestration code for common agent jobs. Instead of writing glue code that loads documents, splits text, embeds it, retrieves passages, prompts a model, and calls tools, you assemble the same pieces visually. The official repository describes Langflow as a platform for building and deploying AI-powered agents and workflows, with a visual authoring experience, built-in API and MCP servers, and support for all major LLMs and vector databases. For a small business, the everyday wins are a support agent answering from your own help pages and a document agent that extracts structured data from invoices or forms.
It also replaces the blank-page problem. Ready components and templates mean a first working agent takes an afternoon, not a sprint. The repository lists a visual builder interface, source-code access to customise any component in Python, an interactive playground for step-by-step testing, multi-agent orchestration, deployment as an API, deployment as an MCP server, and observability integrations such as LangSmith and LangFuse.
What Langflow does not replace is judgement about your data. An agent retrieving from a help centre that contradicts itself will answer confidently and wrongly, no matter how clean the canvas looks. Budget time for document cleanup and answer testing, not just installation. It also does not replace general business automation. If most of a workflow is moving rows between a CRM, email, and spreadsheets, a general automation tool fits better; our n8n on a VPS guide covers that layer.
Best for: small businesses and technical operators who want a maintained, MIT-licensed visual builder for agents and RAG flows, with Python access when the canvas runs out. Skip if: nobody on your team will own a server, or your job is general app-to-app automation rather than model-centred agents.
How flows, agents, and MCP deployment work
A Langflow flow is a graph of components. A typical support agent connects a chat input to a retriever, the retriever to a vector store holding your documents, and both to a language model component with a prompt that tells the model to answer only from the retrieved passages. A tool component can let the agent check an order status or book a slot. You test the whole graph in the Playground, where each component shows its output step by step, so a wrong answer can be traced to the retrieval, the prompt, or the model.
Agents add a decision loop on top of that graph. Instead of one fixed path, the agent chooses which tool to call next based on the conversation. Multi-agent orchestration divides a larger job across coordinated agents: one gathers information, another drafts, a third checks. That suits jobs like triaging support tickets, where a human still signs off before anything reaches a customer.
Deployment is where Langflow earns its keep. A finished flow can be exposed as an API endpoint your website or app calls, exported as JSON for Python apps, or deployed as an MCP server so MCP clients can use your flows as tools. Observability integrations with LangSmith and LangFuse record what each run did, which is how you find failing questions and wasted tokens after launch.
One practical consequence follows. Because every component is Python underneath, a flow is never a dead end. When a built-in component almost fits, you open it, adjust the logic, and save it as your own. Teams that expect to write some code will feel at home; teams that want zero code forever should weigh that honestly, because the deepest customisation path is Python.
Routes: self-hosted, Desktop, or IBM support

Langflow offers three practical routes, and the right one depends on who owns the server.
| Route | Licence / price anchor | Best for | Skip if |
|---|---|---|---|
| Self-hosted OSS (Docker or uv) | $0 licence, MIT | Teams that want agents and data on their own server | Nobody will maintain a server |
| Langflow Desktop | $0 download, Windows and macOS | Local prototyping on one machine | You need a shared, always-on service |
| IBM Elite Support | Price not published; contact IBM | Enterprises needing SLAs and support | You need a published price before talking to sales |
| Paid builder subscription (comparison) | Flowise Starter $35 per month | Teams that want a vendor to run the builder | You want data on your own server |
The self-hosted route is the one this guide installs. It is free under the MIT licence, with community support. Langflow Desktop simplifies dependency management for local work, but the documentation notes that some features, such as the Shareable Playground and Voice Mode, are not available in Desktop, and Desktop requires macOS 13 or later on Apple machines. IBM Elite Support adds professional support for OSS users, but IBM does not publish its price, so treat that line as quote-only and confirm it with IBM before budgeting.
For comparison, our Flowise guide covers the closest visual-builder alternative, including its archived status and its $35-a-month Starter plan. The cost section below uses that verified figure to price the licence saving.
Requirements before you install Langflow for AI agents

Start with the runtime. The Python package route needs Python version 3.10 to 3.14 and uv, the recommended package manager. The Docker route carries its own runtime inside the image, which is why we recommend Docker for anything that will stay running. Either way, Langflow serves its interface on port 7860 by default.
Size the machine by the documented floor, then by workload. The official installation guide states a minimum of a dual-core CPU and 2 GB of RAM, with a multi-core CPU and at least 4 GB of RAM recommended. A test instance with one flow and light traffic runs at the floor. A production agent answering customers all day, ingesting documents and holding several vector stores, should start at the recommended size or above. The model calls themselves happen at your provider, not on your server, unless you run a local model, which needs its own hardware budget.
Plan the data layer before you install anything. Langflow defaults to a SQLite database, and the Docker Compose setup replaces it with a persistent PostgreSQL database. SQLite suits a single small instance. A team instance that matters should use PostgreSQL, with its own backups, because flows, users, and run history live in that database. Decide now; migrating later is possible but calmer to avoid.
Finally, check the licence position for your use. The MIT licence permits commercial use, modification, and distribution with the copyright and licence notices kept, and the software comes without warranty. For a small business running its own agents, the free route is permitted. Support is the paid layer: community support comes with the open-source route, while IBM Elite Support is a separate, quote-only arrangement.
Step 1: prepare the server and Docker
Choose a Linux server with room to grow, and create a normal user account for daily work. Keep root login for emergencies only. Install Docker Engine and the Compose plugin from Docker’s own repository, then confirm both tools respond:
docker --version
docker compose versionEach command should print a version number. If the second command fails, the Compose plugin is missing. Fix that first, because the documented production install depends on it.
Point a subdomain at the server now. A name such as agents.example.com needs a DNS record that resolves to your server. You will use that hostname for the builder, for the API endpoint, and for the TLS certificate. Doing DNS early saves waiting later, because certificates cannot be issued until the name resolves.
Decide your database choice before the first start. The Compose route below gives you PostgreSQL with persistent volumes from day one, which is the calmer default for anything beyond a test.
Step 2: install Langflow with Docker Compose

The official Compose route has five moves. Clone the repository, enter the docker_example folder, set a strong superuser password in a .env file, start the stack, and sign in:
git clone https://github.com/langflow-ai/langflow.git
cd langflow/docker_example
echo 'LANGFLOW_SUPERUSER_PASSWORD=replace-with-a-strong-password' > .env
docker compose up -dThen open http://localhost:7860/ on the server, or your server address on port 7860 from a trusted network, and sign in with the username langflow and the password you set. The Compose file pulls the official Langflow image and includes persistent volume storage with PostgreSQL, so your flows survive container restarts.
Two details in that short sequence carry real weight. First, official Docker images disable automatic login by default, and the Compose file requires the superuser password value. If you skip the .env step, you will meet a login you cannot pass. Second, persistence is not automatic in every route. The single-container quickstart below is fine for a test, but a container without persistent storage loses its data when it is removed. The Compose route exists precisely to avoid that trap.
For a quick local test instead, the documentation gives a one-line container start:
docker run -p 7860:7860 -e LANGFLOW_AUTO_LOGIN=false -e LANGFLOW_SUPERUSER_PASSWORD=replace-with-a-strong-password langflowai/langflow:latestTreat that as a test drive, not a production home. Move to Compose before real users or real documents arrive.
Pin what you run. The documentation covers choosing and pinning Docker image versions, and pinning is how a working instance avoids surprising you later. Record the exact image tag you deployed, and upgrade deliberately using the routine below.
Step 3: the uv Python route for a quick local test
If you prefer to run Langflow directly in Python — common on a workstation or a small server without Docker — the official package route is short. Create a virtual environment with uv, install the package, set the login values, and start:
uv venv langflow-env
source langflow-env/bin/activate
uv pip install langflow
uv run langflow run --env-file .envYour .env file needs two values, because official release packages disable automatic login:
LANGFLOW_AUTO_LOGIN=false
LANGFLOW_SUPERUSER_PASSWORD=replace-with-a-strong-passwordThen open http://127.0.0.1:7860 and sign in as langflow. The documentation notes that the first start can take a few minutes. It also offers langflow-base if you want the same UI and API without the curated provider extensions; both packages use the langflow command.
Choose between the routes by lifespan. The uv route is excellent for evaluation and development. Docker Compose is the better home for a service other people depend on, because the database, volumes, and restarts are handled as one stack.
Step 4: first login and your first agent flow
Sign in, then build the smallest useful agent before you build the real one. A document question-answering flow is the right first test: load a handful of your own help pages, split and embed them into a vector store, connect a model component, and ask questions whose answers you already know. The Playground shows each component’s output, so you can see whether a wrong answer came from retrieval, the prompt, or the model.
Add your model provider key through the component settings, and keep the key out of screenshots, shared flow exports, and chat messages. Test with the cheapest model that answers well; the cost section shows why model choice, not the builder, drives the monthly bill. If you want a fully local test with no provider bill, our LlamaIndex RAG guide covers the local-model pattern, and the same retrieval discipline applies here.
When the test flow answers correctly, save it, export a copy of the flow JSON, and keep that export with your backups. A flow export is your portable copy of the agent’s logic, independent of any one server.
Step 5: add your domain, HTTPS, and API access
A builder on a raw IP address and port is a test, not a service. Put Langflow behind your subdomain with a reverse proxy and a TLS certificate, so the interface and the API travel over HTTPS. Keep port 7860 itself reachable only through the proxy, not open to the whole internet.
Then decide how the agent reaches its users. Expose the flow as an API endpoint for your website or app, or deploy it as an MCP server if your tools speak MCP. Either way, treat the endpoint as a public surface: it will receive untrusted input, it spends your model budget on every call, and it needs rate limits at the proxy before launch, not after the first surprise bill.
Test the public path the way a visitor experiences it. Ask the agent your five most common customer questions, one question it should refuse, and one question outside its documents. A good agent answers the first group from your pages, declines gracefully on the rest, and never invents a price or a policy.
First-login security steps you must not skip
Keep automatic login off. Official release packages and Docker images disable it by default, and that default exists because an open builder on the internet hands strangers your provider keys and your documents. Set a strong superuser password, and store it in your password manager, not in a shared document.
Create named accounts for each person who needs access, and remove accounts when people leave. The superuser is for administration, not daily building. Review who can edit flows that hold production keys, because a flow edit is effectively a production deploy.
Protect the keys themselves. Provider API keys belong in Langflow’s credential settings and your server’s secret handling, never in flow exports you share, screenshots, or support tickets. Set spending alerts at your model provider before launch, so a runaway flow or a curious visitor meets a ceiling you chose.
Keep the database off the public internet. PostgreSQL should accept connections from the Langflow service, not from the world. Backups of that database contain your flows and configuration, so encrypt backup storage and limit who can read it.
Backup and update routine
Back up three things together: the database, the configuration directory, and your exported flow JSON files. The database holds flows, users, and history. The configuration holds settings and the secret key that protects stored credentials; the upgrade documentation stresses preserving the original secret key and storage paths, because losing them can lock you out of your own data. Test a restore before you need it. A backup you have never restored is a hope, not a plan.
Update deliberately. For the Python route, the documentation gives uv pip install langflow -U, and recommends backing up before you upgrade. To pin or roll back, install a specific version, such as uv pip install langflow==1.4.22. For Docker, replace the container with the newer pinned image while keeping the same volumes, so the database and flows carry over.
Respect version jumps. The documentation gives a dedicated procedure for upgrading from Langflow 1.11.x to 1.13, including preparing the existing account for password sign-in before upgrading and keeping the old environment until the new one is verified. Read the upgrade notes for your jump before you start, and never delete an installation to regain access; the documentation warns that deleting can permanently remove your flows.
After every update, run your five test questions again. Provider components change, prompts drift, and a flow that answered well last month can quietly degrade. The test set is how you notice.
Common errors and fixes
You cannot sign in after install. The usual cause is a missing superuser password. Official images and packages disable automatic login, so set LANGFLOW_SUPERUSER_PASSWORD in your .env file or container environment, restart, and sign in as langflow. If you upgraded an old auto-login installation, follow the documented access-recovery steps instead of reinstalling.
Your flows vanished after a restart. The container was removed without persistent storage. Move to the Docker Compose route with its PostgreSQL service and volumes, or restore from your backup and flow exports. This is the most common self-hosting lesson, and it is cheap to learn on a test flow.
The first start seems stuck. The documentation notes that Langflow can take a few minutes to start. Check the container or process logs before restarting repeatedly; dependency installation and database migration happen on first boot.
The agent answers from thin air. Retrieval is returning weak passages, or the prompt does not constrain the model to them. Inspect the Playground step outputs, clean the source documents, narrow the flow to one job, and instruct the model to say it does not know when the passages do not cover the question.
The model bill surprises you. Every run spends tokens, and agent loops spend more than single calls. Check your observability traces, shorten prompts, cache where your provider supports it, and set provider spending alerts. The maths below shows how quickly volume, not the builder, sets the bill.
Tips and tricks that save money
Keep one flow per job. A single agent handling sales, support, and internal policy retrieves from everything and answers vaguely. Narrow flows retrieve better, test faster, and cost less per correct answer.
Start with the smallest model that passes your test set. In the worked example below, the model line is the whole variable cost. A model that answers your five test questions correctly at a lower token price beats a flagship model answering the same questions.
Set provider spending alerts before launch, and review run traces weekly at first. Traces show which questions fail, which retrievals miss, and where money goes. Fix the top failing question each week. That habit improves the agent fastest.
Export every production flow after each meaningful change, and keep the exports with your backups. Flow JSON is small, portable, and turns a server loss from a rebuild into a restore.
Use Desktop for experiments and Compose for anything shared. Desktop removes dependency friction for one person on one machine; the moment a second person or a public endpoint depends on the flow, it belongs on the server stack.
The real cost maths
Here is one realistic small-business scenario. A home-services company runs a support agent that answers booking, pricing, and service-area questions from its own pages. Volume is steady but modest: 3,000 agent runs a month, one main flow, and two staff who maintain the documents.
Langflow itself adds no licence line. The software is $0 under the MIT licence, with no per-seat or per-run vendor fee on your own server. The variable line is the model. At the official OpenAI price for gpt-6.2-sol — $2.00 per 1M input tokens and $10.00 per 1M output tokens, checked December 3, 2026 — a typical run using 1,500 input tokens and 400 output tokens costs $0.003 in input and $0.004 in output. Across 3,000 runs, that is 4.5M input tokens ($9.00) and 1.2M output tokens ($12.00), for a model bill of $21.00 a month, or $252 a year.
Now compare the builder line. A paid visual-builder subscription at the verified Flowise Starter price of $35 per month costs $420 a year, and the same $252 model bill still applies, because the canvas calls the model you configure on every route. The paid route’s known lines total $672 a year before any hosting difference. The self-hosted Langflow route’s known lines total $252 a year plus your server, which you may already run for other tools. The licence saving is $420 a year; the honest total saving depends on what your server costs you and who maintains it.
| Cost line (3,000 runs/month) | Self-hosted Langflow | Paid builder (Starter) |
|---|---|---|
| Builder licence | $0 (MIT) | $420 per year |
| Model usage (gpt-6.2-sol) | $252 per year | $252 per year |
| Server | Your own; varies | Included in subscription |
| Known annual lines | $252 + server | $672 |
Two warnings keep this maths honest. First, volume changes everything: at 30,000 runs a month the model line becomes $210 a month, and model choice matters more than the builder choice. Second, IBM Elite Support has no published price, so if your business needs an SLA, that quote belongs in the budget before you commit. Count model spend separately on every route, and re-run these numbers with your own run volume.
When not to self-host Langflow
Do not self-host if nobody on your team will own the server. An agent builder holding provider keys and customer conversations needs updates, backups, and someone who notices when it is down. Without that owner, a vendor-run service or IBM support is the safer purchase.
Do not self-host if your compliance needs require vendor attestations or a contractual support SLA from day one. The open-source route carries community support; the SLA route is IBM Elite Support, priced by quote. Treat any hard compliance requirement as a reason to start that conversation early.
Do not self-host for a one-week experiment. Langflow Desktop or a quick container test answers “does this flow work” without a server commitment. Self-hosting earns its keep when the agent will run for months and the data should stay with you.
Self-hosting fits when a technical operator accepts server ownership, when documents and keys must stay on your infrastructure, or when run volume makes per-run vendor pricing unattractive. In those cases, the MIT licence and the maintained codebase make Langflow a calm foundation.
Pros and cons
Pros
- $0 licence fee under MIT, with commercial use permitted and notices kept
- Visual builder with Python access to every component, so flows never hit a dead end
- Deploy flows as APIs or MCP servers, with LangSmith and LangFuse observability
- Actively maintained project with current documentation and IBM editions behind it
- Official Docker Compose and uv installs, with PostgreSQL persistence documented
Cons
- You run the server: updates, backups, TLS, and monitoring are yours
- Model usage still costs money on every route, and agent loops multiply tokens
- The deepest customisation is Python, so a code-free team will feel limits
- IBM Elite Support pricing is not published; budgeting needs a sales conversation
- Public endpoints need proxy, rate-limit, and key-handling discipline
Our verdict
Install Langflow for AI agents when you want a maintained visual builder without a licence meter: a technical owner will run the server, your documents and keys should stay on your infrastructure, and your team is comfortable opening a component in Python when the canvas runs out. The maths is clear: $0 in licence fees against $420 a year for a paid builder subscription, with a $21-a-month model bill in our worked example on either route. If nobody will own the server, buy the hosted route instead and spend your hours on the documents and test questions, which is where agent quality is actually decided.
FAQ
Is Langflow free to self-host for a business?
Yes. Langflow is available under the MIT licence, which permits commercial use, modification, and distribution with the copyright and licence notices kept. The software comes without warranty. You pay for your server and your model provider, not for the Langflow licence.
What does Langflow need to run?
The Docker route needs Docker and serves the app on port 7860. The Python route needs Python 3.10 to 3.14 and uv. The documentation states a minimum of a dual-core CPU and 2 GB of RAM, with a multi-core CPU and at least 4 GB of RAM recommended.
How do I sign in after installing Langflow?
Official release packages and Docker images disable automatic login. Set a strong LANGFLOW_SUPERUSER_PASSWORD, start Langflow, and sign in with the username langflow or your configured superuser name. Keep automatic login off on any server other people can reach.
Where does Langflow store my flows and keys?
Flows, users, and history live in the database — SQLite by default, or PostgreSQL with the Docker Compose setup. Configuration and the secret key live in the configuration directory. Back up the database, the configuration, and your exported flow JSON together, and preserve the secret key across upgrades.
How much does a Langflow agent cost to run?
The builder licence is $0. The model is the variable cost. In our worked example at official gpt-6.2-sol prices — $2.00 per 1M input tokens and $10.00 per 1M output tokens — 3,000 runs a month cost $21.00 in model usage, plus your server. Your volume and model choice set your real figure.
Strategic Pivot
The builder is free, but your agent stack still has model and server lines to budget. Before you commit to a route, run your own run volume through our AI Cost Calculator and compare the self-hosted habit against a paid subscription with your real numbers, not ours.
Sources
- Official Langflow GitHub repository: langflow-ai/langflow
- Official Langflow documentation: Install Langflow and Deploy Langflow on Docker pages.
- Official IBM Langflow product page: editions and support overview.
- Official OpenAI API pricing page: gpt-6.2-sol token prices.
- Official Flowise site: Starter plan price used for the builder comparison.
Price note — updated December 3, 2026: Prices in this post were checked on December 3, 2026. When you are reading this, the price may be lower or higher. Check the official pricing pages before you buy.
Pros
- $0 licence fee under MIT with commercial use permitted
- visual builder with Python access to every component
- deploy flows as APIs or MCP servers with observability integrations
- actively maintained project with IBM editions behind it
- official Docker Compose and uv installs with PostgreSQL persistence
Cons
- you run the server, updates, backups, and TLS yourself
- model usage still costs money on every route
- deepest customisation is Python, so code-free teams feel limits
- IBM Elite Support pricing is not published
- public endpoints need proxy and rate-limit discipline
Install Langflow for AI agents when you want a maintained visual builder without a licence meter: a technical owner will run the server, documents and keys stay on your infrastructure, and your team can open a component in Python when needed. The maths is clear: $0 in licence fees against $420 a year for a paid builder subscription, with a $21-a-month model bill in our worked example. If nobody will own the server, buy the hosted route instead.
