Skip to content

Commit b69b44a

Browse files
authored
Merge branch 'release-1.12.0' into workflow-api-prod
2 parents ab0fcd7 + 84cbcb8 commit b69b44a

234 files changed

Lines changed: 10232 additions & 1407 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.

.secrets.baseline

Lines changed: 224 additions & 118 deletions
Large diffs are not rendered by default.

docker/build_and_push.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
201201
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
202202

203203
RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data \
204-
&& mkdir -p /app/langflow \
205-
&& chown -R 1000:0 /app/langflow \
206-
&& chmod -R g+rwX /app/langflow
204+
&& mkdir -p /app/data /app/langflow \
205+
&& chown -R 1000:0 /app/data /app/langflow \
206+
&& chmod -R g+rwX /app/data /app/langflow
207207

208208
# Give uid 1000 a writable npm cache. The image ships Node so users can spawn
209209
# stdio MCP servers via npx, while the UBI HOME is not owned by that uid.
@@ -217,6 +217,7 @@ LABEL org.opencontainers.image.authors=['Langflow'] \
217217
org.opencontainers.image.source=https://github.com/langflow-ai/langflow
218218

219219
ENV PATH="/app/.venv/bin:$PATH" \
220+
HOME=/app/data \
220221
BASH_ENV="" \
221222
ENV="" \
222223
PROMPT_COMMAND="" \

docker/build_and_push_backend.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ RUN useradd --uid 1000 --gid 0 --no-create-home --home-dir /app/data user
8686
# Copy only the virtual environment
8787
COPY --from=builder --chown=1000:0 /app/.venv /app/.venv
8888
ENV PATH="/app/.venv/bin:$PATH"
89+
ENV HOME=/app/data
8990
ENV BASH_ENV="" \
9091
ENV="" \
9192
PROMPT_COMMAND=""
@@ -101,7 +102,7 @@ ENV BASH_ENV="" \
101102
# Note: .venv is already owned by 1000:0 via COPY --chown above, so no recursive chown needed
102103
RUN mkdir -p /app/data /app/langflow \
103104
&& chown -R 1000:0 /app/data /app/langflow \
104-
&& chmod -R g+rwX /app/langflow \
105+
&& chmod -R g+rwX /app/data /app/langflow \
105106
&& chown 1000:0 /app
106107

107108
LABEL org.opencontainers.image.title=langflow-backend

docker/build_and_push_ep.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data
130130

131131
COPY --from=builder --chown=1000 /app/.venv /app/.venv
132132
ENV PATH="/app/.venv/bin:$PATH"
133+
ENV HOME=/app/data
133134
ENV BASH_ENV="" \
134135
ENV="" \
135136
PROMPT_COMMAND=""
@@ -141,7 +142,9 @@ ENV BASH_ENV="" \
141142
# write secret_key, profile_pictures, etc. Without this, the volume is created
142143
# as root:root and Langflow crashes during startup with PermissionError on
143144
# /app/langflow/secret_key. See https://github.com/langflow-ai/langflow/issues/10437
144-
RUN mkdir -p /app/langflow && chown -R 1000:0 /app/langflow && chmod -R g+rwX /app/langflow
145+
RUN mkdir -p /app/data /app/langflow \
146+
&& chown -R 1000:0 /app/data /app/langflow \
147+
&& chmod -R g+rwX /app/data /app/langflow
145148

146149
LABEL org.opencontainers.image.title=langflow
147150
LABEL org.opencontainers.image.authors=['Langflow']

docs/docs/Components/policies.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When `enabled` is `true`, you must supply at least one policy before generating
1515
Generated guard code is written under `tmp_toolguard/{user}/{flow}/{component}/{project}/`, with **Step 1** producing guard specifications from policies in `Step_1/`, and **Step 2** turning those specifications into executable guard code in `Step_2/`.
1616
These namespaces prevent different users, flows, or Policies components with the same project name from sharing generated guards.
1717
When no flow context is available, the component uses the stable `standalone` flow namespace; when no user is available, it uses `anonymous`.
18-
If you switch to **Guard** (apply cached guards), the project directory must already contain valid generated guard code. The component handles module caching and cleanup automatically.
18+
The generated code is also stored in the Policies node. After switching to **Guard**, the component loads that stored code, so the local `tmp_toolguard` directory is not required. If the node does not contain complete generated code, run **Generate** again. The component handles module caching and cleanup automatically.
1919

