docs: refresh cli page (#9274)

* cli-values

* split-out-introductory-commands

* remove-feature-flag-envs

* cleanup-cli-links

* fix type

* clarification-on-cli-superuser

* remove-internal-env-vars

* alignment and editorial

* audit booleans

---------

Co-authored-by: April M <april.murphy@datastax.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
This commit is contained in:
Mendon Kissling 2025-08-02 11:24:31 -04:00 committed by GitHub
commit f3701989b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 456 additions and 266 deletions

View file

@ -72,8 +72,8 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
</details>
The `/build/$FLOW_ID/events` endpoint accepts an optional `stream` query parameter that defaults to `true`.
To disable streaming and get all events at once, set `stream` to `false`.
The `/build/$FLOW_ID/events` endpoint has a `stream` query parameter that defaults to true.
To disable streaming and get all events at once, set `?stream=false`.
```shell
curl -X GET \
@ -99,12 +99,12 @@ curl -X GET \
| files | array[string] | Optional. List of file paths to use. |
| start_component_id | string | Optional. ID of the component where the execution should start. Component `id` values can be found in [Langflow JSON files](/concepts-flows-import#langflow-json-file-contents) |
| stop_component_id | string | Optional. ID of the component where the execution should stop. Component `id` values can be found in [Langflow JSON files](/concepts-flows-import#langflow-json-file-contents).|
| log_builds | boolean | Optional. Control build logging. Default: `true`. |
| log_builds | Boolean | Whether to record build logs. Default: Enabled (true). |
### Set start and stop points
The `/build` endpoint accepts optional values for `start_component_id` and `stop_component_id` to control where the flow run starts and stops.
Setting `stop_component_id` for a component triggers the same behavior as clicking the **Play** button on that component, where all dependent components leading up to that component are also run.
Setting `stop_component_id` for a component triggers the same behavior as clicking **Run component** on that component in the visual editor: The specified component and all dependent components leading up to that component will run.
The following example stops flow execution at an **OpenAI** component:

View file

@ -143,7 +143,7 @@ The following example is truncated to illustrate a series of `token` events as w
| Parameter | Type | Info |
|-----------|------|------|
| flow_id | UUID/string | Required. Part of URL: `/run/$FLOW_ID` |
| stream | boolean | Optional. Query parameter: `/run/$FLOW_ID?stream=true` |
| stream | Boolean | Optional. Query parameter: `/run/$FLOW_ID?stream=true` |
| input_value | string | Optional. JSON body field. Main input text/prompt. Default: `null` |
| input_type | string | Optional. JSON body field. Input type ("chat" or "text"). Default: `"chat"` |
| output_type | string | Optional. JSON body field. Output type ("chat", "any", "debug"). Default: `"chat"` |

View file

@ -15,7 +15,7 @@ The `/logs` endpoint requires log retrieval to be enabled in your Langflow insta
1. To enable log retrieval, include these values in your `.env` file:
```text
LANGFLOW_ENABLE_LOG_RETRIEVAL=true
LANGFLOW_ENABLE_LOG_RETRIEVAL=True
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
LANGFLOW_LOG_LEVEL=DEBUG
```

View file

@ -8,14 +8,11 @@ import TabItem from '@theme/TabItem';
Use the `/users` endpoint to manage user accounts in Langflow.
The `user_id` value is specifically for Langflow's user system, which is stored in the Langflow database and managed at the `/users` API endpoint.
The `user_id` primary key in the Langflow database is mapped to the `id` value in the API.
## Add user
Create a new user account with a username and password.
Create a new user account with a given username and password.
This creates a new UUID for the user's `id`, which is mapped to `user_id` in the Langflow database.
Requires authentication as a superuser if the Langflow server has authentication enabled.
```bash
curl -X POST \
@ -28,6 +25,10 @@ curl -X POST \
}'
```
The request returns an object describing the new user.
The user's UUID is stored in `user_id` in the Langflow database, and returned as `id` in the `/users` API response.
This `user_id` key is specifically for Langflow user management.
<details>
<summary>Result</summary>
@ -54,7 +55,7 @@ curl -X POST \
## Get current user
Retrieve information about the currently authenticated user.
Retrieve information about the authenticated user.
```bash
curl -X GET \
@ -85,7 +86,8 @@ curl -X GET \
## List all users
Get a paginated list of all users in the system.
Only superusers can use this endpoint (`is_superuser: true`).
Requires authentication as a superuser if the Langflow server has authentication enabled.
```bash
curl -X GET \
@ -160,7 +162,9 @@ curl -X GET \
Modify an existing user's information with a PATCH request.
This example makes the user `10c1c6a2-ab8a-4748-8700-0e4832fd5ce8` an active superuser.
Requires authentication as a superuser if the Langflow server has authentication enabled.
This example activates the specified user's account and makes them a superuser:
```bash
curl -X PATCH \
@ -199,9 +203,9 @@ curl -X PATCH \
## Reset password
Change a user's password to a new secure value.
Change the specified user's password to a new secure value.
You can't change another user's password.
Requires authentication as the target user.
```bash
curl -X PATCH \
@ -241,7 +245,7 @@ curl -X PATCH \
Remove a user account from the system.
Only superusers can use this endpoint (`is_superuser: true`).
Requires authentication as a superuser if the Langflow server has authentication enabled.
```bash
curl -X DELETE \

View file

@ -159,9 +159,9 @@ For example, some models support additional modes, arguments, or features like c
Some additional input parameters include the following:
* **Current Date** (`add_current_date_tool`): When enabled (`true`), this setting adds a tool to the agent that can retrieve the current date.
* **Handle Parse Errors** (`handle_parsing_errors`): When enabled (`true`), this setting allows the agent to fix errors, like typos, when analyzing user input.
* **Verbose** (`verbose`): When enabled (`true`), this setting records detailed logging output for debugging and analysis.
* **Current Date** (`add_current_date_tool`): When enabled (true), this setting adds a tool to the agent that can retrieve the current date.
* **Handle Parse Errors** (`handle_parsing_errors`): When enabled (true), this setting allows the agent to fix errors, like typos, when analyzing user input.
* **Verbose** (`verbose`): When enabled (true), this setting records detailed logging output for debugging and analysis.
To view and configure all parameters, click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).

View file

@ -35,7 +35,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| Temperature | Float | Input parameter. Specifies the sampling temperature. Defaults to `0.7`. |
| Max Tokens | Integer | Input parameter. Specifies the maximum number of tokens to generate. Defaults to `1000`. |
| Input Value | String | Input parameter. Specifies the input text for text generation. |
| Stream | Boolean | Input parameter. Specifies whether to stream the response from the model. Defaults to `False`. |
| Stream | Boolean | Input parameter. Specifies whether to stream the response from the model. Default to false. |
## Azure OpenAI Embeddings

View file

