Skip to content

Commit 307802f

Browse files
authored
Version 2 Langflow repo to DragDropAIAgentBuilder repo and fixed the merge conflict (#228)
* fixed the merge conflict * fix the main ruff check style * fix the flows issue * added new modifed file in main * fix the docker issue * fix the ruff check issue * part 3 ruff checks files like in test * debug the issues * working all the dir
1 parent 3b40797 commit 307802f

550 files changed

Lines changed: 153904 additions & 4849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
These instructions will walk you through the process of running a Langflow demo via GitHub Codespaces.
44

5-
If you want a faster and easier demo experience with Langflow, DataStax Langflow is a hosted environment with zero setup: [Sign up for a free account.](https://astra.datastax.com/signup?type=langflow)
5+
If you want a faster and easier demo experience with Langflow, download and install [Langflow Desktop](https://docs.langflow.org/get-started-installation#install-and-run-langflow-desktop) for the least complicated setup experience.
66

77
## Create a Codespace in GitHub
88

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Add Community Label
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
add-label:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
steps:
13+
- name: Add community label
14+
if: github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' && github.event.pull_request.author_association != 'COLLABORATOR'
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const pullRequestNumber = context.payload.pull_request.number;
19+
const repoDetails = {
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
issue_number: pullRequestNumber
23+
};
24+
await github.rest.issues.addLabels({
25+
...repoDetails,
26+
labels: ['community']
27+
});

.github/workflows/docs-update-openapi.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
5555
# Get the OpenAPI spec and save to file
5656
echo "Fetching OpenAPI spec..."
57-
curl -s http://localhost:7860/openapi.json > new_openapi.json
57+
curl -s http://localhost:7860/openapi.json > docs/openapi/new_openapi.json
5858
5959
# Verify file was created
60-
ls -la new_openapi.json
60+
ls -la docs/openapi/new_openapi.json
6161
6262
# stop the container when done
6363
docker stop langflow
@@ -67,19 +67,23 @@ jobs:
6767
id: compare
6868
run: |
6969
# Extract versions
70-
NEW_VERSION=$(jq -r '.info.version' new_openapi.json)
71-
CURRENT_VERSION=$(jq -r '.info.version' docs/openapi.json)
70+
NEW_VERSION=$(jq -r '.info.version' docs/openapi/new_openapi.json)
71+
CURRENT_VERSION=$(jq -r '.info.version' docs/openapi/openapi.json)
7272
7373
echo "Current version: $CURRENT_VERSION"
7474
echo "New version: $NEW_VERSION"
7575
7676
# Compare file content (normalize by sorting keys)
77-
jq --sort-keys . new_openapi.json > sorted_new.json
78-
jq --sort-keys . docs/openapi.json > sorted_current.json
77+
jq --sort-keys . docs/openapi/new_openapi.json > docs/openapi/sorted_new.json
78+
jq --sort-keys . docs/openapi/openapi.json > docs/openapi/sorted_current.json
7979
80-
if ! cmp -s sorted_new.json sorted_current.json; then
80+
if ! cmp -s docs/openapi/sorted_new.json docs/openapi/sorted_current.json; then
8181
echo "OpenAPI spec content has changed."
8282
83+
# Clean the new spec for ReDoc formatting
84+
echo "Cleaning OpenAPI spec formatting..."
85+
python3 docs/scripts/clean_openapi_formatting.py docs/openapi/new_openapi.json
86+
8387
# Compare versions (assuming semantic versioning)
8488
if [ "$(printf '%s\n' "$CURRENT_VERSION" "$NEW_VERSION" | sort -V | tail -n1)" == "$NEW_VERSION" ] && [ "$CURRENT_VERSION" != "$NEW_VERSION" ]; then
8589
echo "New version detected. Creating PR."
@@ -93,14 +97,14 @@ jobs:
9397
echo "UPDATE_REASON=content updated without version change" >> $GITHUB_ENV
9498
fi
9599
96-
cat new_openapi.json | jq > docs/openapi.json
100+
cat docs/openapi/new_openapi.json | jq > docs/openapi/openapi.json
97101
else
98102
echo "No changes detected in OpenAPI spec content."
99103
echo "NEEDS_UPDATE=false" >> $GITHUB_ENV
100104
fi
101105
102106
# Clean up
103-
rm new_openapi.json sorted_new.json sorted_current.json
107+
rm docs/openapi/new_openapi.json docs/openapi/sorted_new.json docs/openapi/sorted_current.json
104108
105109
- name: Create Pull Request
106110
if: env.NEEDS_UPDATE == 'true' && steps.check_pull_request.outputs.pr_exists != 'true'

.github/workflows/typescript_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ env:
6969
# Define the directory where Playwright browsers will be installed.
7070
# This path is used for caching across workflows
7171
PLAYWRIGHT_BROWSERS_PATH: "ms-playwright"
72-
PLAYWRIGHT_VERSION: "1.49.1" # Add explicit version for cache key
72+
PLAYWRIGHT_VERSION: "1.56.0"
7373

7474
jobs:
7575
determine-test-suite:

DEVELOPMENT.md

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,32 @@ git remote set-url --push upstream no_push
3131
3232
## Set up Environment
3333

34-
There are two options available to you: the 'easy' and recommended option is to use a Development Container ("[Dev Container](https://containers.dev/)"), or you can choose to use your own OS / environment.
34+
There are two options available to you: use your local environment with `make` commands (recommended for macOS and Linux), or use a Development Container ("[Dev Container](https://containers.dev/)") which is recommended for Windows users.
3535

36-
### Option 1 (Preferred): Use a Dev Container
37-
38-
Open this repository as a Dev Container per your IDEs instructions.
39-
40-
#### Microsoft VS Code
41-
42-
- See [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
43-
- You may also find it helpful to [share `git` credentials](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials) with the container
44-
45-
### Option 2: Use Your Own Environment
36+
### Option 1 (Recommended): Use Your Local Environment
4637

4738
Install Pre-Requisites:
4839

49-
- **Operating System**: macOS or Linux; Windows users **_MUST_** develop under WSL.
40+
- **Operating System**: macOS or Linux; Windows users should use WSL or consider Option 2 (Dev Container).
5041
- **`git`**: The project uses the ubiquitous `git` tool for change control.
51-
- **`make`**: The project uses `make` to coordidinate packaging.
42+
- **`make`**: The project uses `make` to coordinate packaging.
5243
- **`uv`**: This project uses `uv` (`>=0.4`), a Python package and project manager from Astral. Install instructions at https://docs.astral.sh/uv/getting-started/installation/.
5344
- **`npm`**: The frontend files are built with Node.js (`v22.12 LTS`) and `npm` (`v10.9`). Install instructions at https://nodejs.org/en/download/package-manager.
5445
- Windows (WSL) users: ensure `npm` is installed within WSL environment; `which npm` should resolve to a Linux location, not a Windows location.
5546

47+
### Option 2: Use a Dev Container (Recommended for Windows)
48+
49+
Open this repository as a Dev Container per your IDEs instructions.
50+
51+
A preconfigured `.devcontainer` is included in this repository and is auto-detected by supported IDEs.
52+
53+
#### Microsoft VS Code
54+
55+
To start the preconfigured `.devcontainer` with the VS Code Dev Containers extension, from the Command Palette, run the Dev Containers: Reopen in Container command.
56+
57+
- See [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
58+
- You may also find it helpful to [share `git` credentials](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials) with the container
59+
5660
### Initial Environment Validation
5761

5862
To setup and validate the initial environment, run:
@@ -118,6 +122,25 @@ The backend service runs as a FastAPI service on Python, and is responsible for
118122
make backend
119123
```
120124

125+
> [!TIP]
126+
> **Component Development Mode**: By default, Langflow uses a prebuilt component index for fast startup (~10ms). If you're actively developing or modifying components, enable dynamic component loading with `LFX_DEV`:
127+
>
128+
> ```bash
129+
> # Load all components dynamically
130+
> LFX_DEV=1 make backend
131+
>
132+
> # Load only specific component modules (faster dev workflow)
133+
> LFX_DEV=mistral,openai,anthropic make backend
134+
> ```
135+
>
136+
> The list mode is particularly useful when working on specific integrations, as it significantly speeds up startup time by only loading the components you need.
137+
>
138+
> Without `LFX_DEV`, component changes require rebuilding the index:
139+
>
140+
> ```bash
141+
> uv run python scripts/build_component_index.py
142+
> ```
143+
121144
You will get output similar to:
122145
123146
```
@@ -181,9 +204,18 @@ Navigate to http://localhost:3001/ in a browser and view the documentation. Docu
181204
182205
Components reside in folders under `src/backend/base/langflow`, and their unit tests under `src/backend/base/tests/unit/components`.
183206
207+
> [!IMPORTANT]
208+
> **Component Development Mode**: When actively developing components, make sure to run the backend with `LFX_DEV=1` to enable live reloading:
209+
>
210+
> ```bash
211+
> LFX_DEV=1 make backend
212+
> ```
213+
>
214+
> This ensures your component changes are immediately reflected without needing to rebuild the component index.
215+
184216
### Adding a Component
185217
186-
Add the component to the appropriate subdirectory, and add the component to the `__init__.py` file (alphabetical ordering on the `import` and the `__all__` list). Assuming the backend and frontend services are running, the backend service will restart as these files are changed. The new component will be visible after the backend is restarted, _*and*_ after you hit "refresh" in the browser.
218+
Add the component to the appropriate subdirectory, and add the component to the `__init__.py` file (alphabetical ordering on the `import` and the `__all__` list). Assuming the backend and frontend services are running **with `LFX_DEV=1`**, the backend service will restart as these files are changed. The new component will be visible after the backend is restarted, _*and*_ after you hit "refresh" in the browser.
187219
188220
> [!TIP]
189221
> It is faster to copy-paste the component code from your editor into the UI _without_ saving in the source code in the editor, and once you are satisfied it is working you can save (restarting the backend) and refresh the browser to confirm it is present.
@@ -197,6 +229,16 @@ Modifying a component is much the same as adding a component: it is generally ea
197229
> [!NOTE]
198230
> If you have an old version of the component on the canvas when changes are saved and the backend service restarts, that component should show "Updates Available" when the canvas is reloaded (i.e. a browser refresh). [Issue 5179](https://github.com/langflow-ai/langflow/issues/5179) indicates this behavior is not consistent, at least in a development setting.
199231
232+
### Component Index
233+
234+
When you're done modifying components and ready to commit, the component index will be automatically updated by CI when you create a pull request. The GitHub Actions workflow will detect changes to components and rebuild the index, committing it to your PR branch if needed.
235+
236+
If you want to manually rebuild the index locally for testing:
237+
238+
```bash
239+
uv run python scripts/build_component_index.py
240+
```
241+
200242
## Building and Testing Changes
201243
202244
When you are ready to commit, and before you commit, you should consider the following:

README.md

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
<!-- markdownlint-disable MD030 -->
22

3-
[Drag and Drop AI Agent Builder](https://visualaiagentsbuilder.org) is a powerful tool for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and a built-in API server that turns every agent into an API endpoint that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
4-
![Langflow logo](./docs/static/img/langflow-logo-color-black-solid.svg)
5-
3+
<picture>
4+
<source media="(prefers-color-scheme: dark)" srcset="./docs/static/img/langflow-logo-color-blue-bg.svg">
5+
<img src="./docs/static/img/langflow-logo-color-black-solid.svg" alt="Langflow logo">
6+
</picture>
67

78
[![Release Notes](https://img.shields.io/github/release/langflow-ai/langflow?style=flat-square)](https://github.com/langflow-ai/langflow/releases)
89
[![PyPI - License](https://img.shields.io/badge/license-MIT-orange)](https://opensource.org/licenses/MIT)
910
[![PyPI - Downloads](https://img.shields.io/pypi/dm/langflow?style=flat-square)](https://pypistats.org/packages/langflow)
10-
[![GitHub star chart](https://img.shields.io/github/stars/langflow-ai/langflow?style=flat-square)](https://star-history.com/#langflow-ai/langflow)
11-
[![Open Issues](https://img.shields.io/github/issues-raw/langflow-ai/langflow?style=flat-square)](https://github.com/langflow-ai/langflow/issues)
1211
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langflow-ai.svg?style=social&label=Follow%20%40Langflow)](https://twitter.com/langflow_ai)
1312
[![YouTube Channel](https://img.shields.io/youtube/channel/subscribers/UCn2bInQrjdDYKEEmbpwblLQ?label=Subscribe)](https://www.youtube.com/@Langflow)
1413
[![Discord Server](https://img.shields.io/discord/1116803230643527710?logo=discord&style=social&label=Join)](https://discord.gg/EqksyE2EX9)
1514
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/langflow-ai/langflow)
1615

17-
> [!CAUTION]
18-
> - Langflow versions 1.6.0 through 1.6.3 have a critical bug where `.env` files are not read, potentially causing security vulnerabilities. **DO NOT** upgrade to these versions if you use `.env` files for configuration. Instead, upgrade to 1.6.4, which includes a fix for this bug.
19-
> - Windows users of Langflow Desktop should **not** use the in-app update feature to upgrade to Langflow version 1.6.0. For upgrade instructions, see [Windows Desktop update issue](https://docs.langflow.org/release-notes#windows-desktop-update-issue).
20-
> - Users must update to Langflow >= 1.3 to protect against [CVE-2025-3248](https://nvd.nist.gov/vuln/detail/CVE-2025-3248)
21-
> - Users must update to Langflow >= 1.5.1 to protect against [CVE-2025-57760](https://github.com/langflow-ai/langflow/security/advisories/GHSA-4gv9-mp8m-592r)
22-
>
23-
> For security information, see our [Security Policy](./SECURITY.md) and [Security Advisories](https://github.com/langflow-ai/langflow/security/advisories).
24-
25-
[Langflow](https://langflow.org) is a powerful tool for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and built-in API and MCP servers that turn every workflow into a tool that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
16+
[Langflow](https://langflow.org) is a powerful platform for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and built-in API and MCP servers that turn every workflow into a tool that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
2617

2718
## ✨ Highlight features
2819

29-
- **Visual builder interface** to quickly get started and iterate .
20+
- **Visual builder interface** to quickly get started and iterate.
3021
- **Source code access** lets you customize any component using Python.
3122
- **Interactive playground** to immediately test and refine your flows with step-by-step control.
3223
- **Multi-agent orchestration** with conversation management and retrieval.
@@ -35,29 +26,68 @@
3526
- **Observability** with LangSmith, LangFuse and other integrations.
3627
- **Enterprise-ready** security and scalability.
3728

29+
## 🖥️ Langflow Desktop
30+
31+
Langflow Desktop is the easiest way to get started. It includes dependency management and automatic updates.
32+
Available for Windows and macOS.
33+
34+
[📥 Download Langflow Desktop](https://www.langflow.org/desktop)
35+
3836
## ⚡️ Quickstart
3937

40-
Langflow requires [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) and [uv](https://docs.astral.sh/uv/getting-started/installation/).
38+
### Install locally (recommended)
4139

42-
1. To install Langflow, run:
40+
Requires Python 3.10–3.13 and [uv](https://docs.astral.sh/uv/getting-started/installation/) (recommended package manager).
4341

42+
#### Install
43+
44+
From a fresh directory, run:
4445
```shell
4546
uv pip install langflow -U
4647
```
4748

48-
2. To run Langflow, run:
49+
The latest Langflow package is installed.
50+
For more information, see [Install and run the Langflow OSS Python package](https://docs.langflow.org/get-started-installation#install-and-run-the-langflow-oss-python-package).
51+
52+
#### Run
4953

54+
To start Langflow, run:
5055
```shell
5156
uv run langflow run
5257
```
5358

54-
3. Go to the default Langflow URL at `http://127.0.0.1:7860`.
59+
Langflow starts at http://127.0.0.1:7860.
60+
61+
That's it! You're ready to build with Langflow! 🎉
62+
63+
## 📦 Other install options
64+
65+
### Run from source
66+
If you've cloned this repository and want to contribute, run this command from the repository root:
67+
```shell
68+
make run_cli
69+
```
70+
For more information, see [DEVELOPMENT.md](./DEVELOPMENT.md).
71+
72+
### Docker
73+
Start a Langflow container with default settings:
74+
```shell
75+
docker run -p 7860:7860 langflowai/langflow:latest
76+
```
77+
Langflow is available at http://localhost:7860/.
78+
For configuration options, see the [Docker deployment guide](https://docs.langflow.org/deployment-docker).
5579

56-
For more information about installing Langflow, including Docker and Desktop options, see [Install Langflow](https://docs.langflow.org/get-started-installation).
80+
> [!CAUTION]
81+
> - Langflow versions 1.6.0 through 1.6.3 have a critical bug where `.env` files are not read, potentially causing security vulnerabilities. **DO NOT** upgrade to these versions if you use `.env` files for configuration. Instead, upgrade to 1.6.4, which includes a fix for this bug.
82+
> - Windows users of Langflow Desktop should **not** use the in-app update feature to upgrade to Langflow version 1.6.0. For upgrade instructions, see [Windows Desktop update issue](https://docs.langflow.org/release-notes#windows-desktop-update-issue).
83+
> - Users must update to Langflow >= 1.3 to protect against [CVE-2025-3248](https://nvd.nist.gov/vuln/detail/CVE-2025-3248)
84+
> - Users must update to Langflow >= 1.5.1 to protect against [CVE-2025-57760](https://github.com/langflow-ai/langflow/security/advisories/GHSA-4gv9-mp8m-592r)
85+
>
86+
> For security information, see our [Security Policy](./SECURITY.md) and [Security Advisories](https://github.com/langflow-ai/langflow/security/advisories).
5787
58-
## 📦 Deployment
88+
## 🚀 Deployment
5989

60-
Langflow is completely open source and you can deploy it to all major deployment clouds. To learn how to use Docker to deploy Langflow, see the [Docker deployment guide](https://docs.langflow.org/deployment-docker).
90+
Langflow is completely open source and you can deploy it to all major deployment clouds. To learn how to deploy Langflow, see our [Langflow deployment guides](https://docs.langflow.org/deployment-overview).
6191

6292
## ⭐ Stay up-to-date
6393

@@ -76,4 +106,3 @@ We welcome contributions from developers of all levels. If you'd like to contrib
76106
## ❤️ Contributors
77107

78108
[![langflow contributors](https://contrib.rocks/image?repo=langflow-ai/langflow)](https://github.com/langflow-ai/langflow/graphs/contributors)
79-

docker/build_and_push.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@ ENV LANGFLOW_PORT=7861
124124
ENV LANGFLOW_BACKEND_PORT=7861
125125
ENV NGINX_PORT=7860
126126

127-
CMD ["/usr/local/bin/langflow-entrypoint.sh"]
127+
CMD ["/usr/local/bin/langflow-entrypoint.sh"]

docker/build_and_push_backend.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Keep this syntax directive! It's used to enable Docker BuildKit
33

44
ARG LANGFLOW_IMAGE
5-
FROM $LANGFLOW_IMAGE
5+
FROM ${LANGFLOW_IMAGE}
66

77
RUN rm -rf /app/.venv/langflow/frontend
88

0 commit comments

Comments
 (0)