Langflow

raw JSON →
1.9.1 verified Fri May 01 auth: no python

Langflow is a low-code Python package for building AI agents and RAG applications through a visual flowchart interface. Version 1.9.1 is the latest; the project follows a monthly release cadence. It supports Python >=3.10 and includes a built-in web application for drag-and-drop workflow design.

pip install langflow
error ModuleNotFoundError: No module named 'langflow.server'
cause Import path changed in v1.0; old import no longer exists.
fix
Change from langflow.server import app to from langflow import start.
error RuntimeError: Could not find browser revision. Please run `playwright install`.
cause Playwright browsers are not installed alongside the Python package.
fix
Run playwright install chromium in your terminal.
error sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
cause Multiple processes (e.g., multiple Uvicorn workers) accessing the default SQLite database concurrently.
fix
Set LANGFLOW_DATABASE_URL to a PostgreSQL connection string, e.g., postgresql://user:pass@localhost:5432/langflow.
breaking In v1.0, the import path for the main entry point changed from `langflow.server` to `langflow`. Old code `from langflow.server import app` will fail.
fix Use `from langflow import start` or `from langflow import Langflow`.
deprecated The `langflow run` CLI command is deprecated in favor of `langflow serve` or the Python API.
fix Use `langflow serve` or call `start()` from Python.
gotcha Langflow stores flow data in a SQLite database by default; it is not thread-safe for multiple processes. Running multiple workers may cause database corruption.
fix Set the `LANGFLOW_DATABASE_URL` environment variable to a PostgreSQL database for production.
gotcha When using Playwright for headless browser automation, ensure the Playwright browsers are installed (e.g., `playwright install chromium`). Missing browsers cause `RuntimeError: Could not find browser revision`.
fix Run `playwright install chromium` after installing Langflow.
pip install langflow[all]

Start the Langflow web application programmatically. The server will be accessible at http://127.0.0.1:7860.

from langflow import start

# Start Langflow server on default port 7860
start(
    host="127.0.0.1",
    port=7860,
    open_browser=False,
    components_path="./components",
    log_level="INFO"
)