Langflow

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

145.3Kstars
8.5Kforks
MIT License
Python

Langflow is an open-source platform for constructing AI agents and Retrieval-Augmented Generation pipelines using a drag-and-drop visual canvas backed by editable Python source code. Every component in the flow is a live Python class — developers can inspect, customize, and extend any node without leaving the editor, then immediately test changes in the built-in interactive playground.

The platform supports all major LLM providers (OpenAI, Anthropic, Google Gemini, Ollama, Mistral, IBM WatsonX), vector databases (Weaviate, Qdrant, Pinecone, Chroma, Cassandra, OpenSearch), and data connectors spanning Notion, Slack, Google Drive, Hugging Face, Composio, and dozens more. Flows can be exported as REST APIs or deployed as Model Context Protocol (MCP) servers, making AI logic accessible from any framework or stack.

Langflow ships as a Python package (installable with uv), a Docker image, and a Langflow Desktop app for Windows and macOS that bundles all dependencies. Observability is built in through LangSmith, LangFuse, OpenTelemetry, and Arize Phoenix integrations. The project has accumulated over 149,000 GitHub stars and releases on a roughly bi-weekly cadence with active contributions from more than 300 developers.

The architecture is modular: the lfx core library provides the graph execution engine and component registry, langflow-base wraps it with FastAPI services, and the top-level langflow package assembles optional bundles (docling, DuckDuckGo, IBM, arXiv). This separation allows teams to use the execution engine programmatically via the SDK or deploy the full visual authoring environment.

What You Get

  • Visual Canvas Editor - React Flow-powered drag-and-drop interface for designing multi-step AI pipelines with real-time edge connections and a component sidebar covering LLMs, vector stores, memory, and data tools.
  • Inline Python Code Editing - Every component exposes its underlying Python source code directly in the editor; developers can modify any node’s logic, add imports, and extend behavior without switching to a separate IDE.
  • Interactive Playground - Step-by-step flow execution with live input/output inspection per node, enabling rapid debugging of agent behavior, prompt tuning, and RAG retrieval quality.
  • MCP Server Export - Flows can be published as Model Context Protocol servers with a single toggle, turning any agent pipeline into a callable tool for MCP-compatible clients without additional code.
  • Multi-Agent Orchestration - Built-in support for multi-agent systems with conversation state management, tool routing, loop components for iterative workflows, and a conditional router for branching logic.
  • Comprehensive Component Library - Pre-built components for 50+ LLM providers, major vector databases, document loaders (Docling, Unstructured), embedding models, memory backends, and external service integrations.
  • Observability Integrations - Native connectors for LangSmith, LangFuse, Arize Phoenix, and OpenTelemetry to trace prompt chains, monitor token usage, and analyze agent performance in production.
  • Flexible Deployment Options - Ships as a Python package, Docker image, desktop application for Windows/macOS, and supports Kubernetes Helm charts and managed deployment on AWS, Azure, and GCP.

Common Use Cases

  • Enterprise chatbot development - A product team connects a GPT-4 model to internal documentation via Weaviate RAG and deploys the resulting flow as a REST API consumed by their customer-facing web app.
  • Document analysis pipelines - A legal firm builds a flow that ingests PDFs through Docling, stores embeddings in Pinecone, and uses Claude to extract key clauses and generate contract summaries on demand.
  • Multi-agent research systems - An AI team designs a research assistant where one agent searches the web via DuckDuckGo, another queries arXiv for papers, and a synthesis agent combines findings using a loop component.
  • MCP tool publishing - A developer builds a customer data lookup flow in Langflow and exports it as an MCP server, making it instantly callable from Claude Desktop and other MCP-compatible clients.
  • Rapid LLM prototyping - A startup evaluates multiple LLM providers by swapping model nodes in the same flow, comparing outputs in the playground, and exporting the winning configuration as a deployable API.
  • AI workflow automation - An operations team creates a Slack-triggered flow that classifies incoming support tickets, routes them to the appropriate team member, and logs results to a database — all without writing application code.

Under The Hood

