Skip to content

feat: Modular dependency installation for langflow-base#6732

Merged
ogabrielluiz merged 48 commits into
mainfrom
better-langflow-base
Jan 21, 2026
Merged

feat: Modular dependency installation for langflow-base#6732
ogabrielluiz merged 48 commits into
mainfrom
better-langflow-base

Conversation

@ogabrielluiz
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz commented Feb 20, 2025

Summary

Makes langflow-base dependencies modular, allowing users to install only what they need instead of the full dependency tree.

For users who want everything (current behavior):

pip install langflow  # installs langflow-base[complete] automatically

For users who want a minimal installation:

pip install langflow-base[openai,chroma]  # only OpenAI and Chroma
pip install langflow-base[google,pinecone,langfuse]  # custom stack

Available Optional Groups

Category Options
Databases couchbase, cassandra, clickhouse, mongodb, supabase, redis, elasticsearch, postgresql
Vector Stores faiss, qdrant, weaviate, chroma, upstash, pinecone, milvus, mongodb-vectors, astradb
LLM Providers openai, anthropic, cohere, google, ollama, nvidia, mistral, sambanova, groq
Local LLMs llama-cpp, sentence-transformers, ctransformers
Monitoring langfuse, langwatch, langsmith, arize
Agent Frameworks dspy, smolagents
Tools beautifulsoup, serpapi, google-api, wikipedia, duckduckgo, yfinance, wolframalpha
Complete complete or all (installs everything)

Why?

  • Faster installation for users who don't need all integrations
  • Smaller Docker images for production deployments
  • Fewer dependency conflicts when only specific integrations are needed
  • Clearer understanding of what each integration requires

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Feb 20, 2025
@ogabrielluiz ogabrielluiz marked this pull request as draft February 20, 2025 18:06
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 20, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 20, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Feb 20, 2025
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 20, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 20, 2025

CodSpeed Performance Report

Merging #6732 will improve performances by 65.1%

Comparing better-langflow-base (fd380f4) with main (0886bda)

Summary

⚡ 1 improvements
✅ 13 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_build_flow_invalid_job_id 15.2 ms 9.2 ms +65.1%

Comment thread src/backend/base/pyproject.toml Outdated
Comment thread src/backend/base/pyproject.toml Outdated
Comment thread src/backend/base/pyproject.toml Outdated
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 16, 2026
ogabrielluiz and others added 3 commits January 19, 2026 11:35
…sting (#10111)

* feat: Introduce service registration decorator and enhance ServiceManager for pluggable service discovery

- Added `register_service` decorator to allow services to self-register with the ServiceManager.
- Enhanced `ServiceManager` to support multiple service discovery mechanisms, including decorator-based registration, config files, and entry points.
- Implemented methods for direct service class registration and plugin discovery from various sources, improving flexibility and extensibility of service management.

* feat: Implement VariableService for managing environment variables

- Introduced VariableService class to handle environment variables with in-memory caching.
- Added methods for getting, setting, deleting, and listing variables.
- Included logging for service initialization and variable operations.
- Created an __init__.py file to expose VariableService in the package namespace.

* feat: Enhance LocalStorageService with Service integration and async teardown

- Updated LocalStorageService to inherit from both StorageService and Service for improved functionality.
- Added a name attribute for service identification.
- Implemented an async teardown method for future extensibility, even though no cleanup is currently needed.
- Refactored the constructor to ensure proper initialization of both parent classes.

* feat: Implement telemetry service with abstract base class and minimal logging functionality

- Added `BaseTelemetryService` as an abstract base class defining the interface for telemetry services.
- Introduced `TelemetryService`, a lightweight implementation that logs telemetry events without sending data.
- Created `__init__.py` to expose the telemetry service in the package namespace.
- Ensured robust async methods for logging various telemetry events and handling exceptions.

* feat: Introduce BaseTracingService and implement minimal TracingService

- Added `BaseTracingService` as an abstract base class defining the interface for tracing services.
- Implemented `TracingService`, a lightweight version that logs trace events without external integrations.
- Included async methods for starting and ending traces, tracing components, and managing logs and outputs.
- Enhanced documentation for clarity on method usage and parameters.

* feat: Add unit tests for service registration decorators

- Introduced a new test suite for validating the functionality of the @register_service decorator.
- Implemented tests for various service types including LocalStorageService, TelemetryService, and TracingService.
- Verified behavior for service registration with and without overrides, ensuring correct service management.
- Included tests for custom service implementations and preservation of class functionality.
- Enhanced overall test coverage for the service registration mechanism.

* feat: Add comprehensive unit and integration tests for ServiceManager

- Introduced a suite of unit tests covering edge cases for service registration, lifecycle management, and dependency resolution.
- Implemented integration tests to validate service loading from configuration files and environment variables.
- Enhanced test coverage for various service types including LocalStorageService, TelemetryService, and VariableService.
- Verified behavior for service registration with and without overrides, ensuring correct service management.
- Ensured robust handling of error conditions and edge cases in service creation and configuration parsing.

* feat: Add unit and integration tests for minimal service implementations

- Introduced comprehensive unit tests for LocalStorageService, TelemetryService, TracingService, and VariableService.
- Implemented integration tests to validate the interaction between minimal services.
- Ensured robust coverage for file operations, service readiness, and exception handling.
- Enhanced documentation within tests for clarity on functionality and expected behavior.

* docs: Add detailed documentation for pluggable services architecture and usage

* feat: Add example configuration file for Langflow services

* docs: Update PLUGGABLE_SERVICES.md to enhance architecture benefits section

- Revised the documentation to highlight the advantages of the pluggable service system.
- Replaced the migration guide with a detailed overview of features such as automatic discovery, lazy instantiation, dependency injection, and lifecycle management.
- Clarified examples of service registration and improved overall documentation for better understanding.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* test(services): improve variable service teardown test with public API assertions

* docs(pluggable-service-layer): add docstrings for service manager and implementations

* Update component index

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…1351)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 19, 2026
@github-actions github-actions Bot removed the enhancement New feature or request label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fast-track Skip tests and sends PR into the merge queue lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants