Langflow is an open-source platform for building and deploying AI-powered agents and workflows through visual authoring and programmatic APIs. This page provides a high-level overview of the system architecture, package structure, and installation methods. For detailed information about specific subsystems, refer to the child pages linked in this document.
Sources: README.md16-27 pyproject.toml1-21
Langflow is a multi-layered application for building AI workflows with three core layers:
@xyflow/react for visual flow editing src/frontend/package.json66-97Workflows can be executed via REST API, deployed as MCP (Model Context Protocol) servers src/lfx/pyproject.toml96 or integrated into various AI frameworks.
Version: 1.11.0 pyproject.toml3
Python Requirements: >=3.10,<3.15 pyproject.toml5
Default Port: 7860 README.md59 Makefile18
Sources: README.md16-27 pyproject.toml2-5 src/frontend/package.json3-97 src/lfx/pyproject.toml96
Diagram: System Architecture - Client Layer to Storage
The FastAPI application initializes core services during the lifespan context. Services are managed through a central service manager pattern, providing access to the database via DatabaseService and configuration via SettingsService. The execution engine translates JSON graph definitions into executable Directed Acyclic Graphs (DAGs).
For details, see System Architecture.
Sources: src/backend/base/pyproject.toml21-48 src/lfx/src/lfx/services/settings/base.py89-104
Langflow uses a monorepo workspace to separate concerns, managed by uv pyproject.toml132-160
Diagram: Package Dependency Hierarchy
langflow pyproject.toml2: Top-level package providing the CLI entry point.langflow-base src/backend/base/pyproject.toml2: Core package containing the application logic and service layer. It depends on lfx src/backend/base/pyproject.toml20lfx src/lfx/pyproject.toml2: Lightweight executor and CLI tool for serving flows, integrating with the Model Context Protocol src/lfx/pyproject.toml64-95langflow-sdk src/sdk/pyproject.toml2: Python client for interacting with the Langflow REST API src/lfx/pyproject.toml60For details, see Package Structure.
Sources: pyproject.toml132-160 src/backend/base/pyproject.toml1-20 src/lfx/pyproject.toml1-96 src/sdk/pyproject.toml1-4
Diagram: Frontend Stack - React Components to Backend API
The frontend is a React 19 SPA src/frontend/package.json97 using @xyflow/react for the flow canvas src/frontend/package.json66 State management is handled by Zustand src/frontend/package.json129 and the UI is built with Tailwind CSS and Radix UI primitives src/frontend/package.json43-203
Sources: src/frontend/package.json1-129 src/frontend/package.json203
The backend is organized around a service manager pattern. Services are initialized based on environment configuration and the application lifespan.
| Service | Purpose | Source |
|---|---|---|
| SettingsService | Configuration management via dynaconf and pydantic-settings | src/backend/base/pyproject.toml41-108 |
| DatabaseService | Persistence using sqlmodel and alembic migrations | src/backend/base/pyproject.toml39-48 |
| TelemetryService | Telemetry and tracking using OpenTelemetry and Segment | src/backend/base/pyproject.toml67-74 |
| TaskService | Background execution with anyio or celery backends | src/backend/base/pyproject.toml62 |
| McpComposerService | Pluggable service for per-project MCP orchestration | src/lfx/src/lfx/services/settings/base.py98 |
For details, see System Architecture.
Sources: src/backend/base/pyproject.toml39-112 src/lfx/src/lfx/services/settings/base.py89-102
Langflow supports multiple installation and deployment methods:
docker run -p 7860:7860 langflowai/langflow:latest README.md72-78uv pip install langflow README.md46make run_cli README.md68For details, see Installation and Getting Started.
Sources: README.md29-78
lfx-openai, lfx-anthropic) shipped in lfx-bundles docs/docs/Support/release-notes.mdx107-122 pyproject.toml30-52Sources: README.md18-28 src/backend/base/pyproject.toml67-74 docs/docs/Support/release-notes.mdx107-122
Refresh this wiki
This wiki was recently refreshed. Please wait 6 days to refresh again.