2020
For more information, see the [ToolGuard GitHub repository](https://github.com/AgentToolkit/toolguard).
2121

@@ -24,7 +24,7 @@ For more information, see the [ToolGuard GitHub repository](https://github.com/A
2424
| Name | Type | Description |
2525
|------|------|-------------|
2626
| enabled | Boolean | Input parameter. If `true`, ToolGuard runs before tool execution; if `false`, policy validation is skipped. |
27-
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads existing guards from the project folder. |
27+
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads generated guards stored in the flow. |
2828
| project | String | Input parameter. Project namespace for generated code under `tmp_toolguard/{user}/{flow}/{component}/` (default `my_project`). |
2929
| in_tools | List[Tool] | Input parameter. Tools the agent can use; they are wrapped with policy guards when enabled. |
3030
| policies | List[String] | Input parameter. One or more clear, self-contained business policy strings. Required when generating guards. |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To block custom component creation on a Langflow server, set the following [envi
1212
LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false
1313
```
1414

15-
When set to `false`, Langflow blocks creating custom components and changing code in the visual editor.
15+
When set to `false`, Langflow blocks creating custom components, changing code in the visual editor, and running [registered built-in code-execution components](/api-keys-and-authentication#multi-tenant-component-hardening).
1616

1717
When unset or `true`, Langflow allows custom code.
1818
Existing installations keep the default `true` behavior until you opt in to this restriction.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ For more information, see [Docker image defaults](/deployment-docker#docker-imag
507507

508508
Enable these flags when untrusted users can build flows on this server.
509509

510-
The `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` and `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` flags are _complementary_.
511-
`LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` blocks user-authored component code, but built-in code-execution components still pass that check because their class code is trusted. Set `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true` to block those built-in components as well.
510+
The `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` and `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` flags support two deployment modes.
511+
`LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` blocks user-authored component code and registered built-in code-execution components at runtime. Set `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true` independently when custom components should remain enabled but built-in code execution should be disabled.
512512

513513
To enable these flags, set the following:
514514

515-
* `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`: blocks user-authored component code. See [Block custom components](/deployment-block-custom-components).
515+
* `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`: blocks user-authored component code and registered built-in code-execution components. See [Block custom components](/deployment-block-custom-components).
516516
* `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true`: blocks built-in code-execution components.
517517
* `LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS=true`: confines built-in file access to the upload sandbox.
518518
* `LANGFLOW_MCP_SERVER_DOCKER_HARDENING=true`: tightens Docker MCP server arguments.

docs/docs/Develop/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ See [Telemetry](/contributing-telemetry).
446446
| `LANGFLOW_BUNDLE_URLS` | List[String] | `[]` | A list of URLs from which to load custom bundles. Supports GitHub URLs. If `LANGFLOW_AUTO_LOGIN=True`, flows from these bundles are loaded into the database. |
447447
| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to a directory containing custom components. Typically used if you have local custom components or you are building a Docker image with custom components. |
448448
| `LANGFLOW_COMPONENTS_INDEX_PATH` | String | Not set | File path or URL (`http://` or `https://`) to a prebuilt component index JSON file used to populate built-in components in the visual editor. When not set, Langflow uses the included index. Useful for supplying a curated component index, for example in airgapped deployments. For more information, see [Block custom components](/deployment-block-custom-components). |
449-
| `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` | Boolean | `True` | If `false`, disables custom components and in-editor editing of component code. This feature is in beta. For more information, see [Block custom components](/deployment-block-custom-components) and [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
449+
| `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` | Boolean | `True` | If `false`, disables custom components, in-editor editing of component code, and registered built-in code-execution components at runtime. This feature is in beta. For more information, see [Block custom components](/deployment-block-custom-components) and [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
450450
| `LANGFLOW_ALLOW_COMPONENTS_PATHS_OVERRIDE` | Boolean | `True` | When `false` alongside `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`, components contributed by `LANGFLOW_COMPONENTS_PATH` and `LANGFLOW_COMPONENTS_INDEX_PATH` no longer bypass the block. Has no effect when `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=true`. For more information, see [Block custom components](/deployment-block-custom-components). |
451451
| `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` | Boolean | `False` | If `true`, blocks built-in code-execution components (Python Interpreter, REPL/Code tools, Smart Transform, and code-running agents). See [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
452452
| `LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS` | Boolean | `False` | If `true`, confines built-in file components to the upload storage directory and blocks local-file SQL dialects and local Git clones. See [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |

docs/docs/Support/release-notes.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,13 @@ If Langflow fails to start with a `get_body_field` error after installing versio
170170

171171
For more information, see [Docker image defaults](/deployment-docker#docker-image-security-defaults).
172172

173-
- Long-tail component bundles are now opt-in
173+
- Docker runtime home moved to `/app/data`
174+
175+
Patched 1.11 Docker images set `HOME=/app/data` so the non-root runtime user has a writable home directory.
176+
When `LANGFLOW_CONFIG_DIR` isn't set, the default config directory therefore changes from `/opt/app-root/src/.cache/langflow` to `/app/data/.cache/langflow`; SQLite follows that directory when `LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true`.
177+
Persist `/app/data` or set `LANGFLOW_CONFIG_DIR` to your existing writable data directory before upgrading to preserve existing data.
178+
179+
- Long-tail component bundles are now opt-in
174180

175181
Starting in Langflow 1.11.x, `pip install langflow` no longer installs the long-tail providers in the `lfx-bundles` metapackage.
176182
If an existing flow uses components such as Chroma, Ollama, Qdrant, Redis, PGVector, Tavily, Wikipedia, MongoDB, Weaviate, or Milvus, install the metapackage in the same environment after upgrading:

docs/versioned_docs/version-1.11.0/Components/policies.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ slug: /policies
55

66
The **Policies** component leverages [ToolGuard](https://github.com/AgentToolkit/toolguard) to automatically generate guard code that validates tool execution against defined business policies.
77

8-
With this component, developers define business policies in natural language and integrate policy enforcement into agent workflows. It automatically generates validation code for tools from those policies, protects tool execution by enforcing policy compliance at runtime, and caches generated guard code for better performance.
8+
With this component, developers define business policies in natural language and integrate policy enforcement into agent workflows. It automatically generates validation code for tools from those policies, protects tool execution by enforcing policy compliance at runtime, and stores generated guard code in the flow for reuse.
99

1010
The component supports **Generate** activity, which runs ToolGuard’s buildtime flow to produce new guard code from policies, and **Guard** activity, which reuses previously generated guard code for faster runs.
1111

1212
## Use the component in a flow
1313

1414
When `enabled` is `true`, you must supply at least one policy before generating guards.
1515
Generated guard code is written under `tmp_toolguard/{project_name}/`, with **Step 1** producing guard specifications from policies in `Step_1/`, and **Step 2** turning those specifications into executable guard code in `Step_2/`.
16-
If you switch to **Guard** (apply cached guards), the project directory must already contain valid generated guard code. The component handles module caching and cleanup automatically.
16+
The generated code is also stored in the Policies node. After switching to **Guard**, the component loads that stored code, so the local `tmp_toolguard` directory is not required. If the node does not contain complete generated code, run **Generate** again.
1717

1818
For more information, see the [ToolGuard GitHub repository](https://github.com/AgentToolkit/toolguard).
1919

@@ -22,11 +22,10 @@ For more information, see the [ToolGuard GitHub repository](https://github.com/A
2222
| Name | Type | Description |
2323
|------|------|-------------|
2424
| enabled | Boolean | Input parameter. If `true`, ToolGuard runs before tool execution; if `false`, policy validation is skipped. |
25-
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads existing guards from the project folder. |
25+
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads generated guards stored in the flow. |
2626
| project | String | Input parameter. Folder name for generated code under `tmp_toolguard/` (default `my_project`). |
2727
| in_tools | List[Tool] | Input parameter. Tools the agent can use; they are wrapped with policy guards when enabled. |
2828
| policies | List[String] | Input parameter. One or more clear, self-contained business policy strings. Required when generating guards. |
2929
| model | Model | Input parameter. LLM used for Policies buildtime; Anthropic Claude Sonnet is recommended. Required when generating guards. |
3030
| api_key | String | Input parameter. Model provider API key (advanced). Required when generating guards. |
3131
| guarded_tools | List[Tool] | Output parameter. Tools with policy enforcement applied. Returns the original tools when the component is disabled. |
32-

0 commit comments

Comments
 (0)