Set agentic_experience default to False
Changed the default value of the agentic_experience setting from True to False to prevent the agentic MCP server from starting by default.
* docs: Change CORS headers example to use array syntax
This ensures that the LANGFLOW_CORS_* environment variable examples are using the correct and working syntax.
* Place origins in list[str] as well
---------
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Proof of Concept: Adding lifecycle events.
Added AGUI events to vertices and the graph. Created Decorator to add observability to Langflow workflows. TODO: Unit tests, feature gating to nullify impact in current production code paths.
Added unit tests for lifecycle_events. Refraining from using event_manager for now since this capability is goig to stay dormant until APIs are ready for streaming.
Added unit tests for before_callback_event and after_callback_event in graph and vertex classes.
Co-authored-by: Debojit Kaushik <debojitkaushik@Debojits-MacBook-Pro.local>
* fix: temporalio dep missing for macos-amd64
temporalio dep missing for macos-amd64
* chore: pin pydantic-ai version dependent on system
* chore: add ci solution again
* chore: use macos-15-intel runner explicitly
* chore: revert back to working state
* chire: code rabbit refinements
* fix: properly skip test when skip flags are set
* chore: code rabbit refinements stable
* fix: add loading state to prevent duplicate flow creation on click
* Centralizing loading state to all components that create flow
* refactor(TemplatesModal): extract handleCreateBlankFlow from JSX
---------
Co-authored-by: Antônio Alexandre Borges Lima <antonio@Antonios-MacBook-Pro.local>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* Use same logic for clearEdges and detect broken edges
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add context menu functionality to edges and integrate Radix UI context menu components
- Added `@radix-ui/react-context-menu` dependency to package.json.
- Implemented context menu in `DefaultEdge` component for edge deletion.
- Created a new `context-menu.tsx` file to encapsulate context menu components using Radix UI.
* chore: update package-lock.json after adding context menu for edges
* [autofix.ci] apply automated fixes
* test: update ComposIO and connect tools tests to ensure correct edge interactions
* [autofix.ci] apply automated fixes
* feat: add tests for edge creation and deletion via context menu
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Create controller shell and schema model for new workflow API
- Add workflow API endpoints (POST /workflow, GET /workflow, POST /workflow/stop)
- Implement developer API protection with settings check
- Add comprehensive workflow schema models with proper validation
- Create extensive unit test suite covering all scenarios
- Apply Ruff linting standards and fix all code quality issues
- Support API key authentication for all workflow endpoints
* fix: Move developer API check to router-level dependency
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* fix: Remove response model as its automatically configured.
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Janardan S Kavia <janardanskavia@mac.war.can.ibm.com>
* Add MustachePromptModal component for handling Mustache template prompts
- Implement MustachePromptModal component with support for editing and validating Mustache templates.
- Integrate with alert store for success, error, and notice alerts.
- Utilize Mustache library for parsing and highlighting template variables.
- Include UI components like Textarea, Badge, and Button for user interaction.
- Add functionality to handle variable checking and prompt validation via API.
* Add support for Mustache templates in prompt components and modals
- Introduced `MustachePromptModal` for handling Mustache-specific prompts.
- Updated `PromptAreaComponent` to conditionally render `MustachePromptModal` based on the `mustache` prop.
- Enhanced `parameterRenderComponent` to recognize and handle "mustache" type templates.
- Modified `varHighlightHTML` utility to optionally add curly braces around variable names.
- Extended `usePostValidatePrompt` API call to include a `mustache` flag.
- Updated component types to include `mustache` and `addCurlyBraces` options.
* Add mustache and @types/mustache dependencies to frontend package files
* Add support for mustache template format in message schema and input mixin
- Updated `format_text` and `from_template_and_variables` methods to accept a `template_format` parameter, allowing for different template formats.
- Modified `ChatPromptTemplate.from_messages` to include `template_format` parameter.
- Added `MUSTACHE_PROMPT` to the `InputTypes` enum in `input_mixin.py`.
* Add 'mustache' boolean field to API request model in base.py
* Add MustachePromptComponent and enhance prompt validation for mustache templates
- Introduce `MustachePromptComponent` class to create prompt templates with dynamic variables using mustache syntax.
- Add `build_prompt`, `_update_template`, `post_code_processing`, and `_get_fallback_input` methods to handle prompt creation and processing.
- Update `validate_prompt` function in `api_utils.py` to support mustache template variable extraction.
- Import `mustache_template_vars` for handling mustache-specific template variables.
* chore: update package dependencies in package.json and package-lock.json
- Bump @types/mustache from 4.2.5 to 4.2.6
- Add @xyflow/react at version 12.3.6
- Update ace-builds from 1.35.0 to 1.41.0
- Add moment-timezone at version 0.5.48
- Update mustache version to 4.2.0
- Add rehype-raw at version 6.1.1
- Remove unused @napi-rs/nice dependencies from package-lock.json
* feat: add 'mustache' to DIRECT_TYPES in constants.py
* fix: update field_type for template in MustachePromptComponent to MUSTACHE_PROMPT
* feat: add MustachePromptAreaComponent for rendering mustache prompts with enhanced styling and functionality
* refactor: update import paths for common components in mustachePromptModal
* feat: integrate MustachePromptAreaComponent into ParameterRenderComponent for mustache prompt rendering
* test: add comprehensive tests for MustachePromptComponent and template processing
- Introduced integration tests for MustachePromptComponent covering various scenarios including basic functionality, multiple variables, missing variables, and complex logic.
- Added unit tests for Message class to validate mustache template processing, including handling of special characters, lists, and conditional logic.
- Ensured robust coverage for edge cases such as empty templates and missing variables.
* test: add unit tests for ParameterRenderComponent and MustachePromptAreaComponent
- Introduced TypeScript tests for ParameterRenderComponent to validate props interface.
- Added comprehensive tests for MustachePromptAreaComponent focusing on mustache variable highlighting and props validation.
- Ensured robust coverage for various input scenarios, including handling of special characters and complex mustache variables.
* test: refine MustachePromptAreaComponent highlighting logic and add validation tests
- Updated the highlighting logic to only support simple mustache variables ({{variable_name}}) and exclude complex syntax.
- Enhanced unit tests to validate that complex mustache variables, variables with spaces, and invalid characters are not highlighted.
- Added tests for various edge cases, including variables starting with numbers and those containing special operators.
- Ensured comprehensive coverage for the MustachePromptAreaComponent's behavior in handling mustache templates.
* feat: implement secure mustache rendering in Message class
- Added a new utility module for mustache template security, including validation and safe rendering functions.
- Updated the Message class to support mustache template formatting using the new secure renderer.
- Ensured that only simple variable substitutions are allowed in mustache templates to enhance security.
* test: enhance MustachePromptComponent tests for variable handling and security
- Updated tests for MustachePromptComponent to ensure only simple variables are processed and complex syntax is rejected.
- Added new tests for validating mustache templates, including checks for invalid variable names and complex syntax.
- Introduced integration tests for mustache security utilities, ensuring robust validation and safe rendering of templates.
- Enhanced coverage for various edge cases, including nested objects and handling of None values.
* feat: add mustache prompt dialog subtitle and update modal reference
- Introduced a new constant for the mustache prompt dialog subtitle to guide users on using double curly brackets for variable introduction.
- Updated the MustachePromptModal to utilize the new subtitle constant, enhancing clarity and user experience.
* refactor: update display name in MustachePromptComponent for clarity
- Changed the display name from "Mustache Prompt" to "Prompt" to simplify the component's identification and improve user experience.
* refactor: move MustachePromptComponent to lfx
- Introduced MustachePromptComponent to create prompt templates with dynamic variables.
- Updated imports and exports in the processing module to include the new component.
- Implemented methods for building prompts and updating templates, enhancing flexibility in prompt generation.
* refactor: update input variable extraction logic in validate_prompt
- Adjusted the order of input variable extraction in the validate_prompt function to ensure correct handling of Mustache templates.
- Enhanced the process_prompt_template function to accept an is_mustache parameter, improving flexibility in template validation.
* refactor: enhance MustachePromptComponent with template validation and async updates
- Updated imports to reflect the new module structure under lfx.
- Added a validation step for Mustache templates to improve security.
- Refactored the post_code_processing method to an async update_frontend_node method for better performance and compatibility with async workflows.
* refactor: enhance Message class template handling with format support
- Updated the from_template_and_variables and from_template methods to accept a template_format parameter, improving flexibility in template processing.
- Ensured backward compatibility with previous versions while enhancing the functionality for template formatting options.
* feat: add 'mustache' to DIRECT_TYPES in constants
- Introduced 'mustache' as a new type in the DIRECT_TYPES list to support enhanced template processing capabilities.
- This addition aligns with recent updates to template handling and validation in the codebase.
* test: add unit tests for MustachePromptComponent
- Introduced comprehensive unit tests for the MustachePromptComponent, covering template variable extraction, handling of multiple variables, dot notation, and rejection of complex syntax.
- Added async tests for the build_prompt method to ensure correct message generation with various templates and variable scenarios.
- Enhanced test coverage to validate the update_frontend_node method's processing of templates.
* refactor: remove MustachePromptComponent and related tests
- Deleted the MustachePromptComponent from the processing module, streamlining the codebase by removing unused components.
- Removed associated unit tests to maintain consistency and reduce clutter in the test suite.
- Updated imports and exports in the processing module to reflect these changes.
* refactor: enhance PromptComponent with mode selection and template validation
- Updated the PromptComponent to include a mode input for selecting variable syntax, allowing for both Mustache and f-string formats.
- Implemented logic in the update_build_config method to adjust the template field type based on the selected mode.
- Added validation for Mustache templates to ensure security during template processing.
- Refactored the build_prompt and update_frontend_node methods to accommodate the new mode functionality and maintain compatibility with async workflows.
* test: add unit tests for PromptComponent template modes
- Introduced comprehensive unit tests for the PromptComponent, covering both f-string and Mustache modes.
- Validated mode switching, template updates, and prompt building for various scenarios, including handling of multiple variables and rejection of complex syntax.
- Ensured robust testing of the update_build_config and update_frontend_node methods to maintain functionality across different template formats.
* feat: add MustachePromptInput class to support Mustache template processing
- Introduced MustachePromptInput as a subclass of PromptInput, enabling the use of Mustache syntax for prompt generation.
- Updated InputTypes to include MustachePromptInput, enhancing the flexibility of input handling in the codebase.
* refactor: update prompt components to support mode selection and enhanced metadata
- Changed the icon for various prompt components from braces to prompts for better visual representation.
- Updated metadata to include a code hash and dependencies for improved tracking and management.
- Introduced a mode input for selecting variable syntax (f-string or Mustache), enhancing flexibility in template processing.
- Refactored prompt component code to accommodate the new mode functionality, ensuring compatibility with async workflows and maintaining robust template validation.
* feat: add "mustache" to LANGFLOW_SUPPORTED_TYPES in constants
* feat: include mustache flag in post_validate_prompt function
* fix: prevent retries on validation errors in usePostValidatePrompt mutation
* fix: simplify mustache variable validation to only allow simple variable names
* fix: update mustache variable regex to only match simple variable names
* fix: enhance template processing and validation for mustache mode
- Improved handling of template variables when switching modes, ensuring old fields are cleaned up.
- Added error handling during template validation to allow component creation even if validation fails.
- Streamlined the process of re-validating and processing templates to maintain compatibility with existing functionality.
* fix: refine input variable extraction for mustache and f-string templates
- Enhanced the validation process to differentiate between mustache and f-string variables.
- Updated the logic to ensure only relevant variables are retained based on the template syntax.
- Improved error messaging for better clarity on invalid input variables.
* chore: update component index
* test: add unit tests for mustache prompt component functionality
- Implemented tests for mode switching between f-string and mustache syntax.
- Verified that old fields are cleaned up when switching modes.
- Added checks for validation errors and ensured component functionality remains intact.
- Included tests for mixed syntax handling and the absence of connection handles for mustache fields.
* test: remove mustache prompt component unit tests
- Deleted the unit tests for the mustache prompt component, which included functionality for mode switching, validation error handling, and mixed syntax scenarios.
- This cleanup is part of a broader refactor to streamline test coverage and focus on essential components.
* chore: update package-lock.json to add new dependencies and remove unused ones
- Added "@radix-ui/react-radio-group" and "use-stick-to-bottom" dependencies.
- Removed "@smakss/react-scroll-direction" dependency.
- Updated various other dependencies to their latest versions for improved stability and performance.
* test: update mustache security tests for variable naming conventions
- Modified tests to use underscore notation for variable names instead of dot notation, ensuring compliance with the updated validation rules.
- Removed tests for dot notation and nested object properties, which are no longer supported.
- Added new tests for rendering with multiple variables and underscore variable names, enhancing coverage for the updated functionality.
* update component index
* test: update mustache template processing tests
- Removed tests for dot notation and nested object properties, aligning with the updated validation rules.
- Modified existing tests to ensure dot notation is rejected, enhancing security checks for mustache templates.
- This update streamlines the test suite to focus on supported variable naming conventions.
* test: remove mustache prompt integration and unit tests
- Deleted integration and unit tests for the MustachePromptComponent, including various scenarios for template processing and variable handling.
- This cleanup is part of an effort to streamline the test suite and focus on essential components, aligning with recent changes in validation rules and functionality.
* test: refine mustache template variable regex in tests
- Updated the regex in the MustachePromptAreaComponent tests to only match simple mustache variables, removing support for complex syntax.
- This change aligns with the recent updates to validation rules and enhances the clarity of the test cases.
* test: update mustache prompt component tests for variable highlighting
- Modified tests to ensure that complex mustache syntax is not highlighted, aligning with the updated validation rules.
- Renamed a test to clarify that dot notation variables should not be highlighted, reflecting the current functionality.
- These changes enhance the accuracy and clarity of the test cases for mustache template processing.
* 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
* fix: Add missing newline at end of package.json and correct syntax in test utility functions
* fix: Update placeholder text and prompt dialog subtitle in Mustache component
* feat: Enhance PromptComponent to support Mustache syntax and dynamic template updates
* test: Add tests for double brackets toggle in Prompt component
- Add Playwright E2E tests for double brackets variable extraction
- Add Python unit tests for use_double_brackets BoolInput
- Test single and multiple variable extraction with {{var}} syntax
- Verify toggle persistence and input field creation
* chore: Update starter projects with use_double_brackets field
Update all starter project templates to include the new
use_double_brackets field in Prompt components
* chore: Update package-lock.json to reflect dependency changes
* [autofix.ci] apply automated fixes
* Fix: enhance mustache security by adding triple braces pattern and improving safe rendering documentation
* Fix: add logging for template validation failures in PromptComponent
* Fix: update mustache interface to make 'mustache' optional and ensure default value is false; add mustache security utilities for template validation
* Fix: improve error handling in validate_prompt for mustache template parsing
* Fix: refactor variable extraction in MustachePromptModal for improved regex matching and state management
* chore: update package-lock.json to add peer dependencies and remove unused packages
- Added peer: true to several dependencies to indicate peer dependency requirements.
- Removed unused dependencies related to @napi-rs/nice and its variants.
* feat: add unit tests for MustachePromptAreaComponent and MustachePromptModal
* update package lock
* update package lock
* [autofix.ci] apply automated fixes
* update index
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Add Message support to Smart Transform component
Extends the Smart Transform component to handle Message inputs/outputs in addition to Data and DataFrame. Users can now apply LLM-generated transformations to text messages.
Changes:
- Add Message to accepted input types
- Add new process_as_message output method
- Implement text-specific prompt for Message transformations
- Add error handling with informative messages for all output methods
- Update examples to include text transformation use cases
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* improve code wuality
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Rodrigo Nader <rodrigonader@MacBook-Pro-de-Rodrigo.local>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* making sure that cmd + s command only work on the flows page
* fix: removed unnecessary shallow field
* Revert "Merge remote-tracking branch 'origin/main' into fix-limiting-saving-flow"
This reverts commit ee71d3a16f, reversing
changes made to 5cf5d3f96b.
* Revert "Revert "Merge remote-tracking branch 'origin/main' into fix-limiting-saving-flow""
This reverts commit 8ce356cad1.
* fix: add new package.json
* fix: update package.json
---------
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* perf(lfx): lazy import CLI commands to reduce cold start time
Defer imports of serve_command and run until the specific subcommand
is invoked. Previously, both commands were imported at module load,
causing `lfx run` to unnecessarily load serve-specific dependencies
like uvicorn, rich.console, and rich.panel.
This optimization is particularly important for Knative/serverless
deployments where cold start latency matters due to scale-to-zero.
* refactor: eliminate temporary file usage for JSON input processing
* feat: add .claude to .gitignore
* refactor: implement lazy import for serve_command in LFX CLI module
* refactor: optimize imports in run.py for improved performance
* refactor: update type hints for Graph in script_loader and validation modules
* refactor: move imports for BaseChatPromptTemplate and PromptTemplate to TYPE_CHECKING block
* refactor: streamline lazy imports and enhance __getattr__ for field typing constants
* refactor: update patch target for get_settings_service in validation tests
* refactor(lfx): simplify field_typing lazy import per PR review
Replace explicit _exports dictionary creation with direct getattr(constants, name)
to avoid redundantly importing all constants on each attribute access.
This addresses the Copilot review comment on PR #10739.
* test(lfx): add comprehensive tests for lazy import mechanisms
Add tests to verify lazy import patterns work correctly:
- field_typing/__init__.py: Test all exports via __getattr__ including
Input, Output, RangeSpec, Data, and all langchain type constants
- cli/__init__.py: Test serve_command lazy loading via __getattr__
- __main__.py: Test wrapper commands exist and are callable
- run.py and script_loader.py: Test module imports and functions
- validation.py: Test functions work correctly after lazy import changes
- flow_dict handling: Test JSON parsing for in-memory flow processing
These tests address CodeRabbit's pre-merge check concerns about missing
test coverage for the lazy import optimizations.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* feat: Optimize JSON handling in run_flow by eliminating temporary file usage
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix: Check the user id of caller in delete_var
* [autofix.ci] apply automated fixes
* Update __main__.py
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>