47 model prices
  1. Home
  2. Releases
  3. Dify
  4. 1.18.0

Dify 1.18.0 release notes

Dify 1.18.0 was released on October 23, 2026. The latest version is 1.20.0.

· 79 listed changes

Release notes

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)

[Agent Output Routes with Resolve directly and Escalate to team branches]

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 Import App dialog with a portable-workflow.ifpkg package selected]

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)

[Nested Workflow Tool trace showing successful Start, Template, and End steps]

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

  1. 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.
  2. 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. (#43833)
  3. 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. (#40277)
  4. 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. (#44152)
  5. 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.
  6. 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.
  7. 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
Detailed changes
New features · complete capabilities and availability

Agent Knowledge Base and KnowledgeFS

Portable App Packages

Nested Workflow Tools and Trace Drilldown

Agent Output Routes and Streaming

Build and Manage Apps with OpenAPI and difyctl

Edit Agent Prompts from the Sandbox

Agent Execution Tracing

OpenShell Sandbox Backend and E2B Usage Collection

Cloud Access Controls, Templates, and Archive Management

Improvements · performance, navigation, accessibility, and operations Security enhancements Bug fixes · workflows, Agents, Knowledge, APIs, and the web app

Workflow and Scheduling

Agents and Skills

Knowledge and Retrieval

APIs, MCP, and SDKs

Web App and Workspace

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.
E2B usage API: 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.
OpenShell 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.
Package bounds 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.
KnowledgeFS 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

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.

Full Changelog: https://github.com/langgenius/dify/compare/1.17.1...1.18.0

Source: GitHub release 1.18.0

Newer: 1.19.0Older: 1.17.1Dify