Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Setting `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` and `LANGFLOW_AUTO_LOGIN=true` skip

`LANGFLOW_SKIP_AUTH_AUTO_LOGIN=true` is the default behavior, so users do not need to change existing workflows in 1.5. To update your workflows to require authentication, set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=false`.

For more information, see [Authentication](https://docs.langflow.org/configuration-authentication).
For more information, see [API keys and authentication](https://docs.langflow.org/api-keys-and-authentication).
9 changes: 3 additions & 6 deletions docs/docs/API-Reference/api-reference-api-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ You can configure the Langflow port number in the `LANGFLOW_PORT` [environment v

### Authentication

In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is set to `True`.
The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.

To authenticate a Langflow API request, provide a Langflow API key in either an `x-api-key` header or query parameter.
For more information, see [API keys](/configuration-api-keys).
In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key in either an `x-api-key` header or query parameter.
For more information, see [API keys and authentication](/api-keys-and-authentication).

As with any API, follow industry best practices for storing and referencing sensitive credentials.
For example, you can [set environment variables](#set-environment-variables) for your API keys, and then reference those environment variables in your API requests.
Expand Down Expand Up @@ -117,7 +114,7 @@ curl --request POST \
}'
```

Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](/configuration-api-keys), flow IDs, and [project IDs](/api-projects#read-projects).
Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](#authentication), flow IDs, and [project IDs](/api-projects#read-projects).

You can retrieve flow IDs from the [**API access** pane](/concepts-publish#api-access), in a flow's URL, and with [`GET /flows`](/api-flows#read-flows).

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Agents/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ For example, to use the default OpenAI model, you must provide a valid OpenAI AP

You can enter the key directly, but it is recommended that you follow industry best practices for storing and referencing API keys.
For example, you can use a <Icon name="Globe" aria-hidden="true"/> [global variable](/configuration-global-variables) or [environment variables](/environment-variables).
For more information, see [Add component API keys to Langflow](/configuration-api-keys#add-component-api-keys-to-langflow).
For more information, see [Add component API keys to Langflow](/api-keys-and-authentication#component-api-keys).

If you select **Custom** as the model provider, authentication is handled in the incoming **Language Model** component.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Components/bundles-lmstudio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
| api_key | LM Studio API Key | Input parameter. The API key for authentication with LM Studio, if required. |
| max_tokens | Integer | Input parameter. Maximum number of tokens to generate in the response. Default: `512`. |
| temperature | Float | Input parameter. Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.7`. |
| top_p | Float | Input parameter. Controls diversity via nucleus sampling. Range: `[0.0, 1.0]`. Default: `1.0`. |
| 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`. |
| presence_penalty | Float | Input parameter. Penalizes repeated tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. |
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/Components/components-custom-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ outputs = [
]
```

In this example, both outputs will be available via a dropdown selection in the UI.
In this example, both outputs are available through a dropdown menu in the Langflow UI.

Note: Since `group_outputs=False` is the default behavior, it does not need to be explicitly set in the component.

Expand Down Expand Up @@ -235,7 +235,7 @@ def some_method(self):

By default, Langflow looks for custom components in the `langflow/components` directory.

If you're creating custom components in a different location using the [LANGFLOW_COMPONENTS_PATH](/environment-variables#LANGFLOW_COMPONENTS_PATH) environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:
If you're creating custom components in a different location using the [`LANGFLOW_COMPONENTS_PATH`](/environment-variables#LANGFLOW_COMPONENTS_PATH) environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:

```
/your/custom/components/path/ # Base directory set by LANGFLOW_COMPONENTS_PATH
Expand Down Expand Up @@ -280,7 +280,7 @@ Inputs are defined in a class-level `inputs` list. When Langflow loads the compo

An input is usually an instance of a class from `langflow.io` (such as `StrInput`, `DataInput`, or `MessageTextInput`). The most common constructor parameters are:

* **`name`**: The internal variable name, accessed via `self.<name>`.
* **`name`**: The internal variable name, accessed with `self.<name>`.
* **`display_name`**: The label shown to users in the UI.
* **`info`** *(optional)*: A tooltip or short description.
* **`value`** *(optional)*: The default value.
Expand Down Expand Up @@ -489,8 +489,8 @@ When using typed annotations, consider the following best practices:
In **Langflow**, dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting `dynamic=True`.
Optionally, setting `real_time_refresh=True` triggers the `update_build_config` method to adjust the input's visibility or properties in real time, creating a contextual UI that only displays relevant fields based on the user's choices.

In this example, the operator field triggers updates via `real_time_refresh=True`.
The `regex_pattern` field is initially hidden and controlled via `dynamic=True`.
In this example, the operator field triggers updates with `real_time_refresh=True`.
The `regex_pattern` field is initially hidden and controlled with `dynamic=True`.

```python
from langflow.io import DropdownInput, StrInput
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Concepts/concepts-flows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ By default, flows and [flow logs](/logging) are stored on local disk at the foll
- **OSS macOS/Windows/Linux/WSL (uv pip install)**: `<path_to_venv>/lib/python3.12/site-packages/langflow/cache`
- **OSS macOS/Windows/Linux/WSL (git clone)**: `<path_to_clone>/src/backend/base/langflow/cache`

The flow storage location can be customized with the [`LANGFLOW_CONFIG_DIR`](/environment-variables#LANGFLOW_CONFIG_DIR) environment variable, and the flow log storage location can be customized with the [`LANGFLOW_LOG_FILE`](/environment-variables#LANGFLOW_LOG_FILE) environment variable.
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.

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Concepts/concepts-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ The **Share** menu provides the following options for integrating your flow into

* [Manage files in Langflow](/concepts-file-management)
* [Global variables](/configuration-global-variables)
* [Langflow API keys](configuration-api-keys)
* [API keys and authentication](/api-keys-and-authentication)
7 changes: 3 additions & 4 deletions docs/docs/Concepts/concepts-publish.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ For more information and examples of other Langflow API endpoints, see [Get star

### Langflow API authentication

In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key, even if `AUTO_LOGIN` is set to `True`.
The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key.

Code snippets generated in the **API access** pane include a script that checks for a `LANGFLOW_API_KEY` environment variable set in the local terminal session.
This script doesn't check for Langflow API keys set anywhere besides the local terminal session.
Expand All @@ -61,7 +60,7 @@ For this script to work, you must set a `LANGFLOW_API_KEY` variable in the termi

Alternatively, you can edit the code snippet to include an `x-api-key` header and ensure that the request can authenticate to the Langflow API.

For more information, see [API keys](/configuration-api-keys) and [Get started with the Langflow API](/api-reference-api-examples)
For more information, see [API keys and authentication](/api-keys-and-authentication) and [Get started with the Langflow API](/api-reference-api-examples).

### Input Schema (tweaks) {#input-schema}

Expand Down Expand Up @@ -357,7 +356,7 @@ To use the embedded chat widget in your HTML, the `langflow-chat` web component

* `host_url`: Your Langflow server URL. Must be `HTTPS`. Don't include a trailing slash (`/`).
* `flow_id`: The ID of the flow you want to embed.
* `api_key`: A [Langflow API key](/configuration-api-keys).
* `api_key`: A [Langflow API key](/api-keys-and-authentication).
This prop is recommended to ensure the widget has permission to run the flow.

The minimum inputs are automatically populated in the [**Embed into site** code snippet](#get-a-langflow-chat-snippet) that is generated by Langflow.
Expand Down
11 changes: 4 additions & 7 deletions docs/docs/Concepts/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ For example:

If you have [deployed a public Langflow server](/deployment-public-server), the address is automatically included.

:::important
If your Langflow server [requires authentication](/configuration-authentication) ([`LANGFLOW_AUTO_LOGIN=false`](/environment-variables#LANGFLOW_AUTO_LOGIN)), you must include your Langflow API key in the configuration.
If your Langflow server requires authentication, you must include your Langflow API key in the configuration.
For more information, see [MCP server authentication and environment variables](#authentication).
:::

5. Save and close the `mcp.json` file in Cursor.
The newly added MCP server will appear in the **MCP Servers** section.
Expand All @@ -160,7 +158,8 @@ For more information, see the [Cursor's MCP documentation](https://docs.cursor.c

### MCP server authentication and environment variables {#authentication}

If your Langflow server [requires authentication](/configuration-authentication) ([`LANGFLOW_AUTO_LOGIN`](/environment-variables#LANGFLOW_AUTO_LOGIN) is set to `false`), then you must supply a [Langflow API key](/configuration-api-keys) in your MCP client configuration.
You must provide a Langflow API key in your MCP client configuration if your [Langflow server has authentication enabled](/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled).

When this is the case, the code template in your project's **MCP Server** tab automatically includes the `--header` and `x-api-key` arguments:

```json
Expand All @@ -185,7 +184,7 @@ Alternatively, you can replace `YOUR_API_KEY` with an existing Langflow API key.

![MCP server tab showing Generate API key button](/img/mcp-server-api-key.png)

To include environment variables with your MCP server command, include them like this:
To include other environment variables with your MCP server command, use the `env` object with key-value pairs of environment variables:

```json
{
Expand All @@ -204,8 +203,6 @@ To include environment variables with your MCP server command, include them like
}
```

Replace `KEY` and `VALUE` with the environment variable name and value you want to include.

{/* The anchor on this section (deploy-your-server-externally) is currently a link target in the Langflow UI. Do not change. */}
### Deploy your MCP server externally {#deploy-your-server-externally}

Expand Down
Loading