@ -45,4 +45,4 @@ For more information about using embedding model components in flows, see [**Emb
|------|------|-------------|
| cohere_api_key | String | Input parameter. The API key required to authenticate with the Cohere service. |
| model | String | Input parameter. The language model used for embedding text documents and performing queries. Default: `embed-english-v2.0`. |
| truncate | Boolean | Input parameter. Whether to truncate the input text to fit within the model's constraints. Default: `False`. |
| truncate | Boolean | Input parameter. Whether to truncate the input text to fit within the model's constraints. Default: false. |

View file

@ -94,9 +94,9 @@ The values for **Collection Name**, **Astra DB Application Token**, and **Astra
| Tool Parameters | Dict | Input parameter. [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters) that become tools for an agent. These Filters _may_ be used in a search, if the agent selects them. See [Define tool-specific parameters](#define-tool-specific-parameters). |
| Static Filters | Dict | Input parameter. Attribute-value pairs used to filter query results. Equivalent to [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters). **Static Filters** are included with _every_ query. Use **Static Filters** without semantic search to perform a regular filter search. |
| Number of Results | Int | Input parameter. The maximum number of documents to return. |
| Semantic Search | Boolean | Input parameter. Whether to run a similarity search by generating a vector embedding from the chat input and following the **Semantic Search Instruction**. Default: `False`. If `True`, you must attach an [**Embedding Model** component](/components-embedding-models) or have vectorize pre-enabled on your collection. |
| Use Astra DB Vectorize | Boolean | Input parameter. Whether to use the Astra DB vectorize feature for embedding generation when running a semantic search. Default: `False`. If `True`, you must have vectorize pre-enabled on your collection. |
| Embedding Model | Embedding | Input parameter. A port to attach an **Embedding Model** component to generate a vector from input text for semantic search. This can be used when **Semantic Search** is `True` with or without vectorize. Be sure to use a model that aligns with the dimensions of the embeddings already present in the collection. |
| Semantic Search | Boolean | Input parameter. Whether to run a similarity search by generating a vector embedding from the chat input and following the **Semantic Search Instruction**. Default: false. If true, you must attach an [**Embedding Model** component](/components-embedding-models) or have vectorize pre-enabled on your collection. |
| Use Astra DB Vectorize | Boolean | Input parameter. Whether to use the Astra DB vectorize feature for embedding generation when running a semantic search. Default: false. If true, you must have vectorize pre-enabled on your collection. |
| Embedding Model | Embedding | Input parameter. A port to attach an **Embedding Model** component to generate a vector from input text for semantic search. This can be used when **Semantic Search** is true, with or without vectorize. Be sure to use a model that aligns with the dimensions of the embeddings already present in the collection. |
| Semantic Search Instruction | String | Input parameter. The query to use for similarity search. Default: `"Find documents similar to the query."`. This instruction is used to guide the model in performing semantic search. |
### Define tool-specific parameters
@ -125,9 +125,9 @@ For example, the following filter allows an LLM to filter by unique `customer_id
* Name: `customer_id`
* Attribute Name: Leave empty if the attribute matches the field name in the database.
* Description: `"The unique identifier of the customer to filter by"`.
* Is Metadata: `False` unless the value stored in the metadata field.
* Is Mandatory: `True` to require this filter.
* Is Timestamp: For this example, select `False` because the value is an ID, not a timestamp.
* Is Metadata: Select **False** unless the value is stored in the metadata field.
* Is Mandatory: Set to **True** to make the filter required.
* Is Timestamp: For this example, select **False** because the value is an ID, not a timestamp.
* Operator: `$eq` to look for an exact match.
The following fields are available for each row in the **Tool Parameters** pane:

View file

@ -30,7 +30,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
|------|------|-------------|
| max_tokens | Integer | Input parameter. Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. |
| model_kwargs | Dictionary | Input parameter. Additional keyword arguments for the model. |
| json_mode | Boolean | Input parameter. If `True`, outputs JSON regardless of passing a schema. |
| json_mode | Boolean | Input parameter. If true, outputs JSON regardless of passing a schema. |
| model_name | String | Input parameter. The DeepSeek model to use. Default: `deepseek-chat`. |
| api_base | String | Input parameter. Base URL for API requests. Default: `https://api.deepseek.com`. |
| api_key | SecretString | Input parameter. Your DeepSeek API key for authentication. |

View file

@ -36,7 +36,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| frequency_penalty | Float | Input parameter. Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: `0.5`. |
| presence_penalty | Float | Input parameter. Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: `0.3`. |
| seed | Integer | Input parameter. A random seed for the model. Default: `8`. |
| logprobs | Boolean | Input parameter. Whether to return log probabilities of output tokens or not. Default: `True`. |
| logprobs | Boolean | Input parameter. Whether to return log probabilities of output tokens or not. Default: true. |
| top_logprobs | Integer | Input parameter. The number of most likely tokens to return at each position. Default: `3`. |
| logit_bias | String | Input parameter. A JSON string of token IDs to bias or suppress. |
@ -71,7 +71,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| api_key | API Key | Input parameter. A [watsonx API key](https://www.ibm.com/docs/en/watsonx/saas?topic=administration-managing-user-api-key) to authenticate watsonx API access to the specified watsonx.ai deployment and model. |
| model_name | Model Name | Input parameter. The name of the embedding model to use. Supports [default embedding models](#default-embedding-models) and automatically updates after connecting to your watsonx.ai deployment. |
| truncate_input_tokens | Truncate Input Tokens | Input parameter. The maximum number of tokens to process. Default: `200`. |
| input_text | Include the original text in the output | Input parameter. Determines if the original text is included in the output. Default: `True`. |
| input_text | Include the original text in the output | Input parameter. Determines if the original text is included in the output. Default: true. |
### Default embedding models

View file

@ -33,7 +33,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| temperature | Float | Input parameter. Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.7`. |
| top_p | Float | Input parameter. Controls diversity with nucleus sampling. Range: `[0.0, 1.0]`. Default: `1.0`. |
| stop | List[String] | Input parameter. List of strings that stop generation when encountered. |
| stream | Boolean | Input parameter. Whether to stream the response. Default: `False`. |
| stream | Boolean | Input parameter. Whether to stream the response. Default: false. |
| presence_penalty | Float | Input parameter. Penalizes repeated tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. |
| frequency_penalty | Float | Input parameter. Penalizes frequent tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. |

View file

@ -71,9 +71,9 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| OpenAI Organization | String | Input parameter. The organization associated with the API key. |
| OpenAI Proxy | String | Input parameter. The proxy server for the requests. |
| Request Timeout | Float | Input parameter. The timeout for the HTTP requests. |
| Show Progress Bar | Boolean | Input parameter. Whether to show a progress bar for processing. Default: `False`. |
| Skip Empty | Boolean | Input parameter. Whether to skip empty inputs. Default: `False`. |
| TikToken Enable | Boolean | Input parameter. Whether to enable TikToken. Default: `True`. |
| Show Progress Bar | Boolean | Input parameter. Whether to show a progress bar for processing. Default: false. |
| Skip Empty | Boolean | Input parameter. Whether to skip empty inputs. Default: false. |
| TikToken Enable | Boolean | Input parameter. Whether to enable TikToken. Default: true. |
| TikToken Model Name | String | Input parameter. The name of the TikToken model. |
## See also

View file

@ -66,7 +66,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| top_k | Integer | Input parameter. How the model selects tokens for output. The next token is selected from the top `k` tokens. Default: `40`. |
| top_p | Float | Input parameter. Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. Default: `0.95`. |
| tuned_model_name | String | Input parameter. The name of a tuned model. If provided, `model_name` is ignored. |
| verbose | Boolean | Input parameter. This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. Default: `False`. |
| verbose | Boolean | Input parameter. This parameter controls the level of detail in the output. When set to true, it prints internal states of the chain to help debug. Default: false. |
| embeddings | Embeddings | Output parameter. An instance for generating embeddings using Vertex AI. |
## Create a service account for Vertex AI authentication {#vertexai-credentials}

View file

@ -30,7 +30,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
|------|------|-------------|
| max_tokens | Integer | Input parameter. Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. |
| model_kwargs | Dictionary | Input parameter. Additional keyword arguments for the model. |
| json_mode | Boolean | Input parameter. If `True`, outputs JSON regardless of passing a schema. |
| json_mode | Boolean | Input parameter. If true, outputs JSON regardless of passing a schema. |
| model_name | String | Input parameter. The xAI model to use. Default: `grok-2-latest`. |
| base_url | String | Input parameter. Base URL for API requests. Default: `https://api.x.ai/v1`. |
| api_key | SecretString | Input parameter. Your xAI API key for authentication. |

View file

@ -166,7 +166,7 @@ It accepts the following parameters:
| agent_kwargs | Agent kwargs | Input parameter. The additional kwargs for the agent. |
| task_description | Task Description | Input parameter. The descriptive text detailing the task's purpose and execution. |
| expected_output | Expected Task Output | Input parameter. The clear definition of the expected task outcome. |
| async_execution | Async Execution | Input parameter. The boolean flag indicating asynchronous task execution. |
| async_execution | Async Execution | Input parameter. Boolean flag indicating asynchronous task execution. |
| previous_task | Previous Task | Input parameter. The previous task in the sequence for chaining. |
| task_output | Sequential Task | Output parameter. The list of SequentialTask objects representing the created tasks. |

View file

@ -156,7 +156,7 @@ The component will have only one output port where the user can select the prefe
This behavior is controlled by the `group_outputs` parameter:
- **`group_outputs=False` (default)**: When a component has more than one output and `group_outputs` is `False` or not set, the outputs are grouped in the visual editor, and the user must select one.
- **`group_outputs=False` (default)**: When a component has more than one output and `group_outputs` is false or not set, the outputs are grouped in the visual editor, and the user must select one.
Use this option when the component is expected to return only one type of output when used in a flow.
@ -290,9 +290,9 @@ An input is usually an instance of a class from `langflow.io` (such as `StrInput
* **`display_name`**: The label shown to users in the visual editor.
* **`info`** *(optional)*: A tooltip or short description.
* **`value`** *(optional)*: The default value.
* **`advanced`** *(optional)*: If `True`, moves the field into the "Advanced" section.
* **`required`** *(optional)*: If `True`, forces the user to provide a value.
* **`is_list`** *(optional)*: If `True`, allows multiple values.
* **`advanced`** *(optional)*: If true, moves the field into the "Advanced" section.
* **`required`** *(optional)*: If true, forces the user to provide a value.
* **`is_list`** *(optional)*: If true, allows multiple values.
* **`input_types`** *(optional)*: Restricts allowed connection types (e.g., `["Data"]`, `["LanguageModel"]`).
Here are the most commonly used input classes and their typical usage.
@ -301,8 +301,8 @@ Here are the most commonly used input classes and their typical usage.
* **`StrInput`** creates a single-line text field.
* **`MultilineInput`** creates a multi-line text area.
**Numeric and Boolean Inputs**: Ensures users can only enter valid numeric or boolean data.
* **`BoolInput`**, **`IntInput`**, and **`FloatInput`** provide fields for boolean, integer, and float values, ensuring type consistency.
**Numeric and Boolean Inputs**: Ensures users can only enter valid numeric or Boolean data.
* **`BoolInput`**, **`IntInput`**, and **`FloatInput`** provide fields for Boolean, integer, and float values, ensuring type consistency.
**Dropdowns**: For selecting from predefined options, useful for modes or levels.
* **`DropdownInput`**
@ -323,7 +323,7 @@ Here are the most commonly used input classes and their typical usage.
**Lists**: Set `is_list=True` to accept multiple values, ideal for batch or grouped operations.
This example defines three inputs: a text field (`StrInput`), a boolean toggle (`BoolInput`), and a dropdown selection (`DropdownInput`).
This example defines three inputs: a text field (`StrInput`), a Boolean toggle (`BoolInput`), and a dropdown selection (`DropdownInput`).
```python
from langflow.io import StrInput, BoolInput, DropdownInput

View file

@ -76,7 +76,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| body | Body | Input parameter. The body to send with POST, PATCH, and PUT requests as a dictionary. |
| headers | Headers | Input parameter. The headers to send with the request as a dictionary. |
| timeout | Timeout | Input parameter. The timeout to use for the request. |
| follow_redirects | Follow Redirects | Input parameter. Whether to follow http redirects. Default: Enabled/true |
| follow_redirects | Follow Redirects | Input parameter. Whether to follow HTTP redirects. The default is enabled (true). If disabled (false), HTTP redirects aren't followed. |
| save_to_file | Save to File | Input parameter. Whether to save the API response to a temporary file. Default: Disabled/false |
| include_httpx_metadata | Include HTTPx Metadata | Input parameter. Whether to include properties such as `headers`, `status_code`, `response_headers`, and `redirection_history` in the output. Default: Disabled/false |
@ -167,7 +167,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| separator | Separator | Input parameter. The separator to use between multiple outputs in `Message` format. |
| silent_errors | Silent Errors | Input parameter. If true, errors in the component don't raise an exception. The default is false/disabled. |
| delete_server_file_after_processing | Delete Server File After Processing | Input parameter. If true (default), the **Server File Path** (`file_path`) is deleted after processing. |
| ignore_unsupported_extensions | Ignore Unsupported Extensions | Input parameter. If true/enabled (default), files with unsupported extensions are accepted but not processed. If false/disabled, the **File** component either can throw an error if an unsupported file type is provided. |
| ignore_unsupported_extensions | Ignore Unsupported Extensions | Input parameter. If enabled (true), files with unsupported extensions are accepted but not processed. If disabled (false), the **File** component either can throw an error if an unsupported file type is provided. The default is true. |
| ignore_unspecified_files | Ignore Unspecified Files | Input parameter. If true, `Data` with no `file_path` property is ignored. If false (default), the component errors when a file isn't specified. |
| concurrency_multithreading | Processing Concurrency | Input parameter. The number of files to process concurrently if multiple files are uploaded. Default is 1. Values greater than 1 enable parallel processing for 2 or more files. |
@ -351,8 +351,8 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
|------|--------------|------|
| database_url | Database URL | Input parameter. The SQLAlchemy-compatible database connection URL. |
| query | SQL Query | Input parameter. The SQL query to execute, which can be entered directly, passed in from another component, or, in **Tool Mode**, automatically provided by an **Agent** component. |
| include_columns | Include Columns | Input parameter. If enabled, includes column names in the result. The default is enabled (`true`). |
| add_error | Add Error | Input parameter. If enabled, adds any error messages to the result, if any are returned. The default is disabled (`false`). |
| include_columns | Include Columns | Input parameter. Whether to include column names in the result. The default is enabled (true). |
| add_error | Add Error | Input parameter. If enabled, adds any error messages to the result, if any are returned. The default is disabled (false). |
| run_sql_query | Result Table | Output parameter. The query results as a [`DataFrame`](/data-types#dataframe). |
## URL

View file

@ -53,7 +53,7 @@ The following example uses the **If-Else** component to check incoming chat mess
3. Connect the **If-Else** component's **True** output port to the **Language Model** component's **Input** port.
4. In the **Prompt Template** component, enter a prompt to instruct the model in the event of the `true` condition, such as `Send a message that a new warning, caution, or urgent message was received`.
4. In the **Prompt Template** component, enter instructions for the model when the evaluation is true, such as `Send a message that a new warning, caution, or urgent message was received`.
5. Connect the **Prompt Template** component to the **Language Model** component's **System Message** port.
@ -62,8 +62,7 @@ The following example uses the **If-Else** component to check incoming chat mess
4. Repeat the same process with another set of **Language Model**, **Prompt Template**, and **Chat Output** components for the **False** outcome.
Connect the **If-Else** component's **False** output port to the second **Language Model** component's **Input** port.
Be sure to configure the second **Prompt Template** component to instruct the model in the event of the `false` condition, such as `Send a message that a new low-priority message was received`.
In the second **Prompt Template**, enter instructions for the model when the evaluation is false, such as `Send a message that a new low-priority message was received`.
5. To test the flow, open the **Playground**, and then send the flow some messages with and without your regex strings.
The chat output should reflect the instructions in your prompts based on the regex evaluation.
@ -88,7 +87,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| input_text | String | Input parameter. The primary text input for the operation. |
| match_text | String | Input parameter. The text to compare against. |
| operator | Dropdown | Input parameter. The operator used to compare texts. Options include `equals`, `not equals`, `contains`, `starts with`, `ends with`, and `regex`. The default is `equals`. |
| case_sensitive | Boolean | Input parameter. When set to true, the comparison is case sensitive. The default is false. This setting doesn't apply to regex comparisons. |
| case_sensitive | Boolean | Input parameter. When true, the comparison is case sensitive. The default is false. This setting doesn't apply to regex comparisons. |
| message | Message | Input parameter. The message to pass through either route. |
| max_iterations | Integer | Input parameter. The maximum number of iterations allowed for the conditional router. The default is 10. |
| default_route | Dropdown | Input parameter. The route to take when max iterations are reached. Options include `true_result` or `false_result`. The default is `false_result`. |

View file

@ -101,7 +101,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| api_key | SecretString | Input parameter. The API Key for authentication with the selected provider. |
| input_value | String | Input parameter. The input text to send to the model. |
| system_message | String | Input parameter. A system message that helps set the behavior of the assistant. |
| stream | Boolean | Input parameter. Whether to stream the response. Default: `False`. |
| stream | Boolean | Input parameter. Whether to stream the response. Default: false. |
| temperature | Float | Input parameter. Controls randomness in responses. Range: `[0.0, 1.0]`. Default: `0.1`. |
| model | LanguageModel | Output parameter. Alternative output type to the default `Message` output. Produces an instance of Chat configured with the specified parameters. See [Language Model output types](#language-model-output-types). |

View file

@ -659,7 +659,7 @@ The `Output Schema` parameter defines the structure and data types for the model
* **Name**: The name of the output field.
* **Description**: The purpose of the output field.
* **Type**: The data type of the output field. The available types are `str`, `int`, `float`, `bool`, `list`, or `dict`. The default is `text`.
* **Multiple**: This feature is deprecated. Currently, it is set to `True` by default if you expect multiple values for a single field. For example, a `list` of `features` is set to `True` to contain multiple values, such as `["waterproof", "durable", "lightweight"]`. Default: `True`.
* **Multiple (deprecated)**: Always true to allow multiple output values for a single field.
The **Parse DataFrame** component parses the structured output into a template for orderly presentation in chat output. The template receives the values from the `output_schema` table with curly braces.
@ -677,7 +677,7 @@ For example, the template `EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS
| system_prompt | String | The instructions to the language model for formatting the output. |
| schema_name | String | The name for the output data schema. |
| output_schema | Table | The structure and data types for the model's output. |
| multiple | Boolean | [Deprecated] Always set to `True`. |
| multiple | Boolean | [Deprecated] Always true. |
**Outputs**

View file

@ -61,10 +61,10 @@ This component implements an [Astra DB Serverless vector store](https://docs.dat
| search_type | Search Type | The search type to use. The options are `Similarity`, `Similarity with score threshold`, and `MMR (Max Marginal Relevance)`. |
| search_score_threshold | Search Score Threshold | The minimum similarity score threshold for search results when using the `Similarity with score threshold` option. |
| advanced_search_filter | Search Metadata Filter | An optional dictionary of filters to apply to the search query. |
| autodetect_collection | Autodetect Collection | A boolean flag to determine whether to autodetect the collection. |
| autodetect_collection | Autodetect Collection | Boolean flag to determine whether to autodetect the collection. |
| content_field | Content Field | A field to use as the text content field for the vector store. |
| deletion_field | Deletion Based On Field | When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new data is loaded. |
| ignore_invalid_documents | Ignore Invalid Documents | A boolean flag to determine whether to ignore invalid documents at runtime. |
| ignore_invalid_documents | Ignore Invalid Documents | Boolean flag to determine whether to ignore invalid documents at runtime. |
| astradb_vectorstore_kwargs | AstraDBVectorStore Parameters | An optional dictionary of additional parameters for the AstraDBVectorStore. |
**Outputs**
@ -309,7 +309,7 @@ Your input is converted to vector data and compared to the stored vectors in a v
| allow_duplicates | Boolean | Allow duplicate documents in the vector store. |
| search_type | String | The type of search to perform: "Similarity" or "MMR". |
| number_of_results | Integer | The number of results to return from the search. Default: `10`. |
| limit | Integer | The limit of the number of records to compare when `Allow Duplicates` is `False`. |
| limit | Integer | The limit of the number of records to compare when `Allow Duplicates` is false. |
**Outputs**
@ -542,7 +542,7 @@ The component adds a user-friendly interface with two modes (Ingest and Retrieve
Local DB includes **Ingest** and **Retrieve** modes.
The **Ingest** mode works similarly to [ChromaDB](#chroma-db), and persists your database to the Langflow cache directory. The Langflow cache directory location is specified in `LANGFLOW_CONFIG_DIR`. For more information, see [Environment variables](/environment-variables).
The **Ingest** mode works similarly to [ChromaDB](#chroma-db), and persists your database to the Langflow cache directory. The Langflow cache directory location is specified in the `LANGFLOW_CONFIG_DIR` environment variable. For more information, see [Flow storage and logs](/concepts-flows#flow-storage-and-logs).
The **Retrieve** mode can query your **Chroma DB** collections.

View file

@ -111,6 +111,8 @@ By default, flows and [flow logs](/logging) are stored on local disk at the foll
The overall storage location can be customized with the `LANGFLOW_CONFIG_DIR` environment variable, and the flow log storage location can be customized separately with the `LANGFLOW_LOG_FILE` environment variable.
For more information, see [Memory management options](/memory).
## See also
* [Share and embed flows](/concepts-publish)

View file

@ -141,7 +141,7 @@ You can use the [`.env.example`](https://github.com/langflow-ai/langflow/blob/ma
This variable controls whether authentication is required to access your Langflow server, including the visual editor and API:
* If `LANGFLOW_AUTO_LOGIN=False`, automatic login is disabled. Users must sign in to the visual editor and use a Langflow API key for Langflow API requests.
If `false`, you must also set [`LANGFLOW_SUPERUSER` and `LANGFLOW__SUPERUSER_PASSWORD`](#langflow-superuser).
If false, you must also set [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](#langflow-superuser).
* If `LANGFLOW_AUTO_LOGIN=True`, Langflow bypasses authentication for the visual editor and API requests.
All users can access the same environment without password protection.
@ -152,21 +152,27 @@ If two users edit the same flow, Langflow saves only the work of the most recent
#### AUTO_LOGIN and API authentication in version 1.5 and later
In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is `True`.
In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is true.
The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
<details>
<summary>LANGFLOW_AUTO_LOGIN and LANGFLOW_SKIP_AUTH_AUTO_LOGIN options</summary>
In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=true`, then Langflow automatically logs users in as a superuser without requiring authentication.
In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=True`, then Langflow automatically logs users in as a superuser without requiring authentication.
In this case, API requests don't require a Langflow API key.
In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` _and_ `LANGFLOW_AUTO_LOGIN=true` to skip authentication for API requests _and_ allow automatic login as a superuser for all users.
In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=True` _and_ `LANGFLOW_AUTO_LOGIN=True` to skip authentication for API requests _and_ allow automatic login as a superuser for all users.
This is a temporary bypass for backwards compatibility, and the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
If either `LANGFLOW_AUTO_LOGIN` or `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` are set to `false`, then authentication is required.
If either `LANGFLOW_AUTO_LOGIN` or `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` are false, then authentication is required.
</details>
### LANGFLOW_ENABLE_SUPERUSER_CLI {#langflow-enable-superuser-cli}
Controls the availability of the `langflow superuser` command in the Langflow CLI.
The default is true, but false is recommended to prevent unrestricted superuser creation.
For more information, see [`langflow superuser`](/configuration-cli#langflow-superuser).
### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD {#langflow-superuser}
These variables specify the username and password for the Langflow server's superuser.
@ -176,12 +182,11 @@ LANGFLOW_SUPERUSER=administrator
LANGFLOW_SUPERUSER_PASSWORD=securepassword
```
They are required if `LANGFLOW_AUTO_LOGIN=false`.
They are required if `LANGFLOW_AUTO_LOGIN=False`.
Otherwise, they aren't relevant.
If required and not set, the default values are `langflow` and `langflow`.
For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled) and the CLI command [`langflow superuser`](/configuration-cli#langflow-superuser).
If required and not set in when you [start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled), then the default values are `langflow` and `langflow` for system auto-login behavior.
These defaults don't apply when using the Langflow CLI command [`langflow superuser`](/configuration-cli#langflow-superuser).
### LANGFLOW_SECRET_KEY {#langflow-secret-key}
@ -258,12 +263,6 @@ LANGFLOW_NEW_USER_IS_ACTIVE=False
Only superusers can manage user accounts for a Langflow server, but user management only matters if your server has authentication enabled.
For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled).
### LANGFLOW_ENABLE_SUPERUSER_CLI {#langflow-enable-superuser-cli}
Controls the availability of the `langflow superuser` command in the Langflow CLI.
The default is `True`, but `False` is recommended to prevent unrestricted superuser creation.
For more information, see [`langflow superuser`](/configuration-cli#langflow-superuser).
## Start a Langflow server with authentication enabled
This section shows you how to use the [authentication environment variables](/api-keys-and-authentication#authentication-environment-variables) to deploy a Langflow server with authentication enabled.
@ -293,7 +292,7 @@ Additionally, you must sign in as a superuser to manage users and [create a Lang
2. Set `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` to your desired superuser credentials.
For a one-time test, you can use basic credentials like `administrator` and `password`.
Strong, securely-stored credentials are recommended for true development and production environments.
Strong, securely-stored credentials are recommended in genuine development and production environments.
3. Recommended: Generate and set a `LANGFLOW_SECRET_KEY` for encrypting sensitive data.
@ -319,7 +318,7 @@ Additionally, you must sign in as a superuser to manage users and [create a Lang
```
Starting Langflow with an `.env` file automatically authenticates you as the superuser set in `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`.
If you don't explicitly set these variables, the default values are `langflow` and `langflow`.
If you don't explicitly set these variables, the default values are `langflow` and `langflow` for system auto-login.
6. Verify the server is running. The default location is `http://localhost:7860`.

View file

@ -3,9 +3,32 @@ title: Langflow CLI
slug: /configuration-cli
---
import Link from '@docusaurus/Link';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Icon from "@site/src/components/icon";
The Langflow command line interface (Langflow CLI) is the main interface for managing and running the Langflow server.
The Langflow command line interface is the main interface for managing and running the Langflow server.
The Langflow CLI is automatically installed when you [install the Langflow package](/get-started-installation).
It isn't available for Langflow Desktop.
## How to use the CLI
The Langflow CLI can be invoked in several ways, depending on your installation method and environment.
The recommended approach is to run the CLI with `uv run` from within a virtual environment where Langflow is installed.
For example, to start Langflow on the default port, run the following command:
```bash
uv run langflow run
```
If Langflow is installed globally or added to your PATH, you can execute the CLI directly with `langflow`.
```bash
langflow run
```
## Precedence
@ -14,14 +37,12 @@ Langflow CLI options override the values of [environment variables](/environment
For example, if you have `LANGFLOW_PORT=7860` defined as an environment variable, and you run the CLI with `--port 7880`, then Langflow sets the port to `7880` because the CLI option overrides the environment variable.
This also applies to Boolean environment variables.
For example, if your set `LANGFLOW_REMOVE_API_KEYS=True` in your `.env` file, then you can change this to `False` by running the CLI with `--no-remove-api-keys`.
For example, if you set `LANGFLOW_REMOVE_API_KEYS=True` in your `.env` file, then you can change it to `False` by running the CLI with `--no-remove-api-keys`.
## Options
## Langflow CLI options
All Langflow CLI commands support options that modify the command's behavior or set environment variables.
### Option syntax
To set values for options, you can use either of the following syntax styles:
* `--option value`
@ -32,152 +53,318 @@ Values with spaces must be surrounded by quotation marks:
* `--option 'Value with Spaces'`
* `--option="Value with Spaces"`
### Boolean forms
### Boolean options
Boolean options enable and disable settings.
They accept no value.
Instead, each Boolean option has a true (enabled) and false (disabled) form:
They have a true (enabled) and false (disabled) form:
* Enabled (true): `--option`
* Disabled (false): `--no-option`
For example, `--remove-api-keys` is equivalent to `LANGFLOW_REMOVE_API_KEYS=True`:
The following examples compare Boolean option forms for `REMOVE_API_KEYS`.
<Tabs>
<TabItem value="true" label="True" default>
`--remove-api-keys` is equivalent to setting `LANGFLOW_REMOVE_API_KEYS=True` in `.env`:
```bash
langflow run --remove-api-keys
uv run langflow run --remove-api-keys
```
In contrast, `--no-remove-api-keys` is equivalent to `LANGFLOW_REMOVE_API_KEYS=False`:
</TabItem>
<TabItem value="false" label="False">
`--no-remove-api-keys` is equivalent to `LANGFLOW_REMOVE_API_KEYS=False` in `.env`:
```bash
langflow run --no-remove-api-keys
uv run langflow run --no-remove-api-keys
```
### Default options
</TabItem>
</Tabs>
In the following command references, default values for Booleans include both the CLI flag and the equivalent Boolean evaluation, such as "`--option` (true)" and "`--no-option` (false)".
### Universal options
The following options are available for all Langflow CLI commands:
* `--version`, `-v`: Show the version and exit.
* `--install-completion`: Install auto-completion for the current shell.
* `--show-completion`: Show the location of the auto-completion config file, if installed.
* `--help`: Print information about command usage, options, and arguments.
These are modifiers that change the output or execution of a command.
They aren't Booleans, and they accept no values.
## CLI commands
The following sections describe the available CLI commands and any non-default options available for each command.
The following sections describe the available CLI commands and any additional options (beyond the [universal options](#universal-options)) available for each command.
### langflow
Running the CLI without any arguments prints a list of available options and commands:
Running the CLI without any arguments prints a list of available options and commands.
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
uv run langflow
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow
# or
python -m langflow
```
</TabItem>
</Tabs>
### langflow api-key {#langflow-api-key}
Create a Langflow API key with superuser privileges.
Creates a Langflow API key.
You must be a superuser to create API keys with the CLI.
For more information, see [Langflow API keys](/api-keys-and-authentication#langflow-api-keys).
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
langflow api-key
# or
uv run langflow api-key
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow api-key
```
</TabItem>
</Tabs>
#### Options
| Option | Default | Type | Description |
|--------|---------|--------|-------------|
| `--log-level` | `error` | String | The logging level. One of `debug`, `info`, `warning`, `error`, or `critical`. |
### langflow copy-db
Copy the Langflow database files from the cache directory to the current directory containing `__main__.py`.
You can find this directory by running `which langflow`.
Copies the Langflow database files from the cache directory to the current Langflow installation directory, which is the directory containing `__main__.py`.
You can find the copy target directory by running `which langflow`.
The following files are copied if they exist in the cache directory:
* `langflow.db`: The main Langflow database, stored in the user cache directory
* `langflow-pre.db`: The pre-release database, if it exists
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
uv run langflow copy-db
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow copy-db
# or
python -m langflow copy-db
```
The database files are `langflow.db` and `langflow-pre.db`.
If these files don't exist in the cache directory, then nothing is copied.
</TabItem>
</Tabs>
### langflow migration
Run or test database migrations:
Manages Langflow database schema changes using [Alembic](https://alembic.sqlalchemy.org/en/latest/), a database migration tool for SQLAlchemy.
```bash
langflow migration [OPTIONS]
# or
python -m langflow migration [OPTIONS]
```
The `migration` command has two modes:
#### Options
* **Test mode (default)**: Checks if migrations can be applied safely without actually running the migrations.
Use this mode to previews the changes that would be made to the database schema before proceeding with the migrations.
| Option | Default | Type | Description |
|--------|---------|--------|-------------|
| `--test` | `true` | Boolean | Run migrations in test mode. Use `--no-test` to disable test mode. |
| `--fix` | `false` (`--no-fix`) | Boolean | Fix migrations. This is a destructive operation, and all affected data will be deleted. Only use this option if you know what you are doing. |
* **Fix mode**: Applies the migrations to update the database schema.
:::warning
`langflow migration --fix` is a destructive operation that can delete data.
Always run `langflow migration` first to preview the changes.
:::
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
1. Run test mode:
```bash
uv run langflow migration
```
2. Preview the changes returned by the test to determine if it's safe to proceed with the migration.
3. Run fix mode to apply the changes:
```bash
uv run langflow migration --fix
```
</TabItem>
<TabItem value="Global" label="Global">
1. Run test mode:
```bash
langflow migration
```
2. Preview the changes returned by the test to determine if it's safe to proceed with the migration.
3. Run fix mode to apply the changes:
```bash
langflow migration --fix
```
</TabItem>
</Tabs>
### langflow run
Start the Langflow server.
Starts the Langflow server.
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
uv run langflow run [OPTIONS]
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow run [OPTIONS]
# or
python -m langflow run [OPTIONS]
```
</TabItem>
</Tabs>
#### Options
This command supports some common and non-sensitive configuration options for your Langflow server.
Other options must be set in the `.env` or your terminal.
For more information Langflow configuration options, see [Langflow environment variables](/environment-variables).
| Option | Default | Type | Description |
|--------|---------|--------|-------------|
| <Link id="run-host"/>`--host` | `localhost` | String | The host on which the Langflow server will run. |
| <Link id="run-workers"/>`--workers` | `1` | Integer | Number of worker processes. |
| <Link id="run-worker-timeout"/>`--worker-timeout` | `300` | Integer | Worker timeout in seconds. |
| <Link id="run-port"/>`--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use. |
| <Link id="run-components-path"/>`--components-path` | `/components` | String | Path to the directory containing custom components. |
| `--env-file` | Not set | String | Path to the `.env` file containing environment variables. |
| `--log-level` | `critical` | Enum | Set the logging level as one of `debug`, `info`, `warning`, `error`, or `critical`. |
| `--log-file` | `logs/langflow.log` | String | Set the path to the log file for Langflow. |
| <Link id="run-cache"/>`--cache` | `async` | Enum | Type of cache to use as one of `async`, `redis`, `memory`, or `disk`. |
| <Link id="run-frontend-path"/>`--frontend-path` | `./frontend` | String | Path to the frontend directory containing build files. This is for development purposes only. |
| <Link id="run-open-browser"/>`--open-browser` | `true` | Boolean | Open the system web browser on startup. Use `--no-open-browser` to disable opening the system web browser on startup. |
| <Link id="run-remove-api-keys"/>`--remove-api-keys` | `false` (`--no-remove-api-keys`) | Boolean | Remove API keys from the projects saved in the database. |
| <Link id="run-backend-only"/>`--backend-only` | `false` (`--no-backend-only`) | Boolean | Only run Langflow's backend server (no frontend). |
| <Link id="run-store"/>`--store` | `true` | Boolean | Enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features. |
| <Link id="run-auto-saving"/>`--auto-saving` | `true` | Boolean | Enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving. |
| <Link id="run-auto-saving-interval"/>`--auto-saving-interval` | `1000` | Integer | Set the interval for flow auto-saving in milliseconds. |
| <Link id="run-health-check-max-retries"/>`--health-check-max-retries` | `5` | Integer | Set the maximum number of retries for the health check. Use `--no-health-check-max-retries` to disable the maximum number of retries for the health check. |
| <Link id="run-max-file-size-upload"/>`--max-file-size-upload` | `100` | Integer | Set the maximum file size for the upload in megabytes. |
| `--ssl-cert-file-path` | Not set | String | Path to the SSL certificate file on the local system. |
| `--ssl-key-file-path` | Not set | String | Path to the SSL key file on the local system. |
| `--auto-saving` | `--auto-saving` (true) | Boolean | Whether to enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving. |
| `--auto-saving-interval` | `1000` | Integer | The interval for flow auto-saving in milliseconds. |
| `--backend-only` | `--no-backend-only` (false) | Boolean | Whether to run Langflow's backend service only (no frontend). Omit or use `--no-backend-only` to start both the frontend and backend. See [Start Langflow in headless mode](#start-langflow-in-headless-mode). |
| `--cache` | `async` | String | The type of cache to use. One of `async`, `redis`, `memory`, or `disk`. |
| `--components-path` | Not set | String | The path to the directory containing custom components. |
| `--dev` | `--no-dev` (false) | Boolean | Whether to run in development mode (may contain bugs). |
| `--env-file` | Not set | String | The path to the `.env` file containing Langflow environment variables. See [Start Langflow with a specific .env file](#start-langflow-with-a-specific-env-file). |
| `--frontend-path` | Not set | String | The path to the frontend directory containing build files. This is only used when [contributing to the Langflow codebase](/contributing-how-to-contribute) or developing a custom Langflow image that includes customized frontend code. |
| `--health-check-max-retries` | `5` | Integer | The maximum number of retries for the health check. |
| `--host` | `localhost` | String | The host on which the Langflow server will run. |
| `--log-file` | `logs/langflow.log` | String | The path to the log file for Langflow. |
| `--log-level` | `critical` | String | The logging level as one of `debug`, `info`, `warning`, `error`, or `critical`. |
| `--log-rotation` | Not set | String | The log rotation (Time/Size). |
| `--max-file-size-upload` | `100` | Integer | The maximum size in megabytes for file uploads. |
| `--open-browser` | `--no-open-browser` (false) | Boolean | Whether to open the system web browser on startup. Use `--open-browser` to open the system's default web browser when Langflow starts. |
| `--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use. |
| `--remove-api-keys` | `--no-remove-api-keys` (false) | Boolean | Whether to remove API keys from projects saved in the Langflow database. |
| `--ssl-cert-file-path` | Not set | String | The path to the SSL certificate file on the local system. |
| `--ssl-key-file-path` | Not set | String | The path to the SSL key file on the local system. |
| `--store` | `--store` (true) | Boolean | Whether to enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features. |
| `--worker-timeout` | `300` | Integer | The worker timeout in seconds. |
| `--workers` | `1` | Integer | The number of worker processes. |
For information about the environment variables that correspond to these options, see [Supported environment variables](/environment-variables#supported-variables).
#### Start Langflow with a specific .env file {#start-langflow-with-a-specific-env-file}
The `--env-file` option starts Langflow using the configuration defined in the given `.env` file.
Additional options appended to this command override the values in the `.env` file if there are duplicates.
If `--env-file` is omitted or doesn't include all required variables, Langflow uses the default values for those variables.
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
uv run langflow run --env-file PATH/TO/LANGFLOW/.env
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow run --env-file PATH/TO/LANGFLOW/.env
```
</TabItem>
</Tabs>
#### Start Langflow in headless mode {#start-langflow-in-headless-mode}
The `--backend-only` option starts Langflow's backend service only.
This headless mode has no frontend (visual editor), and you can only access the server programmatically with the Langflow API and CLI.
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
uv run langflow run --backend-only
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow run --backend-only
```
</TabItem>
</Tabs>
### langflow superuser {#langflow-superuser}
Create a superuser account.
Creates a superuser account with the given username and password.
Controlled by the [`LANGFLOW_ENABLE_SUPERUSER_CLI`](/api-keys-and-authentication#langflow-enable-superuser-cli) environment variable:
* **`LANGFLOW_ENABLE_SUPERUSER_CLI=True` (Default)**: The `langflow superuser` command is available, and superuser creation is unrestricted.
* **`LANGFLOW_ENABLE_SUPERUSER_CLI=False` (Recommended)**: Disables the `langflow superuser` command.
For security reasons, this is recommended to prevent unauthorized superuser creation, especially in production environments.
<Tabs groupId="Invocation">
<TabItem value="uv (recommended)" label="uv (recommended)" default>
```bash
langflow superuser [OPTIONS]
# or
python -m langflow superuser [OPTIONS]
uv run langflow superuser --username [NAME] --password [PASSWORD] [OPTIONS]
```
</TabItem>
<TabItem value="Direct" label="Direct">
```bash
langflow superuser --username [NAME] --password [PASSWORD] [OPTIONS]
```
</TabItem>
</Tabs>
#### Options
| Option | Default | Type | Description |
|--------|---------|--------|-------------|
| `--username` | `langflow` | String | Specify the name for the superuser. |
| `--password` | `langflow` | String | Specify the password for the superuser. |
| `--log-level` | `error` | String | The logging level. One of `debug`, `info`, `warning`, `error`, or `critical`. |
For more information, see [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser).
For this command, `--username` and `--password` aren't optional, and they have no default value.
The command fails if you don't provide these arguments.
For more information, see [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser).
#### Disable CLI superuser creation
The `langflow superuser` command is controlled by the [`LANGFLOW_ENABLE_SUPERUSER_CLI`](/api-keys-and-authentication#langflow-enable-superuser-cli) environment variable:
* **`LANGFLOW_ENABLE_SUPERUSER_CLI=True` (default)**: The `langflow superuser` command is available, and superuser creation is unrestricted.
* **`LANGFLOW_ENABLE_SUPERUSER_CLI=False` (recommended)**: Disables the `langflow superuser` command.
For security reasons, this is recommended to prevent unauthorized superuser creation, especially in production environments.
To disable the `langflow superuser` command, you must set `LANGFLOW_ENABLE_SUPERUSER_CLI=False` in your Langflow `.env` file, and then [start Langflow with your `.env` file](#start-langflow-with-a-specific-env-file).

View file

@ -156,17 +156,9 @@ When adding global variables from the environment, the following limitations app
- Global variables that you add from the environment always have the **Credential** type.
:::
If you want to explicitly prevent Langflow from sourcing global variables from the environment, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` to `false` in your `.env` file:
If you want to explicitly prevent Langflow from sourcing global variables from the environment, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES=False` in your `.env` file.
```text
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=false
```
If you want to automatically set fallback values for your global variables from environment variables, set the `LANGFLOW_FALLBACK_FROM_ENV_VAR` environment variable to `true` in your `.env` file. When this feature is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
```text
LANGFLOW_FALLBACK_FROM_ENV_VAR=true
```
If you want to automatically set fallback values for your global variables from environment variables, set `LANGFLOW_FALLBACK_FROM_ENV_VAR=True` in your `.env` file. When this setting is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
## Default environment variables

View file

@ -77,18 +77,18 @@ If it detects a supported environment variable, then it automatically adopts the
3. Define [Langflow environment variables](#supported-variables) in the `.env` file. For example:
```text
DO_NOT_TRACK=true
LANGFLOW_AUTO_LOGIN=false
LANGFLOW_AUTO_SAVING=true
DO_NOT_TRACK=True
LANGFLOW_AUTO_LOGIN=False
LANGFLOW_AUTO_SAVING=True
LANGFLOW_AUTO_SAVING_INTERVAL=1000
LANGFLOW_BACKEND_ONLY=false
LANGFLOW_BACKEND_ONLY=False
LANGFLOW_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]
LANGFLOW_CACHE_TYPE=async
LANGFLOW_COMPONENTS_PATH=/path/to/components/
LANGFLOW_CONFIG_DIR=/path/to/config/
LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
LANGFLOW_DEV=false
LANGFLOW_FALLBACK_TO_ENV_VAR=false
LANGFLOW_DEV=False
LANGFLOW_FALLBACK_TO_ENV_VAR=False
LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5
LANGFLOW_HOST=localhost
LANGFLOW_LANGCHAIN_CACHE=InMemoryCache
@ -96,13 +96,13 @@ If it detects a supported environment variable, then it automatically adopts the
LANGFLOW_MAX_ITEMS_LENGTH=100
LANGFLOW_MAX_TEXT_LENGTH=1000
LANGFLOW_LOG_LEVEL=error
LANGFLOW_OPEN_BROWSER=false
LANGFLOW_OPEN_BROWSER=False
LANGFLOW_PORT=7860
LANGFLOW_REMOVE_API_KEYS=false
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
LANGFLOW_REMOVE_API_KEYS=False
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
LANGFLOW_SECRET_KEY=somesecretkey
LANGFLOW_STORE=true
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
LANGFLOW_STORE=True
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=True
LANGFLOW_SUPERUSER=adminuser
LANGFLOW_SUPERUSER_PASSWORD=adminpass
LANGFLOW_WORKER_TIMEOUT=60000
@ -145,26 +145,24 @@ The following table lists the environment variables supported by Langflow.
| Variable | Format | Default | Description |
|----------|--------|---------|-------------|
| `DO_NOT_TRACK` | Boolean | `false` | If `true`, Langflow telemetry is disabled. |
| `LANGFLOW_AUTO_LOGIN` | Boolean | `true` | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
| `LANGFLOW_AUTO_SAVING` | Boolean | `true` | Enable flow auto-saving. See [`--auto-saving`](./configuration-cli.mdx#run-auto-saving). |
| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. See [`--auto-saving-interval`](./configuration-cli.mdx#run-auto-saving-interval). |
| `LANGFLOW_BACKEND_ONLY` | Boolean | `false` | Only run Langflow's backend server (no frontend). See [`--backend-only`](./configuration-cli.mdx#run-backend-only). |
| `LANGFLOW_BUNDLE_URLS` | List [String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If LANGFLOW_AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the following environment variables: LANGFLOW_REDIS_HOST, LANGFLOW_REDIS_PORT, LANGFLOW_REDIS_DB, and LANGFLOW_REDIS_CACHE_EXPIRE. |
| `LANGFLOW_COMPONENTS_PATH` | String | `/components` | Path to the directory containing custom components. See [`--components-path`](./configuration-cli.mdx#run-components-path). |
| `LANGFLOW_CONFIG_DIR` | String | Varies | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Default path depends on your installation. See [Flow storage and logs](/concepts-flows#flow-storage-and-logs) |
| `DO_NOT_TRACK` | Boolean | False | Whether to report [Langflow telemetry data](/contributing-telemetry). If true, Langflow telemetry is disabled. |
| `LANGFLOW_AUTO_LOGIN` | Boolean | True | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
| `LANGFLOW_AUTO_SAVING` | Boolean | True | Enable flow auto-saving. |
| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. |
| `LANGFLOW_BACKEND_ONLY` | Boolean | False | Run only the Langflow backend service (no frontend). |
| `LANGFLOW_BUNDLE_URLS` | List[String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If LANGFLOW_AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the following environment variables: `LANGFLOW_REDIS_HOST`, `LANGFLOW_REDIS_PORT`, `LANGFLOW_REDIS_DB`, and `LANGFLOW_REDIS_CACHE_EXPIRE`. |
| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to the directory containing custom components. |
| `LANGFLOW_CONFIG_DIR` | String | Varies | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Default path depends on your installation. See [Flow storage and logs](/concepts-flows#flow-storage-and-logs). |
| `LANGFLOW_DATABASE_URL` | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. |
| `LANGFLOW_USE_NOOP_DATABASE` | Boolean | `false` | Use a no-op database, which avoids database connections and operations. Useful for running flows without a database. |
| `LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | `false` | If True, Langflow tries to connect to the database again if it fails. |
| `LANGFLOW_DB_POOL_SIZE` | Integer | `10` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
| `LANGFLOW_DB_MAX_OVERFLOW` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
| `LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `20` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
| `LANGFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 10, "max_overflow": 20}` |
| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | `false` | If set to `true`, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
| `LANGFLOW_ENABLE_LOG_RETRIEVAL` | Boolean | `false` | Enable log retrieval functionality. |
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Boolean | `true` | Allow creation of superusers with the Langflow CLI command [`langflow superuser`](./configuration-cli.mdx#langflow-superuser). Recommended to be `false` in production for security reasons. |
| `LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](/configuration-global-variables) set in your Langflow **Settings** can use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables. |
| `LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | False | Whether to retry lost connections to the Langflow database. If true, Langflow tries to connect to the database again if the connection fails. |
| `LANGFLOW_DB_POOL_SIZE` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
| `LANGFLOW_DB_MAX_OVERFLOW` | Integer | `30` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
| `LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `30` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
| `LANGFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 20, "max_overflow": 30}` |
| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | False | Whether to track API key usage. If true, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Boolean | True | Allow creation of superusers with the Langflow CLI command [`langflow superuser`](./configuration-cli.mdx#langflow-superuser). Recommended to be disabled (false) in production for security reasons. |
| `LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | True | If enabled, [global variables](/configuration-global-variables) set in your Langflow **Settings** can use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables. |
| `LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only. See [`--frontend-path`](./configuration-cli.mdx#run-frontend-path). |
| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check. See [`--health-check-max-retries`](./configuration-cli.mdx#run-health-check-max-retries). |
| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. See [`--host`](./configuration-cli.mdx#run-host). |
@ -175,34 +173,34 @@ The following table lists the environment variables supported by Langflow.
| `LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes. See [`--max-file-size-upload`](./configuration-cli.mdx#run-max-file-size-upload). |
| `LANGFLOW_MAX_ITEMS_LENGTH` | Integer | `100` | Maximum number of items to store and display in the visual editor. Lists longer than this will be truncated when displayed in the visual editor. Doesn't affect data passed between components nor outputs. |
| `LANGFLOW_MAX_TEXT_LENGTH` | Integer | `1000` | Maximum number of characters to store and display in the visual editor. Responses longer than this will be truncated when displayed in the visual editor. Doesn't truncate responses between components nor outputs. |
| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | `true` | If this option is set to False, Langflow doesn't enable the MCP server. |
| <sup><sup>`LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS`</sup></sup> | Boolean | `false` | If this option is set to True, Langflow sends progress notifications in the MCP server. |
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | `false` | See [`LANGFLOW_NEW_USER_IS_ACTIVE`](/api-keys-and-authentication#langflow-new-user-is-active). |
| `LANGFLOW_OPEN_BROWSER` | Boolean | `false` | Open the system web browser on startup. See [`--open-browser`](./configuration-cli.mdx#run-open-browser). |
| `LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. See [`--port`](./configuration-cli.mdx#run-port). |
| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | `false` | Expose Prometheus metrics. |
| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | True | If this option is set to False, Langflow doesn't enable the MCP server. |
| `LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | False | If this option is set to True, Langflow sends progress notifications in the MCP server. |
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | False | See [`LANGFLOW_NEW_USER_IS_ACTIVE`](/api-keys-and-authentication#langflow-new-user-is-active). |
| `LANGFLOW_OPEN_BROWSER` | Boolean | False | Open the system web browser on startup. |
| `LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. |
| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | False | Expose Prometheus metrics. |
| `LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | See `LANGFLOW_CACHE_TYPE`. |
| `LANGFLOW_REDIS_DB` | Integer | `0` | See `LANGFLOW_CACHE_TYPE`. |
| `LANGFLOW_REDIS_HOST` | String | `localhost` | See `LANGFLOW_CACHE_TYPE`. |
| `LANGFLOW_REDIS_PORT` | String | `6379` | See `LANGFLOW_CACHE_TYPE`. |
| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Password for Redis authentication when using Redis cache type. |
| `LANGFLOW_REMOVE_API_KEYS` | Boolean | `false` | Remove API keys from the projects saved in the database. See [`--remove-api-keys`](./configuration-cli.mdx#run-remove-api-keys). |
| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | `false` | Save the Langflow database in `LANGFLOW_CONFIG_DIR` instead of in the Langflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Langflow. |
| `LANGFLOW_REMOVE_API_KEYS` | Boolean | False | Remove API keys from the projects saved in the database. |
| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | False | If false (default), the Langflow database is saved in the `langflow` root directory. This means the database isn't shared between different virtual environments, and the database is deleted when you uninstall Langflow. If true, the database is saved in the `LANGFLOW_CONFIG_DIR`. |
| `LANGFLOW_SECRET_KEY` | String | Automated | See [`LANGFLOW_SECRET_KEY`](/api-keys-and-authentication#langflow-secret-key). |
| `LANGFLOW_STORE` | Boolean | `true` | Enable the Langflow Store. See [`--store`](/configuration-cli#run-store). |
| <sup><sup>`LANGFLOW_STORE_ENVIRONMENT_VARIABLES`</sup></sup> | Boolean | `true` | Store environment variables as [global variables](/configuration-global-variables) in the database. |
| `LANGFLOW_CREATE_STARTER_PROJECTS` | Boolean | `true` | If this option is enabled, Langflow creates starter projects during initialization. Set to `false` to skip all starter project creation and updates. |
| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | `true` | If this option is enabled, Langflow updates starter projects with the latest component versions when initializing. |
| `LANGFLOW_STORE` | Boolean | True | Whether to enable the Langflow Store features. |
| `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | True | Whether to store environment variables as [global variables](/configuration-global-variables) in the database. |
| `LANGFLOW_CREATE_STARTER_PROJECTS` | Boolean | True | Whether to create templates during initialization. If false, Langflow doesn't create templates, and `LANGFLOW_UPDATE_STARTER_PROJECTS` is treated as false. |
| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | True | Whether to update templates with the latest component versions when initializing after an upgrade. |
| `LANGFLOW_SUPERUSER` | String | `langflow` | See [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser). |
| `LANGFLOW_SUPERUSER_PASSWORD` | String | `langflow` | See [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](/api-keys-and-authentication#langflow-superuser). |
| <sup><sup>`LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT`</sup></sup> | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](/configuration-global-variables). |
| `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](/configuration-global-variables). |
| `LANGFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if `LANGFLOW_AUTO_LOGIN` is enabled. |
| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. See [`--worker-timeout`](./configuration-cli.mdx#run-worker-timeout). |
| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. See [`--workers`](./configuration-cli.mdx#run-workers). |
| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. |
| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. |
| `LANGFLOW_SSL_CERT_FILE` | String | Not set | Path to the SSL certificate file on the local system. |
| `LANGFLOW_SSL_KEY_FILE` | String | Not set | Path to the SSL key file on the local system. |
| `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` | Boolean | `true` | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
| `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` | Boolean | True | See [`LANGFLOW_AUTO_LOGIN`](/api-keys-and-authentication#langflow-auto-login). |
## Configure .env, override.conf, and tasks.json files
@ -216,18 +214,18 @@ The `.env` file is a text file that contains key-value pairs of environment vari
Create or edit a `.env` file in the root directory of your application or Langflow environment, and then add your configuration variables to the file:
```text title=".env"
DO_NOT_TRACK=true
LANGFLOW_AUTO_LOGIN=false
LANGFLOW_AUTO_SAVING=true
DO_NOT_TRACK=True
LANGFLOW_AUTO_LOGIN=False
LANGFLOW_AUTO_SAVING=True
LANGFLOW_AUTO_SAVING_INTERVAL=1000
LANGFLOW_BACKEND_ONLY=false
LANGFLOW_BACKEND_ONLY=False
LANGFLOW_BUNDLE_URLS=["https://github.com/user/repo/commit/hash"]
LANGFLOW_CACHE_TYPE=async
LANGFLOW_COMPONENTS_PATH=/path/to/components/
LANGFLOW_CONFIG_DIR=/path/to/config/
LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
LANGFLOW_DEV=false
LANGFLOW_FALLBACK_TO_ENV_VAR=false
LANGFLOW_DEV=False
LANGFLOW_FALLBACK_TO_ENV_VAR=False
LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5
LANGFLOW_HOST=localhost
LANGFLOW_LANGCHAIN_CACHE=InMemoryCache
@ -235,13 +233,13 @@ LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000
LANGFLOW_MAX_ITEMS_LENGTH=100
LANGFLOW_MAX_TEXT_LENGTH=1000
LANGFLOW_LOG_LEVEL=error
LANGFLOW_OPEN_BROWSER=false
LANGFLOW_OPEN_BROWSER=False
LANGFLOW_PORT=7860
LANGFLOW_REMOVE_API_KEYS=false
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
LANGFLOW_REMOVE_API_KEYS=False
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
LANGFLOW_SECRET_KEY=somesecretkey
LANGFLOW_STORE=true
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
LANGFLOW_STORE=True
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=True
LANGFLOW_SUPERUSER=adminuser
LANGFLOW_SUPERUSER_PASSWORD=adminpass
LANGFLOW_WORKER_TIMEOUT=60000

View file

@ -16,7 +16,7 @@ All telemetry data is anonymized and used solely for improving Langflow.
## Opt out of telemetry
To opt out of telemetry, set the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` environment variable to `true` before running Langflow. This disables telemetry data collection.
To opt out of telemetry, set `DO_NOT_TRACK=True` in your [Langflow environment variables](/environment-variables) before starting Langflow. This disables telemetry data collection.
## Data that Langflow collects

View file

@ -11,7 +11,7 @@ The [Langflow runtime Helm chart](https://github.com/langflow-ai/langflow-helm-c
:::important
For security reasons, the default Langflow runtime Helm chart sets [`readOnlyRootFilesystem: true`](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml#L46). This setting prevents modifications to the container's root filesystem at runtime, which is a recommended security measure in production environments.
If `readOnlyRootFilesystem` is disabled (`false`), it degrades your deployment's security posture. Only disable this setting if you understand the security implications and you have implemented other security measures.
If `readOnlyRootFilesystem` is disabled (false), it degrades your deployment's security posture. Only disable this setting if you understand the security implications and you have implemented other security measures.
For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).
:::

View file

@ -268,7 +268,7 @@ Replace `baseUrl` and `flowId` with values from your deployment.
To retrieve [Langflow logs](/logging), you must enable log retrieval on your Langflow server by including the following values in your server's `.env` file:
```text
LANGFLOW_ENABLE_LOG_RETRIEVAL=true
LANGFLOW_ENABLE_LOG_RETRIEVAL=True
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
LANGFLOW_LOG_LEVEL=DEBUG
```

View file

@ -58,8 +58,8 @@ It contains environment variables that control Langflow's behavior, such as auth
For example:
```text
LANGFLOW_AUTO_LOGIN=true
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
LANGFLOW_AUTO_LOGIN=True
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
LANGFLOW_BASE_URL=http://0.0.0.0:7860
OPENAI_API_KEY=sk-...
```

View file

@ -103,18 +103,20 @@ For more information, see [Configure an external PostgreSQL database](/configura
5. Optional: Run migrations.
Langflow, through SQLAlchemy and Alembic, uses migrations to manage its database schema.
Avoid manual schema changes to prevent conflicts with Langflow's built-in schema management.
Langflow uses migrations to manage its database schema.
When you first connect to PostgreSQL, Langflow automatically runs migrations to create the necessary tables.
To manually run migrations, run `langflow migration` to preview the changes, and then run `langflow migration --fix` to apply the changes.
Direct schema modification can cause conflicts with Langflow's built-in schema management.
If you need to update the schema, you can manually run migrations with the Langflow CLI:
:::danger
Migrations are a destructive operation that can delete data.
Always run `langflow migration` first to preview changes before applying them with `--fix`.
For more information, see [Langflow CLI](/configuration-cli).
:::
1. Run `langflow migration` to preview the changes.
2. Review the changes to ensure that it's safe to proceed with the migration.
3. Run `langflow migration --fix` to run the migration and permanently apply the changes.
This is a destructive operation that can delete data.
For more information, see [`langflow migration`](/configuration-cli#langflow-migration).
6. To verify the configuration, create any flow using the Langflow visual editor or API, and then query your database to confirm the tables and activity are recorded there. The content of the flow doesn't matter; you only need to confirm that the flow is stored in your PostgreSQL database.
You can query the database in two ways:
@ -241,7 +243,7 @@ spec:
</Tabs>
After implementing HA or Active-Active HA, monitor failover events and ensure replicas are in sync.
Langflow, through [SQLAlchemy](https://docs.sqlalchemy.org/en/20/), supports reconnection attempts, ensures recovery after failover, and reduces disruption once the database is back online.
Langflow, through [SQLAlchemy](https://docs.sqlalchemy.org/en/20/), supports reconnection attempts if `LANGFLOW_DATABASE_CONNECTION_RETRY=True`, ensures recovery after failover, and reduces disruption once the database is back online.
Although PostgreSQL handles concurrent connections well, you must still monitor for contention, deadlocks, or other performance degradation during high load.

View file

@ -71,22 +71,22 @@ For more information, see the [NV-Ingest documentation](https://nvidia.github.io
|------|--------------|------|
| base_url | NVIDIA Ingestion URL | The URL of the NVIDIA Ingestion API. |
| path | Path | File path to process. |
| extract_text | Extract Text | Extract text from documents. Default: `True`. |
| extract_charts | Extract Charts | Extract text from charts. Default: `False`. |
| extract_tables | Extract Tables | Extract text from tables. Default: `True`. |
| extract_images | Extract Images | Extract images from document. Default: `True`. |
| extract_infographics | Extract Infographics | Extract infographics from document. Default: `False`. |
| extract_text | Extract Text | Extract text from documents. Default: true. |
| extract_charts | Extract Charts | Extract text from charts. Default: false. |
| extract_tables | Extract Tables | Extract text from tables. Default: true. |
| extract_images | Extract Images | Extract images from document. Default: true. |
| extract_infographics | Extract Infographics | Extract infographics from document. Default: false. |
| text_depth | Text Depth | The level at which text is extracted. Options: 'document', 'page', 'block', 'line', 'span'. Default: `page`. |
| split_text | Split Text | Split text into smaller chunks. Default: `True`. |
| split_text | Split Text | Split text into smaller chunks. Default: true. |
| chunk_size | Chunk Size | The number of tokens per chunk. Default: `500`. |
| chunk_overlap | Chunk Overlap | Number of tokens to overlap from previous chunk. Default: `150`. |
| filter_images | Filter Images | Filter images (see advanced options for filtering criteria). Default: `False`. |
| filter_images | Filter Images | Filter images (see advanced options for filtering criteria). Default: false. |
| min_image_size | Minimum Image Size Filter | Minimum image width/length in pixels. Default: `128`. |
| min_aspect_ratio | Minimum Aspect Ratio Filter | Minimum allowed aspect ratio (width / height). Default: `0.2`. |
| max_aspect_ratio | Maximum Aspect Ratio Filter | Maximum allowed aspect ratio (width / height). Default: `5.0`. |
| dedup_images | Deduplicate Images | Filter duplicated images. Default: `True`. |
| caption_images | Caption Images | Generate captions for images using the NVIDIA captioning model. Default: `True`. |
| high_resolution | High Resolution (PDF only) | Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: `False`. |
| dedup_images | Deduplicate Images | Filter duplicated images. Default: true. |
| caption_images | Caption Images | Generate captions for images using the NVIDIA captioning model. Default: true. |
| high_resolution | High Resolution (PDF only) | Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: false. |
### Outputs

View file

@ -6,22 +6,33 @@ slug: /integrations-langsmith
LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Langflow, add your LangChain API key and configuration as Langflow environment variables, and then start Langflow.
1. Obtain your LangChain API key from [https://smith.langchain.com](https://smith.langchain.com/)
2. Add the following keys to the Langflow .env file.
Replace `LANGCHAIN_API_KEY` and `LANGSMITH_PROJECT_NAME` with your LangChain API key.
2. Set the following environment variables in your Langflow `.env` file, replacing `LANGCHAIN_API_KEY` and `LANGSMITH_PROJECT_NAME` with your own values:
```text
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT=https://api.smith.langchain.com/
LANGSMITH_API_KEY=LANGCHAIN_API_KEY
LANGSMITH_PROJECT=LANGSMITH_PROJECT_NAME
```
```text
LANGSMITH_TRACING=True
LANGSMITH_ENDPOINT=https://api.smith.langchain.com/
LANGSMITH_API_KEY=LANGCHAIN_API_KEY
LANGSMITH_PROJECT=LANGSMITH_PROJECT_NAME
```
Alternatively, export the environment variables in your terminal:
Alternatively, you can export the environment variables in your terminal instead of adding them to the `.env` file:
`export LANGSMITH_TRACING=true && export LANGSMITH_ENDPOINT="https://api.smith.langchain.com/" && export LANGSMITH_API_KEY="LANGCHAIN_API_KEY" && export LANGSMITH_PROJECT="LANGSMITH_PROJECT_NAME"`
```bash
export LANGSMITH_TRACING=True && export LANGSMITH_ENDPOINT="https://api.smith.langchain.com/" && export LANGSMITH_API_KEY="LANGCHAIN_API_KEY" && export LANGSMITH_PROJECT="LANGSMITH_PROJECT_NAME"
```
3. Restart Langflow with your modified `.env` file or from the terminal where you set your environment variables:
```bash
langflow run --env-file .env
```
If you set the environment variables in your terminal, you can omit `--env-file`.
However, Langflow can source environment variables from `.env` _and_ your terminal.
For more information, see [Langflow environment variables](/environment-variables).
4. Run a flow in Langflow to generate some activity.
3. Restart Langflow using `langflow run --env-file .env`
4. Run a flow in Langflow.
5. View the LangSmith dashboard for monitoring and observability.
![LangSmith dashboard](/img/langsmith-dashboard.png)
![LangSmith dashboard](/img/langsmith-dashboard.png)

View file

@ -144,19 +144,15 @@ The following error can occur during Langflow upgrades when the new version can'
> Something went wrong running migrations. Please, run 'langflow migration --fix'
```
To resolve this error, clear the cache by deleting the contents of the Langflow cache folder.
To resolve this error, clear the cache by deleting the contents of your Langflow cache folder.
The filepath depends on your operating system, installation type, and configuration options.
For more information and default filepaths, see [Memory management options](/memory#flow-storage-and-logs).
:::important
Clearing the cache erases your settings.
If you want to retain your settings files, create a backup of those files before clearing the cache folder.
:::
The cache folder location depends on your OS:
- **Linux**: `home/<username>/.cache/langflow/`
- **WSL2 on Windows**: `home/<username>/.cache/langflow/`
- **macOS**: `/Users/<username>/Library/Caches/langflow/`
## Langflow uninstall issues
The following issues can occur when uninstalling Langflow.