Skip to content

Commit 1fac98c

Browse files
authored
docs: bump API spec and version to 1.11 (#14173)
* docs: bump API spec to 1.11 * docs: fix generation defs error * docs: clarify superuser * docs: release note cleanup * docs: revert restricted docker env vars * docs: fix link in env vars * docs: bump version to 1.11.0 * docs: workflows api is available in the API pane * docs: release note cleanup * docs: version parity * docs: tweaks pane moved to parameters * docs: add global vars example for workflows v2 * docs: trim tweaks section
1 parent 3d05b9f commit 1fac98c

601 files changed

Lines changed: 43014 additions & 988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/docs/API-Reference/api-files.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
182182
</Tabs>
183183

184184
:::tip
185-
For help with tweaks, use the **Input Schema** in a flow's [**API access** pane](/concepts-publish#api-access).
186-
Setting tweaks with **Input Schema** also automatically populates the required component IDs.
185+
For help with tweaks, expose fields in the component [**Parameters** panel](/concepts-publish#input-schema), and then click **Share** > **API access** to copy snippets with the required component IDs.
187186
:::
188187

189188
### List files (v1)

docs/docs/API-Reference/api-flows-run.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To create, read, update, and delete flows, see [Flow management endpoints](/api-
3434

3535
:::tip
3636
Langflow automatically generates Python, JavaScript, and curl code snippets for the `/v1/run/$FLOW_ID` endpoint for all flows.
37-
For more information, see [Generate API code snippets](/concepts-publish#generate-api-code-snippets).
37+
In the [**API access** pane](/concepts-publish#api-access), select **v1** for `/run` snippets, or **v2** (Beta) for [Workflow API](/workflow-api) snippets.
3838
:::
3939

4040
Execute a specified flow by ID or name.

docs/docs/API-Reference/workflows-api.mdx

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import exampleJavascriptWorkflowsApiExampleStreamAguiRequest from '!!raw-loader!
2424

2525
import Tabs from '@theme/Tabs';
2626
import TabItem from '@theme/TabItem';
27+
import Icon from "@site/src/components/icon";
2728
import PartialAPISetup from '@site/docs/_partial-api-setup.mdx';
2829

2930
:::warning Beta Feature
@@ -63,7 +64,7 @@ POST /api/v2/workflows
6364
| `stream_protocol` | `string` | No | `langflow` | Stream adapter name used for `stream` responses and background event re-attachment. Unknown values return a `422` code for any request mode because the API validates the field against the registered adapters before execution starts. |
6465
| `session_id` | `string` | No | - | Scopes message memory and chat history to this session. |
6566
| `tweaks` | `object` | No | `{}` | Per-component parameter overrides keyed by component id. See [Component tweaks](#component-tweaks). |
66-
| `globals` | `object` | No | `{}` | Request-level global variables (sync mode only). Keys are limited to 256 characters and values to 64 KB. See [Request-level global variables](#request-level-global-variables).
67+
| `globals` | `object` | No | `{}` | Request-level global variables. Available in sync mode only. Keys are limited to 256 characters and values to 64 KB. See [Pass request-level global variables](#request-level-global-variables).
6768
| `output_ids` | `array` | No | - | Output component ids to use when resolving sync-mode answers (sync mode only). |
6869
| `data` | `object` | No | - | Live-canvas override of nodes and edges (stream and background modes only). |
6970
| `files` | `array` | No | - | Pre-uploaded file paths to attach to the run (stream and background modes only). |
@@ -448,25 +449,43 @@ The `status` values are:
448449
}
449450
```
450451

451-
## Request-level global variables {#request-level-global-variables}
452+
## Pass request-level global variables {#request-level-global-variables}
452453

453-
Pass request-scoped variables in the `globals` JSON field. They are available to workflow components for the duration of the run. Use this field when values may include Unicode or other characters that HTTP headers handle poorly.
454+
Pass request-scoped variables in the `globals` JSON field.
455+
They are available to workflow components for the duration of the run.
454456

455-
`globals` is honored in **sync mode only**; stream and background runs ignore it.
457+
Use `globals` when values are large, shared across runs, or would exceed HTTP header size limits.
458+
[Tweaks](#component-tweaks) are better suited for one-off component overrides.
459+
`globals` is keyed by variable name and not component ID, so it stays stable when the UI regenerates node IDs when importing flows.
456460

457-
```json
458-
{
459-
"flow_id": "67ccd2be-17f0-8190-81ff-3bb2cf6508e6",
460-
"input_value": "Summarize the attached file",
461-
"globals": {
462-
"FILENAME": "relatório—final.pdf",
463-
"OWNER_NAME": "José"
464-
}
465-
}
461+
`globals` is honored in **sync mode only**; stream and background runs ignore it.
462+
The Workflow API is in **Beta**, and this transport may continue to evolve.
463+
464+
### Use a stable name in the UI and then pass it in `globals`
465+
466+
To avoid depending on changing component IDs, rename a component, create a matching global variable, bind the field, and pass the value in the request.
467+
468+
1. To rename the component in the UI, click <Icon name="PencilLine" aria-hidden="true"/> **Edit**, and then rename the component. This example uses `CUSTOMER_PROMPT`.
469+
2. Save the flow.
470+
3. Create a new global variable with the same name as the component, such as `CUSTOMER_PROMPT`, and save it.
471+
For more about creating global variables, see [Global variables](/configuration-global-variables).
472+
4. In the field you want to fill at runtime, click the <Icon name="Globe" aria-hidden="true"/> **Globe** icon, select `CUSTOMER_PROMPT`, and save the flow.
473+
5. Call the v2 Workflow API in sync mode and pass the value in `globals`.
474+
475+
```bash
476+
curl -X POST "http://localhost:7860/api/v2/workflows" \
477+
-H "Content-Type: application/json" \
478+
-H "x-api-key: YOUR_API_KEY" \
479+
-d '{
480+
"flow_id": "YOUR_FLOW_ID",
481+
"mode": "sync",
482+
"input_value": "hello",
483+
"globals": {
484+
"CUSTOMER_PROMPT": "The prompt with many words..."
485+
}
486+
}'
466487
```
467488

468-
Keys may use the same characters supported by the global variables panel in the Langflow UI. Keys are bounded to 256 characters; values are bounded to 64 KB.
469-
470489
<details>
471490
<summary>Legacy: `X-LANGFLOW-GLOBAL-VAR-*` headers (Workflow API, sync mode only)</summary>
472491

@@ -478,9 +497,9 @@ This note applies to the **Workflow API only**. The v1 [`/run`](/api-flows-run)
478497

479498
</details>
480499

481-
## Component tweaks
500+
## Component tweaks {#component-tweaks}
482501

483-
Use the `tweaks` object to override component parameters. Keys are component ids; values are objects of field names and values to set on that component's template.
502+
Use the `tweaks` object for one-off component parameter overrides in a single run.
484503

485504
```json
486505
{
@@ -495,7 +514,7 @@ Use the `tweaks` object to override component parameters. Keys are component ids
495514
}
496515
```
497516

498-
To find a component id in the Langflow UI, open your flow, click the component, and then click **Controls**. The component id is at the top of the **Controls** pane.
517+
For more information, see [Tweaks (API inputs)](/concepts-publish#input-schema).
499518

500519
## Error handling
501520

docs/docs/Deployment/deployment-block-custom-components.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false
1515
When set to `false`, Langflow blocks creating custom components and changing code in the visual editor.
1616

1717
When unset or `true`, Langflow allows custom code.
18-
Existing non-Docker installations keep the default `true` behavior until you opt in to this restriction.
19-
20-
As of Langflow 1.11.x, official Langflow Docker images set `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` at image build time, along with related [component hardening](/api-keys-and-authentication#multi-tenant-component-hardening) flags.
18+
Existing installations keep the default `true` behavior until you opt in to this restriction.
2119

2220
This environment variable is a beta feature, and should not be your only safeguard in production environments.
2321

docs/docs/Deployment/deployment-docker.mdx

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,24 @@ This guide demonstrates several ways to run Langflow with [Docker](https://docs.
1616
* [Customize the Docker Compose file](#customize): Package a flow or add your own code into a custom image built on top of the official Langflow image.
1717
* [Build and run the Docker image from source](#build-from-source): Build a Docker image from a local clone of the repo, or start a full development environment with hot reload on both frontend and backend.
1818
* [Upgrade the Langflow Docker image](#upgrade-the-langflow-docker-image): Upgrade to a newer image without losing your database or flows.
19-
* [Docker image security defaults](#docker-image-security-defaults): Hardened environment variables baked into published images, and how to override them for local use.
19+
* [Docker image defaults](#docker-image-security-defaults): Environment variables included in the Langflow image and how to override them.
2020

2121
## Quickstart {#quickstart}
2222

2323
With Docker installed and running on your system, run the following command:
2424

25-
```shell
26-
docker run -p 7860:7860 \
27-
-e LANGFLOW_AUTO_LOGIN=true \
28-
-e LANGFLOW_SUPERUSER_PASSWORD=SUPERUSER_PASSWORD \
29-
langflowai/langflow:latest
30-
```
25+
```bash
26+
docker run -p 7860:7860 \
27+
-e LANGFLOW_AUTO_LOGIN=false \
28+
-e LANGFLOW_SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD> \
29+
langflowai/langflow:latest
30+
```
3131

32-
Replace `SUPERUSER_PASSWORD` with a strong password for the Langflow superuser.
33-
As of Langflow 1.11.x, images include [security defaults](#docker-image-security-defaults) that you may need to override for local workflows.
32+
By default, the official Docker images set `LANGFLOW_AUTO_LOGIN=false` by default.
33+
34+
Replace `SUPERUSER_PASSWORD` with a strong password for the Langflow superuser.
35+
36+
For more information, see [Docker image defaults](#docker-image-security-defaults).
3437

3538
Then, access Langflow at `http://localhost:7860/`.
3639

@@ -230,7 +233,8 @@ Replace the following:
230233
* `SUPERUSER_PASSWORD`: a strong password for the Langflow superuser
231234
* `VERSION`: the version in `pyproject.toml` at the repo root
232235

233-
The image sets `LANGFLOW_AUTO_LOGIN=false` and the [component hardening defaults](#docker-image-security-defaults), so a superuser password is required unless you set `LANGFLOW_AUTO_LOGIN=true`.
236+
The image sets `LANGFLOW_AUTO_LOGIN=false`, so a superuser password is required unless you set `LANGFLOW_AUTO_LOGIN=true`.
237+
For more information, see [Docker image defaults](#docker-image-security-defaults).
234238

235239
To build only the LFX executor CLI image instead of the full Langflow application, run:
236240

@@ -301,9 +305,10 @@ The following environment variables are set by default:
301305
|---|---|---|
302306
| `LANGFLOW_DATABASE_URL` | `postgresql://langflow:langflow@postgres:5432/langflow` | PostgreSQL connection string |
303307
| `LANGFLOW_SUPERUSER` | `langflow` | Initial admin username |
304-
| `LANGFLOW_SUPERUSER_PASSWORD` | `langflow` | Initial admin password |
305308
| `LANGFLOW_CONFIG_DIR` | `/var/lib/langflow` | Directory for Langflow config and data |
306309

310+
`LANGFLOW_SUPERUSER_PASSWORD` is not set in the compose file. With the default `LANGFLOW_AUTO_LOGIN=true`, Langflow generates a random bootstrap password for the auto-login account. If you set `LANGFLOW_AUTO_LOGIN=false`, you must set `LANGFLOW_SUPERUSER_PASSWORD` to a strong password before startup. The legacy value `langflow` is not allowed.
311+
307312
To override these values, edit `docker/dev.docker-compose.yml` directly.
308313

309314
`docker/dev.docker-compose.yml` uses literal values in its `environment:` block, such as `- LANGFLOW_SUPERUSER=langflow`. Docker Compose v2 gives `environment:` block literal values higher precedence than shell-exported variables and `env_file:`, so neither `export LANGFLOW_SUPERUSER=myadmin` or a `.env` file will override them. Edit the file directly instead.
@@ -379,35 +384,18 @@ Set the custom image in your compose file or `docker run`, and then pull and res
379384

380385
For a minimal Dockerfile that adds `uv` to the 1.8.0 image, see the [release notes](/release-notes) ("Docker image no longer includes uv or uvx").
381386

382-
## Docker image security defaults {#docker-image-security-defaults}
387+
## Docker image defaults {#docker-image-security-defaults}
383388

384-
As of Langflow 1.11.x, official Langflow Docker images set `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` at image build time, and include stricter defaults for the following environment variables:
389+
As of Langflow 1.11.x, official Langflow Docker images set `LANGFLOW_AUTO_LOGIN=false` at image build time.
390+
The Langflow application default for non-Docker installs remains `true`.
385391

386-
| Variable | Image value | Application default (pip / local) |
387-
|----------|-------------|-----------------------------------|
388-
| `LANGFLOW_AUTO_LOGIN` | `false` | `true` |
389-
| `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` | `false` | `true` |
390-
| `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` | `true` | `false` |
391-
| `LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS` | `true` | `false` |
392-
| `LANGFLOW_MCP_SERVER_DOCKER_HARDENING` | `true` (main `langflowai/langflow` image only) | `false` |
393-
394-
These image values match the [component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening) recommendation.
395-
They apply whether you use `docker run`, Docker Compose, or Kubernetes with the published image, unless you override them.
396-
397-
The image sets `LANGFLOW_AUTO_LOGIN=false`, so you must set `LANGFLOW_SUPERUSER_PASSWORD` (and optionally, `LANGFLOW_SUPERUSER`) unless you explicitly set `LANGFLOW_AUTO_LOGIN=true`.
398-
399-
To disable the stricter defaults and use custom components, built-in code-execution components, or absolute local file paths, override the image defaults:
392+
Because auto-login is disabled, you must set `LANGFLOW_SUPERUSER_PASSWORD` (and optionally `LANGFLOW_SUPERUSER`) unless you explicitly set `LANGFLOW_AUTO_LOGIN=true`.
400393

401394
```bash
402395
docker run -p 7860:7860 \
403396
-e LANGFLOW_AUTO_LOGIN=true \
404-
-e LANGFLOW_ALLOW_CUSTOM_COMPONENTS=true \
405-
-e LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=false \
406-
-e LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS=false \
407-
-e LANGFLOW_MCP_SERVER_DOCKER_HARDENING=false \
397+
-e LANGFLOW_SUPERUSER_PASSWORD=<SUPERUSER_PASSWORD> \
408398
langflowai/langflow:latest
409399
```
410400

411-
In Docker Compose, add the same keys under `services.langflow.environment`.
412-
413401
For more information, see [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening) and [Block custom components](/deployment-block-custom-components).

docs/docs/Develop/api-keys-and-authentication.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ All users share the same visual editor environment without password protection,
167167
API requests still require a Langflow API key unless you also set [`LANGFLOW_SKIP_AUTH_AUTO_LOGIN`](#langflow-skip-auth-auto-login) to `true`.
168168

169169
The Langflow application default is `True`.
170-
Official Langflow Docker images set `false`. For more information, see [Docker image security defaults](/deployment-docker#docker-image-security-defaults).
170+
Official Langflow Docker images set `false`. For more information, see [Docker image defaults](/deployment-docker#docker-image-security-defaults).
171171

172172
#### LANGFLOW_SKIP_AUTH_AUTO_LOGIN {#langflow-skip-auth-auto-login}
173173

@@ -494,7 +494,7 @@ In a shared server where users you do not fully trust can build flows, set `LANG
494494

495495
Use these variables when users who can build or run flows on your server should not get host-level code execution, arbitrary file reads, or MCP mounts.
496496

497-
As of Langflow 1.11.x, Langflow application defaults remain permissive for trusted single-user installations, while official Docker images enable the hardened values. For more information, see [Docker image security defaults](/deployment-docker#docker-image-security-defaults).
497+
For more information, see [Docker image defaults](/deployment-docker#docker-image-security-defaults).
498498

499499
| Variable | Format | Default | Description |
500500
|----------|--------|---------|-------------|
@@ -747,7 +747,7 @@ This configuration is recommended for any deployment where Langflow is exposed t
747747
:::tip Docker images
748748
Official Langflow Docker images already set `LANGFLOW_AUTO_LOGIN=false`.
749749
You still must set `LANGFLOW_SUPERUSER_PASSWORD` (and optionally `LANGFLOW_SUPERUSER`) before the container can start.
750-
For more information, see [Docker image security defaults](/deployment-docker#docker-image-security-defaults).
750+
For more information, see [Docker image defaults](/deployment-docker#docker-image-security-defaults).
751751
:::
752752

753753
With authentication enabled, all users must sign in to the visual editor with valid credentials, and API requests require authentication with a Langflow API key.

docs/docs/Develop/authorization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ Page size is capped at 200 rows.
158158
- [Authentication and authorization overview](./authentication-overview)
159159
- [API keys and authentication](/api-keys-and-authentication)
160160
- [External authentication](./external-authentication)
161-
- [JWT authentication](/jwt-authentication)
161+
- [JWT authentication](/api-keys-and-authentication#configure-jwt-token-signing)
162162
- [Security](/security)

docs/docs/Develop/concepts-file-management.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ To enable file input in your flow, do the following:
6161

6262
1. Add a [**Read File** component](/read-file) to your flow.
6363

64-
2. Click **Share**, select **API access**, and then click **Input Schema** to add [`tweaks`](/concepts-publish#input-schema) to the request payload in the flow's automatically generated code snippets.
64+
2. Select the **Read File** component, click **Parameters**, and then click **API** on the **Files** (path) field to expose it as a [`tweak`](/concepts-publish#input-schema).
6565

66-
3. Expand the **File** section, find the **Files** row, and then enable **Expose Input** to allow the parameter to be set at runtime through the Langflow API.
67-
68-
4. Close the **Input Schema** pane to return to the **API access** pane.
69-
The payload in each code snippet now includes `tweaks` with your **Read File** component's ID and the `path` key that you enabled in **Input Schema**:
66+
3. Open **Share** > **API access**.
67+
The payload in each code snippet now includes `tweaks` with your **Read File** component's ID and the `path` key:
7068

7169
```json
7270
"tweaks": {
@@ -76,7 +74,7 @@ The payload in each code snippet now includes `tweaks` with your **Read File** c
7674
}
7775
```
7876

79-
5. When you run this flow programmatically, your script must upload a file to Langflow file management, and then pass the returned `file_path` to the `path` tweak in the `/run` request:
77+
4. When you run this flow programmatically, your script must upload a file to Langflow file management, and then pass the returned `file_path` to the `path` tweak in the `/run` request:
8078

8179
```json
8280
"tweaks": {

0 commit comments

Comments
 (0)