Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ LANGFLOW_SAVE_DB_IN_CONFIG_DIR=
# SQLite example:
LANGFLOW_DATABASE_URL=sqlite:///./langflow.db

# Alembic logs path flag. If set to true, Alembic will log to stdout.
LANGFLOW_ALEMBIC_LOG_TO_STDOUT=False


# mem0 creates a directory
# for chat history, vector stores, and other artifacts
# its default path is ~/.mem0.
# we can change this path with
# environment variable "MEM0_DIR"
# Example: MEM0_DIR=/tmp/.mem0

# composio creates a cache directory
# for file uploads/downloads.
# its default path is ~/.composio
# we can change this path with
# environment variable "COMPOSIO_CACHE_DIR"
# Example: COMPOSIO_CACHE_DIR=/tmp/.composio


# Database connection retry
# Values: true, false
# If true, the database will retry to connect to the database if it fails
Expand Down Expand Up @@ -97,6 +116,21 @@ LANGFLOW_SUPERUSER=
# Example: LANGFLOW_SUPERUSER_PASSWORD=123456
LANGFLOW_SUPERUSER_PASSWORD=

# API Key Source
# Controls how API keys are validated for the x-api-key header
# Values: db, env
# - db (default): Validates against API keys stored in the database
# - env: Validates against the LANGFLOW_API_KEY environment variable
# Example: LANGFLOW_API_KEY_SOURCE=db
LANGFLOW_API_KEY_SOURCE=

# API Key (only used when LANGFLOW_API_KEY_SOURCE=env)
# The API key to use for authentication when API_KEY_SOURCE is set to 'env'
# This allows injecting a pre-defined API key via environment variables
# (useful for Kubernetes Secrets, CI/CD pipelines, etc.)
# Example: LANGFLOW_API_KEY=your-secure-api-key
LANGFLOW_API_KEY=

# Should store environment variables in the database
# Values: true, false
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=
Expand Down
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],
"plugins": [
"react",
Expand Down Expand Up @@ -87,4 +88,4 @@
"node/prefer-promises/dns": "error",
"node/prefer-promises/fs": "error"
}
}
}
4 changes: 4 additions & 0 deletions .github/changes-filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ python:
- "src/backend/base/uv.lock"
- "**/python_test.yml"
- ".github/workflows/ci.yml"
- "src/lfx/src/lfx/_assets/component_index.json"
components-changes:
- "src/backend/base/langflow/components/**"
- "src/lfx/src/lfx/_assets/component_index.json"
starter-projects-changes:
- "src/backend/base/langflow/initial_setup/**"
frontend-tests:
Expand All @@ -19,6 +21,7 @@ frontend:
- "**/typescript_test.yml"
- "**/jest_test.yml"
- ".github/workflows/ci.yml"
- "src/lfx/src/lfx/_assets/component_index.json"
docs:
- "docs/**"
docker:
Expand Down Expand Up @@ -66,6 +69,7 @@ components:
- "src/backend/base/langflow/components/**"
- "src/backend/base/langflow/initial_setup/**"
- "src/backend/base/langflow/serialization/**"
- "src/lfx/src/lfx/_assets/component_index.json"

