Contribute to Langflow
This guide is intended to help you start contributing to Langflow. As an open-source project in a rapidly developing field, Langflow welcomes contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
To contribute code or documentation to this project, follow the fork and pull request workflow.
Contribute code​
Develop Langflow locally with uv and Node.js.
Prerequisites​
Clone the Langflow Repository​
-
Navigate to the Langflow GitHub repository, and then click Fork.
-
Add the new remote to your local repository on your local machine:
_10git remote add fork https://github.com/<your_git_username>/langflow.git
Prepare the development environment​
- Create development hooks.
_10make init
This command sets up the development environment by installing backend and frontend dependencies, building the frontend static files, and initializing the project. It runs make install_backend
, make install_frontend
, make build_frontend
, and finally uv run langflow run
to start the application.
- Run
make lint
,make format
, andmake unit_tests
before pushing to the repository.
Debug​
The repo includes a .vscode/launch.json
file for debugging the backend in VSCode, which is faster than debugging with Docker Compose. To debug Langflow with the launch.json
file in VSCode:
- Open Langflow in VSCode.
- Press Ctrl+Shift+D for Windows or Cmd+Shift+D for Mac to open the Run and Debug view.
- From the Run and Debug dropdown, choose a debugging configuration.
- Click the green Play button or press F5 to start debugging.
Use launch.json
to quickly debug different parts of your application, like the backend, frontend, or CLI, directly from VSCode.
Run Langflow locally​
After setting up the environment with make init
, you can run Langflow's backend and frontend separately for development.
Langflow recommends using a virtual environment like venv or conda to isolate dependencies.
Before you begin, ensure you have uv and Node.js installed.
- In the repository root, install the dependencies and start the development server for the backend:
_10make backend
- Install dependencies and start the frontend:
_10make frontend
This approach allows you to work on the backend and frontend independently, with hot-reloading for faster development.
Contribute documentation​
The documentation is built using Docusaurus and written in Markdown.
Prerequisites​
Clone the Langflow repository​
-
Navigate to the Langflow GitHub repository, and then click Fork.
-
Add the new remote to your local repository on your local machine:
_10git remote add fork https://github.com/<your_git_username>/langflow.git
- To run the documentation locally, run the following commands:
_10cd docs_10npm install_10npm run start
The documentation will be available at localhost:3000
and all the files are located in the docs/docs
folder.
Open a pull request​
Once you have written and manually tested your changes with make lint
and make unit_tests
, open a pull request to send your changes upstream to the main Langflow repository.
- Open a new GitHub pull request with your patch against the
main
branch. - Ensure the PR title follows semantic commit conventions. For example, features are
feat: add new feature
and fixes arefix: correct issue with X
. - A Langflow maintainer will review your pull request. Thanks for your contribution!
Some additional guidance on pull request titles:
- Ensure the pull request description clearly describes the problem and solution. If the PR fixes an issue, include a link to the fixed issue in the PR description with
Fixes #1234
. - Pull request titles appear in Langflow's release notes, so they should explain what the PR does as explicitly as possible.
- Pull requests should strive to fix one thing only, and should contain a good description of what is being fixed.
For more information, see the Python Developer's Guide.