Architecture Langflow employs a layered modular architecture centered on a graph execution engine that represents workflows as directed acyclic graphs of typed vertex objects. Vertices come in three subtypes — component, interface, and state — managed by a Graph class that handles topological sorting, cycle detection for iterative loop components, and scheduling of runnable vertices through a dedicated manager. The application is cleanly stratified: the lfx package contains the core graph engine and component registry; langflow-base wraps it with a FastAPI application providing REST endpoints, authentication, job queues, and database services via dependency injection; and the top-level langflow package assembles optional extension bundles. Real-time flow execution uses Server-Sent Events for streaming build results to the frontend, while MCP server functionality is implemented as a FastMCP wrapper that exposes flow operations as callable tools.

Tech Stack The backend runs on Python 3.10–3.14 with FastAPI handling HTTP routing and SQLAlchemy plus Alembic managing database persistence and schema migrations across SQLite and PostgreSQL. Async execution is coordinated through anyio and asyncio, with pydantic v2 providing data validation across the entire stack. The frontend is built with React 19 and TypeScript, using React Flow as the canvas rendering engine and Vite as the build tool, with Biome handling code formatting. MCP integration uses the fastmcp library for server-side protocol implementation. Observability connectors cover LangSmith, LangFuse, OpenTelemetry with OTLP export, and Arize Phoenix. Deployment targets include Docker with multi-architecture images, Kubernetes via Helm, Electron-packaged desktop distributions, and the uv package manager for local development.

Code Quality The project maintains an extensive test suite spanning unit, integration, and end-to-end Playwright tests across hundreds of test files. Code style is enforced via ruff for linting and formatting, with Pydantic v2 providing strict type validation at runtime boundaries. Custom exceptions are typed and domain-specific (ComponentBuildError, DeploymentGuardError, UnsupportedPostgreSQLVersionError), and async error handling uses explicit exception propagation rather than silent swallowing. GitHub Actions CI runs the test matrix across multiple Python versions and operating systems, with separate integration and E2E test suites gated on environment availability. The component architecture uses abstract base classes with well-defined input/output schemas, making third-party component development predictable.

What Makes It Unique Langflow’s most distinctive capability is the combination of visual authoring with inline Python source editing — users aren’t limited to pre-built component behaviors but can modify and extend any node’s code directly in the canvas without context-switching. Native MCP server export, turning any flow into a protocol-compliant tool endpoint with a single toggle, is genuinely ahead of competing visual AI builders. The pluggable bundle architecture allows independent extension packages (docling, IBM WatsonX, arXiv, DuckDuckGo) to be installed modularly without modifying core code. The AG-UI protocol integration for lifecycle event streaming enables real-time agentic UX where tool calls, intermediate outputs, and agent state transitions are surfaced to the frontend as they happen.

Self-Hosting

Langflow is released under the MIT License, which is one of the most permissive open-source licenses available. This means you can use, modify, and distribute Langflow in commercial products without any obligation to open-source your own code. There are no copyleft restrictions, no per-seat fees, and no runtime licensing requirements for self-hosted deployments. The license covers the entire codebase including the visual editor, backend API, and core execution engine.

Running Langflow yourself requires meaningful operational investment. The application needs Python 3.10–3.14, a database (SQLite works for development; PostgreSQL 15+ is required for production multi-user deployments), and sufficient CPU and memory to handle concurrent LLM API calls and vector database operations. The Docker image simplifies deployment considerably, and Kubernetes Helm charts are provided for orchestrated environments. You are responsible for configuring authentication (JWT-based with optional RS256 asymmetric keys), managing API key secrets for LLM providers, handling database backups, and planning for horizontal scaling as workflow traffic grows. The frontend build is included in the Docker image but must be compiled separately when running from source.

DataStax operates Langflow Cloud, a managed hosted version of the platform that handles infrastructure, automatic updates, high availability, and enterprise support contracts. Self-hosters give up managed upgrades (the project releases bi-weekly, requiring you to track and apply updates), enterprise SLA guarantees, and DataStax’s integrated Astra DB vector store optimizations that are pre-configured in the hosted tier. The open-source version includes all core features including MCP export and multi-agent orchestration; the cloud tier adds convenience, support, and deeper integration with Astra DB’s managed vector infrastructure.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search