You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dify 1.18.0 brings Agents that route workflows, portable app packages, deeper visibility into nested workflow runs, and the opt-in Agent Knowledge Base experience. OpenAPI and the new difyctl expand how you build and manage apps from the command line.
Important
Read the upgrade guide below before deploying. Upgrade the API, workers, Agent Backend, and Agent runtime images together. Local Agent sandboxes require a non-empty authentication token, and Agent Backend uses a new run protocol. Source installations require Python 3.13. Install the new difyctl client and sign in again. Preserve your existing PASSWORD_PEPPER configuration.
Release highlights
Agents that choose the next step
Let an Agent decide which workflow branch to take. Enable Output Routes, give each route a selection condition, and connect it to the next step—such as resolving a request directly or handing it to a specialist. The read-only switch output exposes the chosen route. (#42599)
Output Routes configuration with two branches in the workflow editor.
Plain Agent v2 nodes also stream text as it is generated. Structured results, routed results, and nodes using default-value error handling remain buffered. (#43986)
Portable apps in one package
Move an app with its supported resources in a single .ifpkg package. Workflow and Chatflow packages carry inline Agents, Skills, and their files; imports recreate those resources in the destination workspace and remap references. File and URL imports support both packages and YAML, and explicit YAML export remains available. (#42066, #42579, #42626, #42863)
Studio's .ifpkg import preview.
See inside nested workflow runs
Open a Workflow Tool invocation from the run history and inspect the child workflow's individual steps. Nested tools now run as child graphs with coordinated pause, resume, stop, and file outputs. Access checks protect the source app's details. (#40277, #42819, #42820, #42821, #42822)
Trace drilldown into a successful Workflow Tool invocation.
Nested usage and step totals can still be approximate, particularly after a pause or stop. Console drilldown and external trace export have different scopes; see the full feature details below.
Agent Knowledge Base · Beta
Create a knowledge space for your agents, add files or connect sources, and inspect document processing, metadata, retrieval traces, and quality evaluations in one place. The new Knowledge Retrieval node and Agent integrations share access-controlled KnowledgeFS spaces. Classic Knowledge remains available. This is an opt-in integration with a separate service and database; see the deployment requirements below. (#44165)
Will soon be available on cloud.dify.ai
Developer spotlight
Build and manage apps with OpenAPI and difyctl. The CLI discovers commands from the server's operation catalog, with searchable help and support for Workflow and Chatflow creation, DSL import/export, settings, environment variables, publishing, and version restoration. Draft hashes protect concurrent edits. (#42487, #42608, #43067)
Install the bundled skill for agents building Dify apps:
difyctl install skills <dir>
The new client requires a fresh sign-in; see the deployment instructions below. (#43819)
Upgrade guide
Compatibility and Rollout
Back up first. Retain the database, vector-store data, uploaded files, Agent snapshot/workspace storage, and all deployment secrets and env files. Use a maintenance window for a single-stack upgrade.
Upgrade the Agent components together./runs now accepts composition v2 and rejects v1 requests. Existing session snapshots are converted on read and saved as v2; old runtimes cannot read newly saved v2 snapshots. Direct Agent Backend integrations must update their request format. The old Agent-specific AskHuman tool and deferred resume path are removed: historical Agent forms no longer resume execution, while shared Workflow Human Input nodes remain supported. (refactor(agent): replace Agenton with native Pydantic AI modules #43833)
Retire old workflow consumers before admitting new-version traffic. Let in-flight runs finish, then replace legacy workers/resume consumers so they cannot process the shared queue without the new cancellation guards. Legacy paused task IDs can be recovered from valid saved invocation snapshots within the existing access scope; missing or invalid snapshots require separate recovery. Nested usage totals retain the limitation noted above. (refactor(workflow): adopt Graphon 0.8 execution orchestration #40277)
Configure the Local sandbox token before restart. Supply a high-entropy secret through the shared Compose interpolation source. The 1.17.1 runtime image does not support the new --require-auth-token flag; deploy the matching 1.18.0 Agent Backend and Local sandbox images. (fix(agent): fail closed on Landlock errors and require local tokens #44152)
Preserve password hashing configuration. Existing installations without a pepper should leave PASSWORD_PEPPER empty. Setting a new pepper during the upgrade is not a transparent migration and requires an explicit password-reset plan. Keep any configured pepper unchanged across all instances and restore it with the database.
Review the proxy boundary. Bundled Nginx replaces X-Forwarded-For with its resolved client address, and Compose enables forwarded-header handling. Keep direct API access restricted to trusted callers. If a load balancer or Cloudflare sits before Nginx, configure trusted real-IP handling there; otherwise visitors may share the proxy’s rate-limit bucket. See client IP and trusted proxies.
Enable KnowledgeFS deliberately. Default Compose installations keep it off; local Community Edition development requires the explicit Community development opt-in. Configure its separate database and migrations, Capability v2 public verifier, Dify signing keys, model profile (embedding, reasoning, and rerank), and Workspace cutover gates before enabling traffic. The optional service must pass /ready, not only /health. Standard Dify API images do not contain the separate KnowledgeFS engine used by the optional engine-worker profile; the published default KnowledgeFS API image is currently amd64 only. Follow the KnowledgeFS deployment and recovery guide.
Deployment instructions · Docker Compose, source, and difyctl
Docker Compose
Once the 1.18.0 release images and tag are published, stop the old stack gracefully, switch to the release, merge the configuration changes above, and pull/start the new stack:
cd dify/docker
docker compose stop -t -1
git fetch --tags
git checkout 1.18.0
# Merge required configuration changes into existing env files here.
docker compose pull
docker compose up -d
Keep database migrations enabled (MIGRATION_ENABLED=true) for the API startup, or run them through your managed migration process before starting new workers. The bundled Weaviate update from 1.17.1 is a patch update within 1.39. If coming from a version that still runs Weaviate 1.27, complete the 1.17.1 staged Weaviate upgrade first.
Source Deployments
Use Python 3.13 for the API, Node.js 24.22.1 or later in the 24.x line, and pnpm 12.10.1. Refresh the locked dependencies and apply the database migrations from the repository root:
uv sync --project api --frozen
uv run --directory api flask db upgrade
pnpm install --frozen-lockfile
Rebuild the web application and restart API, worker, scheduler, and Agent services from the same release. If deploying Agent Backend separately from source, refresh its locked server dependencies as well.
difyctl
Install the matching 1.18.0 client. Its v2 implementation does not reuse v1 login state:
difyctl login --server https://your-dify.example.com
difyctl help
Update scripts to the current server-discovered command surface. The old mode-agnostic /openapi/v1/apps/{app_id}:run route is replaced by per-mode operations; use the catalog instead of hard-coded v1 routes. Refresh installed agent skills with difyctl install skills <dir>. (#42487, #42608, #43819)
Existing data that may need recovery
Published triggers: the draft-sync fix does not repair subscriptions already removed before upgrading. Rebind missing subscriptions and republish affected workflows as needed. (fix(api): preserve published triggers on draft sync #44068)
Document extraction: re-import/re-index affected content to apply extraction fixes to existing documents.
Built-in document metadata: toggling built-in fields rewrites only enabled, non-archived documents whose indexing is complete. Other legacy rows can retain the old format and need a later rewrite when eligible; this release does not include a full backfill. (fix(api): write built-in document metadata in a single format #44218)
Detailed changes
New features · complete capabilities and availability
Agent Knowledge Base and KnowledgeFS
Add the Beta knowledge-space experience with local upload preview, connected-source management, document availability and metadata, retrieval history/research, and quality evaluation. Settings control app, Agent, and Service API access. Classic Knowledge remains supported alongside it. (feat: KnowledgeFS and New Knowledge #44165)
Knowledge Retrieval v2 and Agent knowledge bindings use scoped capabilities; published Explore runs reuse published bindings without requiring ordinary viewers to reconfigure access. (feat: KnowledgeFS and New Knowledge #44165)
Classic Dataset upgrades have durable checkpoints, availability/metadata reconciliation, retry protection, and recovery through Beat. Run the dedicated upgrade worker with the documented prefork pool and task limits; apply b9d3f7a5c102 before restarting API/workers/Beat. Opting into the service does not automatically migrate all Classic datasets. (feat: KnowledgeFS and New Knowledge #44165)
Agent v2 nodes can select a workflow branch as part of completing their task. Enable Output Routes, define at least two branches and their selection conditions, and use the read-only switch output to inspect the chosen route. With routing disabled, the normal success outlet remains available. Routed nodes support stopping on error or taking a failure branch; node-level default-value handling is unavailable with routes enabled. (feat(agent): add output routes to Agent v2 #42599)
Plain Agent v2 nodes stream text as it is generated. Structured or routed results remain buffered, and nodes using default-value error handling stay buffered so the configured fallback can still replace a failed result. (feat(agent): stream Agent V2 text output in plain runs #43986)
Workspace owners can create resource access tokens bound to selected apps or knowledge bases. Tokens work with the supported Service API routes and app operations in difyctl; they do not grant workspace administration. The Settings entry is opt-in through NEXT_PUBLIC_ENABLE_ACCESS_TOKEN, which defaults to false. (feat: access token feature #42293, feat: optimize access token ui #44422)
Edit Agent Prompts from the Sandbox
dify-agent config prompt pull [--to PATH] and push [PATH|-] read or replace the raw system prompt, preserving UTF-8, whitespace, and mention markers. Empty text clears it. Only the current account’s writable build draft can be changed; later requests use the saved prompt. (feat(agent): edit config prompts through the sandbox CLI #44561)
OpenShell Sandbox Backend and E2B Usage Collection
Agent execution can use a self-hosted NVIDIA OpenShell gateway with DIFY_AGENT_RUNTIME_BACKEND=openshell. Each Binding has its own sandbox, with authenticated shell access, Home Snapshots on an operator-managed shared volume, and an optional egress allowlist. OpenShell gateway 0.0.106 or newer and a compatible runtime image are required. (feat(dify-agent): add OpenShell runtime backend #41076)
OpenShell lease release closes the connection but leaves the sandbox running. There is no automatic idle-stop or sandbox TTL; operators must manage those resources. Multi-tenant deployments require separate OpenShell workspaces and snapshot volumes per tenant. See the OpenShell deployment guide.
Optional E2B usage collection records provider execution duration and resource sizes through Celery Beat and the ops_trace queue. Collection starts from a configured activation time and does not backfill earlier executions. Both the API and Agent Backend metering flags default to off. (feat(agent): record E2B sandbox runtime usage #42554)
Cloud Access Controls, Templates, and Archive Management
Local sandbox authentication and isolation: enabled Local runtimes reject blank authentication tokens. When path isolation is enabled, a Landlock setup failure aborts the job with exit code 125 before executing user code. (fix(agent): fail closed on Landlock errors and require local tokens #44152)
Password hashing and plugin permissions: optional PASSWORD_PEPPER adds a server-side secret to account password hashes. Plugin installation defaults to workspace owners and administrators when no explicit policy is stored; existing saved policies remain in effect. Setting, changing, or removing the pepper invalidates existing password hashes. See the upgrade guidance. (ed772cfcf7)
NLTK: NLTK is updated to 3.10.4 for upstream path-handling hardening; this change alone is not a claim that every advisory is resolved. (fix(api): upgrade NLTK to 3.10.4 #44581)
Bug fixes · workflows, Agents, Knowledge, APIs, and the web app
Environment variables · required changes, optional settings, and removals
Required or Changed Behavior
Setting
Change in 1.18.0
DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN
Required and nonblank for an enabled Local runtime. For Compose, set it in docker/.env, the invoking shell, or --env-file so Agent Backend and shellctl receive the same secret. Setting it only in a service env file is insufficient.
SHELLCTL_ENABLE_PATH_ISOLATION
When enabled, Landlock errors stop execution instead of allowing the script to continue.
PASSWORD_PEPPER
New, empty by default. Leave it empty on an existing unpeppered installation to preserve logins. For deployments that use it, keep the same secret across API/worker instances and retain it with backups. In Compose, keep it in docker/envs/core-services/api.env so unrelated services do not receive it.
GRAPH_ENGINE_MAX_WORKERS
Now the fixed worker count per engine instance; default 10. The old minimum-worker and autoscaling thresholds are removed.
RESPECT_XFORWARD_HEADERS_ENABLED
Standalone API default remains false; bundled Compose explicitly enables it for API/WebSocket services behind Nginx. Settings supplied only through shared.env are overridden. Move an intentional override to docker/.env, the invoking shell, or a Compose override.
OAUTH_TTL_DAYS
Now read through application settings at startup, including api/.env. Default remains 14, with the existing 1–365 day bounds.
New Optional Settings
Area
Settings and defaults
Application Agent tracing
API: OPS_AGENT_TRACE_ENABLED=false. Agent Backend: DIFY_AGENT_APPLICATION_TRACING_ENABLED=false. Application policy and provider configuration are also required. ENABLE_APPLICATION_TRACE_RECONCILE_TASK=true controls scheduled reconciliation.
Deployment-wide trajectories
DIFY_AGENT_TRAJECTORY_ENABLED=false, DIFY_AGENT_TRAJECTORY_OTLP_TRACES_ENDPOINT, DIFY_AGENT_TRAJECTORY_OTLP_HEADERS, and DIFY_AGENT_TRAJECTORY_SERVICE_NAME; content capture defaults to off and trace context defaults to isolated.
Select DIFY_AGENT_RUNTIME_BACKEND=openshell; configure the DIFY_AGENT_OPENSHELL_* gateway, credentials, image, driver/shared-volume, shell token, and optional egress settings in the Agent service env file.
KNOWLEDGE_FS_ENABLED=false by default; configure KNOWLEDGE_FS_BASE_URL, Capability v2 signing/verification, and the lifecycle/cutover rollout gates through the dedicated API and KnowledgeFS service env files. KNOWLEDGE_FS_TIMEOUT_SECONDS=10. Do not enable traffic until the separate service is ready.
Access-token UI
NEXT_PUBLIC_ENABLE_ACCESS_TOKEN=false controls the owner-only Settings entry.
Archive storage
ARCHIVE_STORAGE_ADDRESS_STYLE=path supports path, virtual, and auto addressing for S3-compatible archive storage.
Cloud network policies
NETWORK_ACCESS_API_URL, NETWORK_ACCESS_TRUSTED_PROXY_CIDRS, WEBAPP_ACCESS_PREFLIGHT_URL, and WEBAPP_ACCESS_PREFLIGHT_PROXY_SECRET; require the corresponding trusted ingress and Cloud Gateway integration. The preflight secret is server-only.
Removed Settings and Features
GRAPH_ENGINE_MIN_WORKERS, GRAPH_ENGINE_SCALE_UP_THRESHOLD, and GRAPH_ENGINE_SCALE_DOWN_IDLE_TIME are no longer used.
The older KnowledgeFS implementation removed in chore: remove KnowledgeFS and New Knowledge from main #44163 is superseded by feat: KnowledgeFS and New Knowledge #44165. Do not reuse its KNOWLEDGE_FS_JWT_SECRET or SSE timeout configuration; the new integration uses Capability v2 signing and public verification material. KNOWLEDGE_FS_ENABLED, KNOWLEDGE_FS_BASE_URL, and KNOWLEDGE_FS_TIMEOUT_SECONDS remain supported by the new configuration.
Optional/provider-specific settings are documented in the matching files under docker/envs. Preserve existing service env files when upgrading.
Database migrations
Upgrading from 1.17.1 applies 22 schema/data migration revisions and two migration-head merges, ending at b9d3f7a5c102:
Revision
Purpose
d8e4a6b1c902
Backfill normalized email values for the additional providers without merging accounts or changing their original addresses.
e7b2a9c4d601
Add Agent sandbox usage events and execution accounting.
a8c9e2f1b704
Add resource access tokens and resource bindings.
f1d3c5b7a902
Add workflow archive deletion status.
c6f4a90d8b31
Add nullable workflow task IDs, stop intent, and the task-ID index.
a8c3e7f4b912
Add immediate caller workflow/node identifiers to nested node execution records.
a17c2980f3e6
Add durable application trace runs, invocations, and delivery batches.
f7e2c9a6d481, d6b9e2f1a407
Merge migration branches; no additional schema changes.
a4e7c2f91b30
Add independent KnowledgeFS control-plane tables.
b7f2a9d41c60
Add KnowledgeFS workspace cutover ledger and migration evidence.
c8e31b7d52a4
Add guarded cleanup, cutover evidence, and capability issuance reservations.
d4f6e8a1c305
Add durable KnowledgeFS remote freeze evidence.
e5a7c9b2d416
Add global KnowledgeFS cleanup completion evidence.
7c1e9a4b2d60
Add KnowledgeFS workspace staged uploads.
9d4e6f8a1b2c
Add KnowledgeFS space tag bindings.
4f8b2c7d9e10
Add KnowledgeFS icon background.
f3a8c1d7e920
Add KnowledgeFS legacy Dataset upgrade jobs.
e6b4a2c9d731
Limit active KnowledgeFS legacy Dataset upgrades.
9a4e7d1c2b60
Add resource_type to dataset_api_token_bindings.
b6e2c4d8f1a0
Allow namespace capability audits before a KnowledgeFS control space exists.
3edd6cd27f54
Limit active KnowledgeFS legacy Dataset upgrades on MySQL.
a8c2e6f4b901
Track KnowledgeFS upgrade document availability independently of metadata.
b9d3f7a5c102
Persist delivery and execution leases for upgrade document reconciliation.
The PostgreSQL task-ID index is created concurrently, but still scans workflow_runs and consumes I/O; adding the columns requires a brief schema lock. Existing task IDs need no global backfill. Apply the complete migration chain before starting the new workers. KnowledgeFS has a separate engine database and migration process. A downgrade that would leave KnowledgeFS-only API keys unrestricted is blocked until those keys are revoked through the API; keep backups for rollback.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Dify 1.18.0 brings Agents that route workflows, portable app packages, deeper visibility into nested workflow runs, and the opt-in Agent Knowledge Base experience. OpenAPI and the new difyctl expand how you build and manage apps from the command line.
Important
Read the upgrade guide below before deploying. Upgrade the API, workers, Agent Backend, and Agent runtime images together. Local Agent sandboxes require a non-empty authentication token, and Agent Backend uses a new run protocol. Source installations require Python 3.13. Install the new difyctl client and sign in again. Preserve your existing
PASSWORD_PEPPERconfiguration.Release highlights
Agents that choose the next step
Let an Agent decide which workflow branch to take. Enable Output Routes, give each route a selection condition, and connect it to the next step—such as resolving a request directly or handing it to a specialist. The read-only
switchoutput exposes the chosen route. (#42599)Output Routes configuration with two branches in the workflow editor.
Plain Agent v2 nodes also stream text as it is generated. Structured results, routed results, and nodes using default-value error handling remain buffered. (#43986)
Portable apps in one package
Move an app with its supported resources in a single
.ifpkgpackage. Workflow and Chatflow packages carry inline Agents, Skills, and their files; imports recreate those resources in the destination workspace and remap references. File and URL imports support both packages and YAML, and explicit YAML export remains available. (#42066, #42579, #42626, #42863)Studio's
.ifpkgimport preview.See inside nested workflow runs
Open a Workflow Tool invocation from the run history and inspect the child workflow's individual steps. Nested tools now run as child graphs with coordinated pause, resume, stop, and file outputs. Access checks protect the source app's details. (#40277, #42819, #42820, #42821, #42822)
Trace drilldown into a successful Workflow Tool invocation.
Nested usage and step totals can still be approximate, particularly after a pause or stop. Console drilldown and external trace export have different scopes; see the full feature details below.
Agent Knowledge Base · Beta
Create a knowledge space for your agents, add files or connect sources, and inspect document processing, metadata, retrieval traces, and quality evaluations in one place. The new Knowledge Retrieval node and Agent integrations share access-controlled KnowledgeFS spaces. Classic Knowledge remains available. This is an opt-in integration with a separate service and database; see the deployment requirements below. (#44165)
Will soon be available on cloud.dify.ai
Developer spotlight
Build and manage apps with OpenAPI and difyctl. The CLI discovers commands from the server's operation catalog, with searchable help and support for Workflow and Chatflow creation, DSL import/export, settings, environment variables, publishing, and version restoration. Draft hashes protect concurrent edits. (#42487, #42608, #43067)
Install the bundled skill for agents building Dify apps:
The new client requires a fresh sign-in; see the deployment instructions below. (#43819)
Upgrade guide
Compatibility and Rollout
/runsnow accepts composition v2 and rejects v1 requests. Existing session snapshots are converted on read and saved as v2; old runtimes cannot read newly saved v2 snapshots. Direct Agent Backend integrations must update their request format. The old Agent-specific AskHuman tool and deferred resume path are removed: historical Agent forms no longer resume execution, while shared Workflow Human Input nodes remain supported. (refactor(agent): replace Agenton with native Pydantic AI modules #43833)1.17.1runtime image does not support the new--require-auth-tokenflag; deploy the matching1.18.0Agent Backend and Local sandbox images. (fix(agent): fail closed on Landlock errors and require local tokens #44152)PASSWORD_PEPPERempty. Setting a new pepper during the upgrade is not a transparent migration and requires an explicit password-reset plan. Keep any configured pepper unchanged across all instances and restore it with the database.X-Forwarded-Forwith its resolved client address, and Compose enables forwarded-header handling. Keep direct API access restricted to trusted callers. If a load balancer or Cloudflare sits before Nginx, configure trusted real-IP handling there; otherwise visitors may share the proxy’s rate-limit bucket. See client IP and trusted proxies./ready, not only/health. Standard Dify API images do not contain the separate KnowledgeFS engine used by the optional engine-worker profile; the published default KnowledgeFS API image is currently amd64 only. Follow the KnowledgeFS deployment and recovery guide.Deployment instructions · Docker Compose, source, and difyctl
Docker Compose
Once the 1.18.0 release images and tag are published, stop the old stack gracefully, switch to the release, merge the configuration changes above, and pull/start the new stack:
Keep database migrations enabled (
MIGRATION_ENABLED=true) for the API startup, or run them through your managed migration process before starting new workers. The bundled Weaviate update from 1.17.1 is a patch update within 1.39. If coming from a version that still runs Weaviate 1.27, complete the 1.17.1 staged Weaviate upgrade first.Source Deployments
Use Python 3.13 for the API, Node.js 24.22.1 or later in the 24.x line, and pnpm 12.10.1. Refresh the locked dependencies and apply the database migrations from the repository root:
Rebuild the web application and restart API, worker, scheduler, and Agent services from the same release. If deploying Agent Backend separately from source, refresh its locked
serverdependencies as well.difyctl
Install the matching 1.18.0 client. Its v2 implementation does not reuse v1 login state:
difyctl login --server https://your-dify.example.com difyctl helpUpdate scripts to the current server-discovered command surface. The old mode-agnostic
/openapi/v1/apps/{app_id}:runroute is replaced by per-mode operations; use the catalog instead of hard-coded v1 routes. Refresh installed agent skills withdifyctl install skills <dir>. (#42487, #42608, #43819)Existing data that may need recovery
Detailed changes
New features · complete capabilities and availability
Agent Knowledge Base and KnowledgeFS
b9d3f7a5c102before restarting API/workers/Beat. Opting into the service does not automatically migrate all Classic datasets. (feat: KnowledgeFS and New Knowledge #44165)Portable App Packages
.ifpkg, bringing the application configuration and its supported resources into one portable package. Explicit YAML export remains available, and imports accept both formats from files or URLs. (feat(agent): add roster package export foundation #42066, feat(agent): import roster packages through App routes #42189, feat(agent): support package imports from external URLs #42425, feat(app): default exports to ifpkg across app types #42552)Nested Workflow Tools and Trace Drilldown
Agent Output Routes and Streaming
switchoutput to inspect the chosen route. With routing disabled, the normal success outlet remains available. Routed nodes support stopping on error or taking a failure branch; node-level default-value handling is unavailable with routes enabled. (feat(agent): add output routes to Agent v2 #42599)Build and Manage Apps with OpenAPI and difyctl
/openapi/v1publishes a server operation catalog. difyctl discovers commands and their input fields from that catalog, provides searchable help, and follows server-provided next steps. Workflow and Chatflow authoring now covers app creation, DSL import/export, settings, environment variables, publishing, and version restoration. Draft hashes protect imports from overwriting concurrent edits. (feat(openapi): publish the op catalog, per-mode run ops and server-built hints on /openapi/v1 #42487, feat(cli): difyctl v2 over the server catalog #42608, feat(api): let agents build, configure and ship Dify apps over openapi #43067)difyctlskill for agents building Dify apps. Install it withdifyctl install skills <dir>. Device login supports--no-waitand--resume, and folder uploads send one multipart part per file. (feat(cli): let agents build Dify apps with difyctl and an embedded skill #43819, feat(cli): send a folder as one part per file #44356)NEXT_PUBLIC_ENABLE_ACCESS_TOKEN, which defaults tofalse. (feat: access token feature #42293, feat: optimize access token ui #44422)Edit Agent Prompts from the Sandbox
dify-agent config prompt pull [--to PATH]andpush [PATH|-]read or replace the raw system prompt, preserving UTF-8, whitespace, and mention markers. Empty text clears it. Only the current account’s writable build draft can be changed; later requests use the saved prompt. (feat(agent): edit config prompts through the sandbox CLI #44561)Agent Execution Tracing
OpenShell Sandbox Backend and E2B Usage Collection
DIFY_AGENT_RUNTIME_BACKEND=openshell. Each Binding has its own sandbox, with authenticated shell access, Home Snapshots on an operator-managed shared volume, and an optional egress allowlist. OpenShell gateway 0.0.106 or newer and a compatible runtime image are required. (feat(dify-agent): add OpenShell runtime backend #41076)ops_tracequeue. Collection starts from a configured activation time and does not backfill earlier executions. Both the API and Agent Backend metering flags default to off. (feat(agent): record E2B sandbox runtime usage #42554)Cloud Access Controls, Templates, and Archive Management
Improvements · performance, navigation, accessibility, and operations
az-AZ) joins the supported UI languages, with additional translation and right-to-left layout improvements. (feat(i18n): add Azerbaijani (az-AZ) translation #42291, fix(dify-ui): complete RTL styling for directional controls #43808)Security enhancements
125before executing user code. (fix(agent): fail closed on Landlock errors and require local tokens #44152)PASSWORD_PEPPERadds a server-side secret to account password hashes. Plugin installation defaults to workspace owners and administrators when no explicit policy is stored; existing saved policies remain in effect. Setting, changing, or removing the pepper invalidates existing password hashes. See the upgrade guidance. (ed772cfcf7)1.39.2to1.39.13, alongside Next.js and other dependency security updates. The Weaviate change stays within the 1.39 series; the staged minor-version migration described for 1.17.1 still matters when upgrading from older installations. (chore(weaviate): bump bundled Weaviate to 1.39.13 (CVE-2026-111943) #44508, fix(deps): upgrade Next.js to 16.4.1 for October security fixes #44127, fix(deps): override fflate to 0.7.5 for CVE-2026-45820 #44148, fix(deps): upgrade certifi and pillow #44524)2026.10.19; rebuild Agent images to consume the updated trust bundle. (chore(deps): bump certifi from 2026.4.22 to 2026.10.19 in /dify-agent #44462)Bug fixes · workflows, Agents, Knowledge, APIs, and the web app
Workflow and Scheduling
{{inputs}}text in user code. (fix(workflow): preserve LLM prompts and model changes in collaboration #42124, fix(workflow): sync imported graph with collaboration state #42817, fix(web): keep the value selector of a Code node input when regenerating code #44075, fix(web): parse destructured and multi-line main signatures in Code node #44046, fix(web): parse Python Code node parameters with commas #44337, fix(code-executor): preserve{{inputs}}literals in user code (substitute placeholder before code insertion) #43438)Agents and Skills
Knowledge and Retrieval
APIs, MCP, and SDKs
has_morefrom the page size actually served, and message pagination preserves records with tied timestamps. MySQL-specific datasource credential and installed-app ordering issues are corrected. (fix(api): compute annotation list has_more with the effective page size #41876, fix(api): report has_more from the page the query served #42323, fix(api): report Service API knowledge list has_more from the page the query served #42531, fix(api): preserve timestamp ties in message pagination #44023, fix(api): compare datasource credentials as JSON on MySQL #44039, fix(api): sort installed apps without NULLS LAST for MySQL #44029)2025-11-25. (fix(mcp): collect all tool discovery pages #43842, fix: don't stringify list values for union-typed MCP tool parameters #44182, fix(api): close failed SSE connection before MCP fallback #42761, fix(api): return protocol errors for unsupported MCP requests #44197, fix(api): accept MCP protocol version 2025-11-25 #44066)Web App and Workspace
Environment variables · required changes, optional settings, and removals
Required or Changed Behavior
DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKENdocker/.env, the invoking shell, or--env-fileso Agent Backend and shellctl receive the same secret. Setting it only in a service env file is insufficient.SHELLCTL_ENABLE_PATH_ISOLATIONPASSWORD_PEPPERdocker/envs/core-services/api.envso unrelated services do not receive it.GRAPH_ENGINE_MAX_WORKERS10. The old minimum-worker and autoscaling thresholds are removed.RESPECT_XFORWARD_HEADERS_ENABLEDfalse; bundled Compose explicitly enables it for API/WebSocket services behind Nginx. Settings supplied only throughshared.envare overridden. Move an intentional override todocker/.env, the invoking shell, or a Compose override.OAUTH_TTL_DAYSapi/.env. Default remains14, with the existing 1–365 day bounds.New Optional Settings
OPS_AGENT_TRACE_ENABLED=false. Agent Backend:DIFY_AGENT_APPLICATION_TRACING_ENABLED=false. Application policy and provider configuration are also required.ENABLE_APPLICATION_TRACE_RECONCILE_TASK=truecontrols scheduled reconciliation.DIFY_AGENT_TRAJECTORY_ENABLED=false,DIFY_AGENT_TRAJECTORY_OTLP_TRACES_ENDPOINT,DIFY_AGENT_TRAJECTORY_OTLP_HEADERS, andDIFY_AGENT_TRAJECTORY_SERVICE_NAME; content capture defaults to off and trace context defaults toisolated.AGENT_SANDBOX_METERING_ENABLED=false,AGENT_SANDBOX_METERING_PROJECT_ID,AGENT_SANDBOX_METERING_START_AT,AGENT_SANDBOX_METERING_INTERVAL_SECONDS=60. Backend:DIFY_AGENT_SANDBOX_METERING_ENABLED=false,DIFY_AGENT_E2B_PROJECT_ID, plus overlap/full-scan/page limits.DIFY_AGENT_RUNTIME_BACKEND=openshell; configure theDIFY_AGENT_OPENSHELL_*gateway, credentials, image, driver/shared-volume, shell token, and optional egress settings in the Agent service env file.SKILL_PACKAGE_MAX_UNCOMPRESSED_BYTES=209715200,SKILL_PACKAGE_MAX_ENTRIES=5000,SKILL_PACKAGE_MAX_SKILL_MD_BYTES=1048576;AGENT_PACKAGE_MAX_BYTES=536870912,AGENT_PACKAGE_MAX_MANIFEST_BYTES=5242880,AGENT_PACKAGE_MAX_ENTRIES=5000. Ordinary app packages retain the 10 MiB DSL limit.KNOWLEDGE_FS_ENABLED=falseby default; configureKNOWLEDGE_FS_BASE_URL, Capability v2 signing/verification, and the lifecycle/cutover rollout gates through the dedicated API and KnowledgeFS service env files.KNOWLEDGE_FS_TIMEOUT_SECONDS=10. Do not enable traffic until the separate service is ready.NEXT_PUBLIC_ENABLE_ACCESS_TOKEN=falsecontrols the owner-only Settings entry.ARCHIVE_STORAGE_ADDRESS_STYLE=pathsupportspath,virtual, andautoaddressing for S3-compatible archive storage.NETWORK_ACCESS_API_URL,NETWORK_ACCESS_TRUSTED_PROXY_CIDRS,WEBAPP_ACCESS_PREFLIGHT_URL, andWEBAPP_ACCESS_PREFLIGHT_PROXY_SECRET; require the corresponding trusted ingress and Cloud Gateway integration. The preflight secret is server-only.Removed Settings and Features
GRAPH_ENGINE_MIN_WORKERS,GRAPH_ENGINE_SCALE_UP_THRESHOLD, andGRAPH_ENGINE_SCALE_DOWN_IDLE_TIMEare no longer used.KNOWLEDGE_FS_JWT_SECRETor SSE timeout configuration; the new integration uses Capability v2 signing and public verification material.KNOWLEDGE_FS_ENABLED,KNOWLEDGE_FS_BASE_URL, andKNOWLEDGE_FS_TIMEOUT_SECONDSremain supported by the new configuration.GET /console/api/apps/{app_id}/feedbacks/export, is removed. Update integrations that called it directly. (chore: remove console feedback export endpoint #43751)UV_CACHE_DIRno longer has a baked-in shared default. Keep any deliberate plugin-daemon cache override explicit. (fix: wire UV_CACHE_DIR for plugin_daemon (Fixes #42433) #42481)Optional/provider-specific settings are documented in the matching files under docker/envs. Preserve existing service env files when upgrading.
Database migrations
Upgrading from 1.17.1 applies 22 schema/data migration revisions and two migration-head merges, ending at
b9d3f7a5c102:d8e4a6b1c902e7b2a9c4d601a8c9e2f1b704f1d3c5b7a902c6f4a90d8b31a8c3e7f4b912a17c2980f3e6f7e2c9a6d481,d6b9e2f1a407a4e7c2f91b30b7f2a9d41c60c8e31b7d52a4d4f6e8a1c305e5a7c9b2d4167c1e9a4b2d609d4e6f8a1b2c4f8b2c7d9e10f3a8c1d7e920e6b4a2c9d7319a4e7d1c2b60b6e2c4d8f1a03edd6cd27f54a8c2e6f4b901b9d3f7a5c102The PostgreSQL task-ID index is created concurrently, but still scans
workflow_runsand consumes I/O; adding the columns requires a brief schema lock. Existing task IDs need no global backfill. Apply the complete migration chain before starting the new workers. KnowledgeFS has a separate engine database and migration process. A downgrade that would leave KnowledgeFS-only API keys unrestricted is blocked until those keys are revoked through the API; keep backups for rollback.Full Changelog: 1.17.1...1.18.0
This discussion was created from the release v1.18.0 — Smarter Agent Routing, Portable Apps, Deeper Workflow Visibility.
All reactions