* Add type check before issubclass in service discovery
Added an isinstance(obj, type) check before issubclass to prevent errors when inspecting module members for Service and ServiceFactory subclasses. This improves robustness when dynamically importing services and factories.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Enhance graph loading functionality to support async retrieval
- Updated `load_graph_from_script` to be an async function, allowing for the retrieval of the graph via an async `get_graph` function if available.
- Implemented fallback to the existing `graph` variable for backward compatibility.
- Enhanced `find_graph_variable` to identify both `get_graph` function definitions and `graph` variable assignments, improving flexibility in script handling.
* feat: Update load_graph_from_script to support async graph retrieval
- Refactored `load_graph_from_script` to be an async function, enabling the use of an async `get_graph` function for graph retrieval.
- Implemented a fallback mechanism to access the `graph` variable for backward compatibility.
- Enhanced error handling to provide clearer messages when neither `graph` nor `get_graph()` is found in the script.
* feat: Refactor simple_agent.py to support async graph creation
- Introduced an async `get_graph` function to handle the initialization of components and graph creation without blocking.
- Updated the logging configuration and component setup to be part of the async function, improving the overall flow and responsiveness.
- Enhanced documentation for the `get_graph` function to clarify its purpose and return type.
* feat: Update serve_command and run functions to support async graph loading
- Refactored `serve_command` to be an async function using `syncify`, allowing for non-blocking execution.
- Updated calls to `load_graph_from_path` and `load_graph_from_script` within `serve_command` and `run` to await their results, enhancing performance and responsiveness.
- Improved overall async handling in the CLI commands for better integration with async workflows.
* feat: Refactor load_graph_from_path to support async execution
- Changed `load_graph_from_path` to an async function, enabling non-blocking graph loading.
- Updated the call to `load_graph_from_script` to use await, improving performance during graph retrieval.
- Enhanced the overall async handling in the CLI for better integration with async workflows.
* feat: Enhance async handling in simple_agent and related tests
- Updated `get_graph` function in `simple_agent.py` to utilize async component initialization for improved responsiveness.
- Modified test cases in `test_simple_agent_in_lfx_run.py` to validate the async behavior of `get_graph`.
- Refactored various test functions across multiple files to support async execution, ensuring compatibility with the new async workflows.
- Improved documentation for async functions to clarify their purpose and usage.
* docs: Implement async get_graph function for improved component initialization
- Introduced an async `get_graph` function in `README.md` to facilitate non-blocking component initialization.
- Enhanced the logging configuration and component setup within the async function, ensuring a smoother flow.
- Updated documentation to clarify the purpose and return type of the `get_graph` function, aligning with the async handling improvements.
* refactor: reorder imports in simple_agent test file
* style: reorder imports in simple_agent test file
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* update component index
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Introduce telemetry tracking for sensitive field types
Added a new set of field types that should not be tracked in telemetry due to their sensitive nature, including PASSWORD, AUTH, FILE, CONNECTION, and MCP. Updated relevant input classes to ensure telemetry tracking is disabled for these sensitive fields, enhancing data privacy and security.
* feat: Enhance telemetry payloads with additional fields and serialization support
Added new fields to the ComponentPayload and ComponentInputsPayload classes, including component_id and component_run_id, to improve telemetry data tracking. Introduced a serialize_input_values function to handle JSON serialization of component input values, ensuring robust handling of input data for telemetry purposes.
* feat: Implement telemetry input tracking and caching
Added functionality to track and cache telemetry input values within the Component class. Introduced a method to determine if inputs should be tracked based on sensitivity and an accessor for retrieving cached telemetry data, enhancing the robustness of telemetry handling.
* feat: Add logging for component input telemetry
Introduced a new method, log_package_component_inputs, to the TelemetryService for logging telemetry data related to component inputs. This enhancement improves the tracking capabilities of the telemetry system, allowing for more detailed insights into component interactions.
* feat: Enhance telemetry logging for component execution
Added functionality to log component input telemetry both during successful execution and error cases. Introduced a unique component_run_id for each execution to improve tracking. This update ensures comprehensive telemetry data collection, enhancing the robustness of the telemetry system.
* feat: Extend telemetry payload tests and enhance serialization
Added tests for the new component_id and component_run_id fields in ComponentPayload and ComponentInputsPayload classes. Introduced a new test suite for ComponentInputTelemetry, covering serialization of various data types and handling of edge cases. This update improves the robustness and coverage of telemetry data handling in the system.
* fix: Update default telemetry tracking behavior in BaseInputMixin
Changed the default value of track_in_telemetry from True to False in the BaseInputMixin class. Updated documentation to clarify that telemetry tracking is now opt-in and can be explicitly enabled for individual input types, enhancing data privacy and control.
* fix: Update telemetry tracking defaults for input types
Modified the default value of `track_in_telemetry` for various input classes to enhance data privacy. Regular inputs now default to False, while safe inputs like `IntInput` and `BoolInput` default to True, ensuring explicit opt-in for telemetry tracking. Updated related tests to reflect these changes.
* feat: add chunk_index and total_chunks fields to ComponentInputsPayload
This commit adds two new optional fields to ComponentInputsPayload:
- chunk_index: Index of this chunk in a split payload sequence
- total_chunks: Total number of chunks in the split sequence
Both fields default to None and use camelCase aliases for serialization.
This is Task 1 of the telemetry query parameter splitting implementation.
Tests included:
- Verify fields exist and can be set
- Verify camelCase serialization aliases work correctly
- Verify fields default to None when not provided
Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: update ComponentInputsPayload to support automatic splitting of oversized inputs
This commit enhances the ComponentInputsPayload class by implementing functionality to automatically split input values into multiple chunks if they exceed the maximum URL size limit. Key changes include:
- Added methods for calculating URL size, truncating oversized values, and splitting payloads.
- Updated component_inputs field to accept a dictionary instead of a string for better handling of input values.
- Improved documentation for the ComponentInputsPayload class to reflect the new splitting behavior and usage examples.
These changes aim to improve telemetry data handling and ensure compliance with URL length restrictions.
* refactor: enhance log_package_component_inputs to handle oversized payloads
This commit updates the log_package_component_inputs method in the TelemetryService class to split component input payloads into multiple requests if they exceed the maximum URL size limit. Key changes include:
- Added logic to split the payload using the new split_if_needed method.
- Each chunk is queued separately for telemetry logging.
These improvements ensure better handling of telemetry data while adhering to URL length restrictions.
* refactor: centralize maximum telemetry URL size constant
This commit introduces a centralized constant, MAX_TELEMETRY_URL_SIZE, to define the maximum URL length for telemetry GET requests. Key changes include:
- Added MAX_TELEMETRY_URL_SIZE constant to schema.py for better maintainability.
- Updated split_if_needed method in ComponentInputsPayload to use the new constant instead of a hardcoded value.
- Adjusted the TelemetryService to reference the centralized constant for URL size limits.
These changes enhance code clarity and ensure consistent handling of URL size limits across the telemetry service.
* refactor: update ComponentInputsPayload tests to use dictionary inputs
This commit modifies the tests for ComponentInputsPayload to utilize a dictionary for component inputs instead of a serialized JSON string. Key changes include:
- Renamed the test method to reflect the new input type.
- Removed unnecessary serialization steps and assertions related to JSON strings.
- Added assertions to verify the correct handling of dictionary inputs.
These changes streamline the testing process and improve clarity in how component inputs are represented.
* test: add integration tests for telemetry service payload splitting
This commit introduces integration tests for the TelemetryService to verify its handling of large and small payloads. Key changes include:
- Added tests to ensure large payloads are split into multiple chunks and queued correctly.
- Implemented a test to confirm that small payloads are not split and result in a single queued event.
- Created a mock settings service for testing purposes.
These tests enhance the reliability of the telemetry service by ensuring proper payload management.
* test: enhance ComponentInputsPayload tests with additional scenarios
This commit expands the test suite for ComponentInputsPayload by adding various scenarios to ensure robust handling of input payloads. Key changes include:
- Introduced tests for calculating URL size, ensuring it returns a positive integer and accounts for encoding.
- Added tests to verify the splitting logic for large payloads, including checks for chunk metadata and preservation of fixed fields.
- Implemented property-based tests using Hypothesis to validate that all chunks respect the maximum URL size and preserve original data.
These enhancements improve the reliability and coverage of the ComponentInputsPayload tests, ensuring proper functionality under various conditions.
* [autofix.ci] apply automated fixes
* optimize query param encoding
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
* refactor: extract telemetry logging logic into a separate function
This commit introduces a new function, _log_component_input_telemetry, to centralize the logic for logging component input telemetry. The function is called in two places within the generate_flow_events function, improving code readability and maintainability by reducing duplication. This change enhances the clarity of telemetry handling in the flow generation process.
* refactor: optimize truncation logic in ComponentInputsPayload
This commit refines the truncation logic for input values in the ComponentInputsPayload class. The previous binary search method for string values has been simplified, allowing for direct truncation of both string and non-string values. This change enhances code clarity and maintains functionality while ensuring optimal handling of oversized inputs.
* refactor: update telemetry tracking logic to respect opt-in flag
This commit modifies the telemetry tracking logic in the Component class to change the default behavior of the `track_in_telemetry` attribute from True to False. This adjustment enhances user privacy by requiring explicit consent for tracking input objects in telemetry. The change ensures that sensitive field types are still auto-excluded from tracking, maintaining the integrity of the telemetry data.
* refactor: update tests to use dictionary format for component inputs
This commit modifies the integration tests for telemetry payload validation and component input telemetry to utilize dictionaries for component inputs instead of serialized JSON strings. Key changes include:
- Updated assertions to compare dictionary inputs directly.
- Enhanced clarity and maintainability of the test cases by removing unnecessary serialization steps.
These changes improve the representation of component inputs in tests, aligning with recent refactoring efforts.
* [autofix.ci] apply automated fixes
* refactor: specify type for current_chunk_inputs in ComponentInputsPayload
This commit updates the type annotation for the current_chunk_inputs variable in the ComponentInputsPayload class to explicitly define it as a dictionary. This change enhances code clarity and maintainability by providing better type information for developers working with the code.
* test: add component_id to ComponentPayload tests
This commit enhances the test cases for the ComponentPayload class by adding a component_id parameter to various initialization tests. The updates ensure that the component_id is properly tested across different scenarios, including valid parameters, error messages, and edge cases. This change improves the robustness of the tests and aligns with recent updates to the ComponentPayload structure.
* [autofix.ci] apply automated fixes
* feat: add component_id to ComponentPayload in build_vertex function
* fix: update MAX_TELEMETRY_URL_SIZE to 2048 and adjust related tests
This commit increases the maximum URL size for telemetry GET requests from 2000 to 2048 bytes to align with Scarf's specifications. Corresponding test assertions have been updated to reference the new constant, ensuring consistency across the codebase.
* [autofix.ci] apply automated fixes
* feat(telemetry): add track_in_telemetry field to starter project configurations
* refactor(telemetry): remove unused blank line in test imports
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* update starter templates
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
* chore: update Playwright and related dependencies to version 1.56.0 in package.json and package-lock.json
* refactor: update addLegacyComponents function to improve selector checks
- Replaced the expect assertion with a waitForSelector call to ensure the sidebar legacy switch is checked, enhancing reliability in tests.
- Updated import statement for Page from "@playwright/test" for consistency with current practices.
* fix playwright imports
* chore: update Playwright version in CI workflow to 1.56.0 for consistency with project dependencies
* refactor: enhance lockFlow and unlockFlow functions for improved visibility checks
- Replaced isVisible calls with waitFor to ensure elements are visible before proceeding, enhancing test reliability.
- Removed unnecessary waitForTimeout calls to streamline the flow execution process.
* test(playwright): add validation for settings menu header text
* refactor(playwright): improve lock flow test with expect assertions
* refactor(playwright): simplify legacy component toggle validation
* refactor: implement lazy initialization for ServiceManager with thread safety
- Replaced direct instantiation of ServiceManager with a lazy initialization approach using a global variable and threading lock.
- Updated the public API to expose `get_service_manager` for retrieving the singleton instance.
- Ensured thread-safe access to the ServiceManager instance to prevent issues during module import.
* refactor: update service manager imports to use get_service_manager
- Replaced direct imports of service_manager with get_service_manager in multiple files to ensure consistent access to the singleton instance.
- This change enhances code clarity and maintains the lazy initialization approach for the ServiceManager.
* refactor: remove deprecated Enhanced ServiceManager implementation
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* refactor: implement thread-safe lazy initialization for ServiceManager
* feat: add filelock dependency in lfx
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* update component index
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: added toolkit versions and updated composio and composio_langchain packages
* fix: format
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* fix(agent): handle missing message id for disconnected agents
* [autofix.ci] apply automated fixes
* will this update comp index
* comp index
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
* Improve README Quickstart section and reorganize installation options
- Add prominent Desktop download section before Quickstart
- Remove $ symbols from shell commands to fix copy button functionality
- Add clear 'Run from source' option with make run_cli for developers
- Improve Docker installation instructions with usage details
- Move security warnings to after installation options for better flow
- Remove redundant star/issues badges
These changes address common user confusion when trying to run Langflow,
especially for developers who clone the repo first and then struggle with
the package installation instructions.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add dark mode logo support
- Added picture element for automatic dark/light mode logo switching
- Dark mode shows blue background logo, light mode shows black logo
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Final README improvements
- Made 'Other install options' a proper section with emoji
- Updated deployment section with rocket emoji
- Fixed single-line formatting for subsections
- Added new star animation gif
- Changed 'tool' to 'platform' in description
* Improve Desktop download section messaging
- Made text more concise and action-oriented
- Changed download emoji from arrow to inbox
- Removed redundant 'built-in' and bold formatting
- Cleaner parenthetical for OS availability
* Revise README for Langflow Desktop and deployment info
Updated sections for clarity and added details about Langflow Desktop and deployment options.
* Revert star gif to GitHub attachment URL
Testing if local file path issue or markdown previewer issue
* Apply suggestion from @mendonk
* Apply suggestion from @mendonk
* Apply suggestion from @mendonk
* Apply suggestion from @mendonk
* readme-changes
* Apply suggestion from @mendonk
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat(telemetry): Create a new SCARF telemetry event to track the registered email address
- Temporarily add hardcoded registered email address to common SCARF telemetry events
- Only send registered email address if it's defined and the context is Langflow Desktop
- Implement a utility to load and fetch the registered email address
- Bootstrap common telemetry fields with the registered email address (only in the Langflow Desktop context)
- Lazy load registered email address
- Cache loaded registered email address
- Adopt latest email registration storage format / schema
- Create a new telemetry schema for the registered email address
- Implement utility methods to send new telemetry event for the registered email address
- Send new telemetry event for the registered email address on telemetry service start-up lifecycle method
- Code clean-up, commenting & refactoring
- Implement 4 new test scenarios for testing the new Email payload schema
- Fix all pre-existing style errors
- Implement 6 new test scenarios for testing the "get email model" function from the registered email utility that invokes the registration API endpoint and caches the result
* feat(telemetry): Create a new SCARF telemetry event to track the registered email address
- Address PR feedback from Co-pilot
* fix: match cookie parameters when deleting cookies in logout endpoint
This fixes a critical logout bug where users would appear logged out
but remain authenticated in the background. The issue occurred because
the logout endpoint was deleting cookies without matching the security
parameters (httponly, samesite, secure, domain) used when creating them.
Browsers require exact parameter matching to delete cookies, so the
authentication cookies remained active despite logout confirmation.
Changes:
- Updated logout endpoint to use the same cookie parameters as login
- Ensures proper cookie deletion in all environments (HTTP/HTTPS)
- Fixes security issue in shared computer scenarios
Fixes#8641
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
---------
Co-authored-by: Ilia Krupin <ilia.krupin@tedo.ru>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(I'm going to force-push to get this in while the nightly is broken - this is needed for QA ASAP)
* Changed embedding model to show api base when switching embedding models
* fix: refactor Ollama model fetching to use async and filter capabilities (#10550)
* Refactor Ollama model fetching to use async and filter capabilities
Replaces synchronous requests for Ollama model fetching with asynchronous httpx calls and adds filtering to only include models with 'completion' capability. Updates the LanguageModelComponent to support async validation and fetching of Ollama models, improving reliability and accuracy of available model options.
* Update language_model.py
* Add Notion integration components
Introduces several Notion-related components for Langflow, including AddContentToPage, NotionDatabaseProperties, NotionListPages, NotionPageContent, NotionPageCreator, NotionPageUpdate, and NotionSearch. Updates the component index to register these new tools, enabling Notion API interactions such as page creation, content retrieval, database property listing, and more.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* Update LanguageModelComponent code in starter projects
Refactored the LanguageModelComponent code in Basic Prompt Chaining.json to improve formatting and readability. No functional changes were made; only code style and structure were updated.
* Refactor Ollama model fetching logic
Moves Ollama model fetching and URL validation logic from the LanguageModelComponent class to shared utility functions in model_utils. Updates references in starter project JSONs to use the new utility functions for improved code reuse and maintainability.
* Update component_index.json
* Update Nvidia Remix.json
* Handle message state for streaming responses
Adds logic to skip processing text content when message state is 'complete' in OpenAI response streaming, ensuring only content_blocks are processed for tool calls. Updates LCModelComponent to set state to 'partial' during streaming and only update the database with 'complete' state, without sending a new message event, as the frontend already has all streamed content.
* fixed test
* Changed embedding model component
* removed default values
* fixed ruff
* fixed starter projects
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
* fixed backend test
* fixed llm test
* fixed update build config ollama test
* fixed test embedding model component
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Changed embedding model to have api base and watsonx api endpoint
* updated tests
* Fixed tests
* Update component_index.json
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* Fix agent input extraction from Message objects
Agents now correctly extract and use the text content from Message objects, rather than passing the entire object or its string representation. This resolves issues where agents received verbose message representations instead of just the intended string input, and includes improved handling for multimodal content. Corresponding unit and integration tests have been added to verify this behavior for both OpenAI and Anthropic agents.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* ruff
* Remove unused multimodal message input test
Deleted the test_agent_handles_multimodal_message_input test from TestAgentComponent as it is no longer needed. This helps clean up redundant or obsolete test code.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: phact <estevezsebastian@gmail.com>