langflow/docs
Gabriel Luiz Freitas Almeida f1e95940a5
feat(database): add noop mode with config flag and update related tests (#9054)
* test: enhance agent component tests and add new fixture for database-less sessions

- Added `use_noop_session` fixture to facilitate testing without a database.
- Expanded `TestAgentComponent` with new tests for agent responses using the Calculator tool and validation across all OpenAI and Anthropic models.
- Updated `test_component.py` to include tests for message sending without a database, ensuring proper event handling and message integrity.
- Refactored existing tests for clarity and consistency.

* fix: enhance user retrieval logic in get_or_create_super_user and teardown_superuser functions

- Updated user retrieval in both functions to handle different result types from the database query, ensuring robustness against unexpected return values.
- Added checks for `first()` method and list type to improve error handling and maintainability.

* feat: add support for no-op database operations in settings

- Introduced `use_noop_database` configuration option to disable all database operations, controlled by the `LANGFLOW_USE_NOOP_DATABASE` environment variable.
- Updated the `use_noop_session` fixture to reflect the new environment variable for testing without a database.

* feat: implement NoopSession for database-less operations

- Added NoopSession class to provide a no-operation database session, allowing for testing and operation without a real database connection.
- Updated DatabaseService to utilize NoopSession when the `use_noop_database` setting is enabled, ensuring all database operations are disabled in this mode.
- Enhanced error handling and logging for session management, improving robustness in scenarios where the database is not in use.

* refactor: update import paths for NoopSession in test files

- Changed import path for NoopSession from `langflow.services.database.service` to `langflow.services.database.session` in both `test_agent_component.py` and `test_component.py`.
- This refactor improves code organization and aligns with recent changes in the project structure.

* feat: enhance NoopSession with result handling methods

- Added an internal _NoopResult class to the NoopSession, providing methods `first()`, `all()`, and `one_or_none()` for better handling of no-operation results.
- This enhancement improves the usability of NoopSession in testing scenarios by mimicking expected database query behaviors.

* refactor: improve logging for NOOP database session

- Changed the log level from warning to info for the NOOP database session message in the DatabaseService class.
- This adjustment enhances clarity in logging, indicating that all DB operations are disabled without implying an error condition.

* docs: improve docstring formatting for custom_component_update function

- Reformatted the docstring for the custom_component_update function to enhance readability by breaking long lines into multiple lines.
- This change improves documentation clarity, making it easier for developers to understand the function's purpose and behavior.

* docs: add LANGFLOW_USE_NOOP_DATABASE environment variable documentation

- Introduced documentation for the new LANGFLOW_USE_NOOP_DATABASE environment variable, which allows users to enable a no-op database mode, avoiding database connections and operations.
- This addition enhances the clarity of configuration options available for Langflow, aiding users in understanding how to run flows without a database.

* refactor: move NOOP database session logging to settings

- Removed the logging statement from the DatabaseService class and added it to the `set_use_noop_database` field validator in the Settings class.
- This change centralizes the logging for the NOOP database session, improving code organization and ensuring that the message is logged whenever the setting is applied.
2025-07-15 16:52:23 +00:00
..
css docs: Change paragraph text alignment from justified to start (#8651) 2025-06-20 16:54:48 +00:00
docs feat(database): add noop mode with config flag and update related tests (#9054) 2025-07-15 16:52:23 +00:00
i18n docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
src docs: Add heading and codeblock events for segment (#9050) 2025-07-15 15:17:11 +00:00
static docs: agents tutorial (#8961) 2025-07-11 01:31:24 +00:00
.gitignore chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
.yarnrc.yml chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
babel.config.js add docs with components 2023-07-18 15:08:00 -03:00
docusaurus.config.js docs: Add heading and codeblock events for segment (#9050) 2025-07-15 15:17:11 +00:00
index.d.ts docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
openapi.json docs: OpenAPI spec version upgraded from 1.4.3 to 1.5.0.post1 (#9049) 2025-07-15 12:25:45 +00:00
package-lock.json docs: bump-docusaurus-to-3.8.1 (#8740) 2025-06-25 22:39:22 +00:00
package.json chore(docs): remove pull script and cross-var from package.json (#8755) 2025-06-27 13:59:29 +00:00
README.md chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
sidebars.js docs: Fix a label in the left nav (#9012) 2025-07-11 13:18:10 +00:00
tailwind.config.js docs: fix syntax errors at build (#7047) 2025-03-13 00:18:29 +00:00
tsconfig.json docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
yarn.lock docs: Configure Segment (#8996) 2025-07-11 04:39:19 +00:00

Website

This website is built using Docusaurus 3, a modern static website generator.

Installation

$ yarn install

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service, including yarn serve.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.