workspace:
- "src/backend/base/langflow/inputs/**"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
name: Should Run CI
runs-on: ubuntu-latest
outputs:
should-run-ci: ${{ (github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group') }}
should-run-ci: ${{ github.event.pull_request.draft == false || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group') }}
should-run-tests: ${{ !contains(github.event.pull_request.labels.*.name, 'fast-track') || github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' }}
steps:
# Do anything just to make the job run
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref || github.ref }}
- name: Filter Paths
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref || github.ref }}

Expand All @@ -338,6 +338,9 @@ jobs:
name: Test Docker Images
if: ${{ needs.path-filter.outputs.docker == 'true' && needs.set-ci-condition.outputs.should-run-tests == 'true' }}
uses: ./.github/workflows/docker_test.yml
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

# https://github.com/langchain-ai/langchain/blob/master/.github/workflows/check_diffs.yml
ci_success:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeflash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: "Setup Environment"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
48 changes: 34 additions & 14 deletions .github/workflows/cross-platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
main-artifact-name: ${{ steps.set-names.outputs.main-artifact-name }}
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Setup Environment
uses: astral-sh/setup-uv@v6
with:
Expand Down Expand Up @@ -92,11 +92,11 @@ jobs:
# macOS AMD64
- os: macos
arch: amd64
runner: macos-13
runner: macos-latest-large
python-version: "3.10"
- os: macos
arch: amd64
runner: macos-13
runner: macos-latest-large
python-version: "3.12"
# macOS ARM64 (Apple Silicon)
- os: macos
Expand Down Expand Up @@ -145,6 +145,16 @@ jobs:
enable-cache: false
ignore-empty-workdir: true

- name: Install Protocol Buffers (macOS AMD64)
if: matrix.os == 'macos' && matrix.arch == 'amd64'
run: |
if ! command -v protoc &> /dev/null; then
brew install protobuf
else
echo "protoc already installed, skipping"
fi
shell: bash

# Download artifacts for wheel installation
- name: Download LFX package artifact
if: steps.install-method.outputs.method == 'wheel' && inputs.lfx-artifact-name != ''
Expand Down Expand Up @@ -194,7 +204,7 @@ jobs:
find ./base-dist -name "*.whl" -type f
WHEEL_FILE=$(find ./base-dist -name "*.whl" -type f | head -1)
if [ -n "$WHEEL_FILE" ]; then
uv pip install --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
uv pip install --prerelease=allow --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
else
echo "No wheel file found in ./base-dist/"
exit 1
Expand Down Expand Up @@ -236,7 +246,7 @@ jobs:
find ./base-dist -name "*.whl" -type f
WHEEL_FILE=$(find ./base-dist -name "*.whl" -type f | head -1)
if [ -n "$WHEEL_FILE" ]; then
uv pip install --python ./test-env/bin/python "$WHEEL_FILE"
uv pip install --prerelease=allow --python ./test-env/bin/python "$WHEEL_FILE"
else
echo "No wheel file found in ./base-dist/"
exit 1
Expand Down Expand Up @@ -392,18 +402,18 @@ jobs:
arch: amd64
runner: ubuntu-latest
python-version: "3.13"
- os: windows
arch: amd64
runner: windows-latest
python-version: "3.13"
- os: macos
arch: amd64
runner: macos-13
runner: macos-latest-large
python-version: "3.13"
- os: macos
arch: arm64
runner: macos-latest
python-version: "3.13"
- os: windows
arch: amd64
runner: windows-latest
python-version: "3.13"

steps:
- name: Determine install method
Expand Down Expand Up @@ -433,6 +443,16 @@ jobs:
enable-cache: false
ignore-empty-workdir: true

- name: Install Protocol Buffers (macOS AMD64)
if: matrix.os == 'macos' && matrix.arch == 'amd64'
run: |
if ! command -v protoc &> /dev/null; then
brew install protobuf
else
echo "protoc already installed, skipping"
fi
shell: bash

# Download artifacts for wheel installation
- name: Download LFX package artifact
if: steps.install-method.outputs.method == 'wheel' && inputs.lfx-artifact-name != ''
Expand Down Expand Up @@ -482,7 +502,7 @@ jobs:
find ./base-dist -name "*.whl" -type f
WHEEL_FILE=$(find ./base-dist -name "*.whl" -type f | head -1)
if [ -n "$WHEEL_FILE" ]; then
uv pip install --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
uv pip install --prerelease=allow --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
else
echo "No wheel file found in ./base-dist/"
exit 1
Expand All @@ -496,7 +516,7 @@ jobs:
find ./main-dist -name "*.whl" -type f
WHEEL_FILE=$(find ./main-dist -name "*.whl" -type f | head -1)
if [ -n "$WHEEL_FILE" ]; then
uv pip install --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
uv pip install --prerelease=allow --python ./test-env/Scripts/python.exe "$WHEEL_FILE"
else
echo "No wheel file found in ./main-dist/"
exit 1
Expand Down Expand Up @@ -524,7 +544,7 @@ jobs:
find ./base-dist -name "*.whl" -type f
WHEEL_FILE=$(find ./base-dist -name "*.whl" -type f | head -1)
if [ -n "$WHEEL_FILE" ]; then
uv pip install --python ./test-env/bin/python "$WHEEL_FILE"
uv pip install --prerelease=allow --python ./test-env/bin/python "$WHEEL_FILE"
else
echo "No wheel file found in ./base-dist/"
exit 1
Expand Down Expand Up @@ -712,4 +732,4 @@ jobs:
else
echo "❌ Critical platform tests were skipped unexpectedly"
exit 1
fi
fi
12 changes: 6 additions & 6 deletions .github/workflows/deploy-docs-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: ./docs/yarn.lock
cache: npm
cache-dependency-path: ./docs/package-lock.json

- name: Validate Branch Names
run: |
Expand Down Expand Up @@ -74,18 +74,18 @@ jobs:
echo "url=${{ vars.DOCS_DRAFT_BASE_URL }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/index.html" >> $GITHUB_OUTPUT

- name: Install dependencies
run: cd docs && yarn install
run: cd docs && npm install

- name: Build website
if: success()
run: |
set -o pipefail
cd docs
yarn build |& tee $GITHUB_WORKSPACE/build.log
npm run build |& tee $GITHUB_WORKSPACE/build.log
env:
BASE_URL: /langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
FORCE_COLOR: 0 # Disable color output
SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_DRAFT_SEGMENT_PUBLIC_WRITE_KEY }}
SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_DRAFT_IBM_SEGMENT_PUBLIC_WRITE_KEY }}

- name: Check Build Result
id: buildLogFail
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Storybook to GitHub Pages

on:
push:
branches:
- main
paths:
- 'src/frontend/**/*.stories.*'
- 'src/frontend/.storybook/**'
- 'src/frontend/package.json'
- '.github/workflows/deploy-storybook.yml'
workflow_dispatch: # Allow manual trigger

jobs:
deploy:
name: Deploy Storybook
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write

steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: src/frontend/package-lock.json

- name: Install dependencies
run: cd src/frontend && npm ci

- name: Build Storybook
run: cd src/frontend && npm run build-storybook

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: src/frontend/storybook-static

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

12 changes: 6 additions & 6 deletions .github/workflows/deploy_gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: ./docs/yarn.lock
cache: npm
cache-dependency-path: ./docs/package-lock.json

- name: Install dependencies
run: cd docs && yarn install
run: cd docs && npm install
- name: Build website
run: cd docs && yarn build
run: cd docs && npm run build
env:
SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_PROD_SEGMENT_PUBLIC_WRITE_KEY }}
SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_PROD_IBM_SEGMENT_PUBLIC_WRITE_KEY }}

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
Expand Down
Loading
Loading