Langflow is an open-source platform for building and deploying AI-powered agents and workflows through both visual authoring and programmatic APIs. This page provides a high-level introduction to Langflow's architecture, deployment options, package structure, and key capabilities.
For detailed technical information about specific subsystems, refer to the child pages linked below. This overview focuses on the big-picture structure and integration of Langflow's core components.
Sources: README.md16-27 pyproject.toml1-46
Langflow is a multi-layered application designed for constructing AI workflows with a focus on extensibility, integration, and developer productivity. It provides:
The application is composed of three primary layers:
| Layer | Description | Key Technologies |
|---|---|---|
| Frontend | Single Page Application (SPA) enabling visual flow editing and management | React 19, TypeScript, @xyflow/react |
| Backend | FastAPI-based server exposing REST and WebSocket APIs for flow execution and resource management | FastAPI, uvicorn, SQLModel |
| Component System | Dynamic, extensible registry of reusable components supporting natural language-based generation | Python classes, Langflow Assistant |
Langflow's workflows can be executed via the REST API or deployed as MCP servers to expose workflows as AI tools usable by MCP clients. A Python SDK allows programmatic interaction with Langflow.
Version: 1.12.2
Python Requirements: >=3.10,<3.15
Default Port: 7860
Sources: README.md16-27 pyproject.toml2-5 src/frontend/package.json3-117 src/lfx/pyproject.toml2-66 src/sdk/pyproject.toml2
The system architecture consists of a client layer, a FastAPI backend serving APIs and executing flows, a core component and execution engine, and back-end storage services.
For a comprehensive breakdown of components, see System Architecture.
Sources: src/backend/base/pyproject.toml21-42 src/backend/base/pyproject.toml49 src/lfx/pyproject.toml46
Langflow organizes the codebase into a monorepo-style workspace with logically separated layered packages. The workspace is managed with a tool called uv and uses versioned dependencies to coordinate releases.
Additional packages in the workspace include:
langflow-sdk: Python client SDK for Langflow REST API interaction and flow management.langflow-stepflow: Integration bridge enabling execution of Langflow workflows on the Stepflow engine.This modular structure enables clear separation of concerns and extensibility through provider-specific extension bundles under lfx-*.
For comprehensive details on the workspace and package dependencies, see Package Structure.
Sources: pyproject.toml129-163 src/backend/base/pyproject.toml1-20 src/lfx/pyproject.toml1-74 src/sdk/pyproject.toml1-4 docs/docs/Support/release-notes.mdx51-56
Langflow's frontend is a modern React 19 single-page application (SPA) featuring a rich flow builder and UI state management.
Highlights:
@xyflow/react for graph editing and visualization.See Frontend Architecture for detailed frontend component lifecycle and state management.
Sources: src/frontend/package.json1-150
The backend implements a layered service architecture initialized within FastAPI's lifespan. This pattern provides centralized management of critical system resources and lifecycle.
| Service Name | Purpose | Dependencies / Tech Used |
|---|---|---|
| SettingsService | Application configuration management with layered environment support | dynaconf, pydantic-settings |
| DatabaseService | Persistent storage of flows, components, users, and application data | SQLModel, Alembic migrations |
| AuthService | Authentication and authorization: JWT, API Keys, OAuth2, RBAC | PyJWT, bcrypt, Casbin |
| TelemetryService | Observability capturing traces and metrics | OpenTelemetry, Prometheus |
| TaskService | Background asynchronous task execution | asyncer |
| MCPComposerService | Workflow composer and MCP server integration | Modular pluggable extension system |
These backend services ensure extensibility, security, operational observability, and scalable workflow execution.
For in-depth service layer details, see System Architecture and Backend Architecture.
Sources: src/backend/base/pyproject.toml40-113 src/lfx/pyproject.toml46-52
Langflow supports multiple installation and deployment approaches tailored to different usage scenarios:
| Installation Option | Description | Typical Use Cases |
|---|---|---|
| Langflow Desktop | Electron-based native app for Windows and macOS | Simplest installation without manual dependencies |
| Docker | Containerized deployment with official images | Cloud deployments, container orchestration |
| Python Package (PyPI) | Install via uv pip install langflow | Local development, virtual environments |
| Source | Clone from GitHub, development environment with make run_cli | Contributors, advanced customization |
Example quickstart commands:
For detailed installation and environment setup instructions, refer to Installation and Getting Started.
Sources: README.md29-78 Makefile85-90
Langflow's core capabilities include:
lfx-* extension bundles supporting a wide range of AI services.Langflow is under active development with frequent releases, offering a responsive open-source community.
Sources: README.md18-28 src/backend/base/pyproject.toml68-75 pyproject.toml31-161 docs/docs/Support/release-notes.mdx51-95
The Langflow platform provides abstractions that map from natural language concepts and user interfaces down to concrete code entities within the codebase. Below two diagrams illustrate these key mappings.
This flow shows the user-facing interaction from the frontend visual editor and CLI, which communicate via the SDK client to API routes served by FastAPI. The API interacts with backend services for persistence and an execution engine that dynamically instantiates component classes to run workflows.
In this diagram, the high-level AI workflow components that users manipulate map to a base component class implemented in the lfx package. The component registry enumerates available components, including those provided by optional lfx-* extension bundles that encapsulate third-party AI service integrations.
To deepen your understanding of Langflow and get started with development, explore these detailed child pages:
This modular documentation structure enables focused exploration for different roles and interests.
Langflow is a comprehensive, extensible platform for creating, deploying, and managing AI-driven workflows and agents. Its layered architecture combines a React SPA frontend, a FastAPI backend with rich service integration, and a powerful component system enabling rapid AI application development. Multiple deployment modes including native desktop, Docker containers, and Python packages provide flexibility for diverse environments. Observability, security, and multi-agent orchestration features make Langflow suitable for enterprise-scale usage.
Sources:
Refresh this wiki
This wiki was recently refreshed. Please wait 7 days to refresh again.