diff --git a/.claude/skills/dify-docs-guides/SKILL.md b/.claude/skills/dify-docs-guides/SKILL.md
index b0ce39503..1a1e2042b 100644
--- a/.claude/skills/dify-docs-guides/SKILL.md
+++ b/.claude/skills/dify-docs-guides/SKILL.md
@@ -76,3 +76,4 @@ In the self-host copy:
```
4. Exclude from the user guide: default values, the "why" behind each variable, deployment-specific mechanics, and variable interactions — anything the reader finds one click into the reference.
+5. Link a variable name only when it has its own heading anchor in the reference (`#var_name`). Table-row variables stay plain code — a link would land at the page or section top while promising the variable; each self-contained unit that names them (a bullet, a callout) carries its own "See [Environment Variables](…) for details." reference — placed with the variables, never as a section-level closing line.
diff --git a/.claude/skills/dify-docs-terminology-check/SKILL.md b/.claude/skills/dify-docs-terminology-check/SKILL.md
index 0cdcc9b81..5e1b931cf 100644
--- a/.claude/skills/dify-docs-terminology-check/SKILL.md
+++ b/.claude/skills/dify-docs-terminology-check/SKILL.md
@@ -55,6 +55,8 @@ Every bolded term and every heading is a candidate. Step 5 decides deterministic
The codebase i18n is the source of truth for UI labels: `web/i18n/en-US/` (flat JSON files with dot-flattened keys, e.g. `"menus.apps": "Studio"`), plus `zh-Hans/` and `ja-JP/` siblings. The glossary's `i18n Key` column maps to them: `common.menus.apps` → file `common.json`, key `"menus.apps"`.
+A key's value counts as the visible label only after checking its render site: `git grep` the key under `web/` and confirm it lands in on-screen text. Values feeding `aria-label`, tooltips, or placeholders are not the label, and shared generic keys (`common.operation.*`) often supply the visible text instead — the Skills section's add button renders `operation.add` ("Add") while `skills.add` ("Add skill") is its aria-label. A product or staging screenshot outranks any code inference.
+
For each candidate term (use the English term; for zh/ja files, take the candidate from the same position in the en sibling):
1. If the term has a `## UI Labels` row in the glossary, read its `i18n Key`; skip to substep 3 to confirm the codebase still agrees.
diff --git a/en/self-host/deploy/configuration/environments.mdx b/en/self-host/deploy/configuration/environments.mdx
index f1c11bfe2..876e84458 100644
--- a/en/self-host/deploy/configuration/environments.mdx
+++ b/en/self-host/deploy/configuration/environments.mdx
@@ -1423,7 +1423,7 @@ The remaining variables configure the bundled services or derive from your exist
| `DIFY_AGENT_REDIS_PREFIX` | `dify-agent` | Key prefix for the agent backend's Redis entries. |
| `DIFY_AGENT_SHUTDOWN_GRACE_SECONDS` | `30` | How long a stopping agent backend waits for in-flight runs to finish. |
| `DIFY_AGENT_RUN_RETENTION_SECONDS` | `259200` | How long finished run records are retained (3 days by default). |
-| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | Wall-clock deadline for one agent run's model and tool work. A run that exceeds it fails with `agent_run_limit_exceeded`. Replaces the former `AGENT_BACKEND_RUN_TIMEOUT_SECONDS`.
On the `e2b` backend the sandbox's `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS` (ceiling 3600) still applies, so values above an hour only take effect on the `local` backend. |
+| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | Wall-clock deadline for one agent run's model and tool work. A run that exceeds it fails with `agent_run_limit_exceeded`. Replaces the former `AGENT_BACKEND_RUN_TIMEOUT_SECONDS`.
The API-side `APP_MAX_EXECUTION_TIME` and `WORKFLOW_MAX_EXECUTION_TIME` (default `1200`) stop runs earlier unless raised to match.
On the `e2b` backend the sandbox's `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS` (ceiling 3600) still applies, so values above an hour only take effect on the `local` backend. |
| `AGENT_BACKEND_STREAM_READ_TIMEOUT_SECONDS` | `30` | Read timeout for one SSE connection to the agent backend. |
| `AGENT_BACKEND_STREAM_MAX_RECONNECTS` | `3` | How many times the API reconnects a dropped agent-backend stream before failing the run. |
| `DIFY_AGENT_PLUGIN_DAEMON_URL` | (empty; derives from `PLUGIN_DAEMON_URL`) | Plugin daemon address the agent backend calls tools through. |
diff --git a/en/self-host/use-dify/build/new-agent/build.mdx b/en/self-host/use-dify/build/new-agent/build.mdx
index c136b224f..e81247a4c 100644
--- a/en/self-host/use-dify/build/new-agent/build.mdx
+++ b/en/self-host/use-dify/build/new-agent/build.mdx
@@ -92,7 +92,7 @@ Size limits depend on file type; each is a default you can adjust with [environm
You can also have the agent create files and save them here in [Build mode](#build-by-chatting).
-Files the agent creates and saves are capped at 50 MB each by default, adjustable with [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/en/self-host/deploy/configuration/environments#new-agent-beta).
+Files the agent creates and saves are capped at 50 MB each by default, adjustable with `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`. See [Environment Variables](/en/self-host/deploy/configuration/environments) for details.
### Tools
@@ -114,7 +114,7 @@ Say your agent's skills all work with the same order system: one checks stock, o
Import a `.env` file to add several at once. You can also have the agent set them up in [Build mode](#build-by-chatting).
-Values stored here can surface in command output the agent reads. To mask sensitive strings from it, set [`DIFY_AGENT_SHELL_REDACT_PATTERNS`](/en/self-host/deploy/configuration/environments#new-agent-beta).
+Values stored here can surface in command output the agent reads. To mask sensitive strings from it, set `DIFY_AGENT_SHELL_REDACT_PATTERNS`. See [Environment Variables](/en/self-host/deploy/configuration/environments#new-agent-beta) for details.
## Build by Chatting
@@ -200,9 +200,11 @@ To share the agent across workspaces, export it as a DSL file. The exported file
- **Time**
- A single agent run is stopped after 1 hour by default, whichever access point it starts from (web app, service API, or a workflow), and the unfinished reply is discarded.
+ A single agent run is stopped after 20 minutes by default, whichever access point it starts from (web app, service API, or a workflow), and the unfinished reply is discarded.
- If a run gets cut off, try again or break the task into smaller steps. If your agent's tasks routinely run longer, raise [`DIFY_AGENT_RUN_TIMEOUT_SECONDS`](/en/self-host/deploy/configuration/environments#new-agent-beta).
+ If a run gets cut off, try again or break the task into smaller steps. To allow runs up to an hour, raise `APP_MAX_EXECUTION_TIME` and `WORKFLOW_MAX_EXECUTION_TIME` to `3600`; for longer runs, raise those two and `DIFY_AGENT_RUN_TIMEOUT_SECONDS` above the duration you need.
+
+ See [Environment Variables](/en/self-host/deploy/configuration/environments) for details on these variables.
- **Model requests**
@@ -214,7 +216,7 @@ To share the agent across workspaces, export it as a DSL file. The exported file
Each file the agent sends back in a reply can be up to 50 MB by default, and larger files aren't delivered.
- If your agent produces bigger artifacts, raise [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/en/self-host/deploy/configuration/environments#new-agent-beta).
+ If your agent produces bigger artifacts, raise `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`. See [Environment Variables](/en/self-host/deploy/configuration/environments) for details.
## Troubleshooting
@@ -222,7 +224,7 @@ To share the agent across workspaces, export it as a DSL file. The exported file
The deployment's `.env` predates 1.16.0, so the Agents switch is missing or still off.
- Sync it with `.env.example` (the switch is [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/en/self-host/deploy/configuration/environments#new-agent-beta)), then recreate the web container (`docker compose up -d web`) and hard-refresh the browser.
+ Sync it with `.env.example` (the switch is [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/en/self-host/deploy/configuration/environments#next_public_enable_agent_v2)), then recreate the web container (`docker compose up -d web`) and hard-refresh the browser.
In Chatflow apps the node's absence is expected: it's available in Workflow apps only.
diff --git a/en/self-host/use-dify/nodes/agent.mdx b/en/self-host/use-dify/nodes/agent.mdx
index ba370b5a3..47db561a6 100644
--- a/en/self-host/use-dify/nodes/agent.mdx
+++ b/en/self-host/use-dify/nodes/agent.mdx
@@ -189,9 +189,9 @@ description: Run an agent as a step in your workflow, reasoning and using tools
## Declare Its Outputs
- Every Agent node returns `text`, `files`, and `json` by default: everything the agent writes and produces arrives through them.
+ By default, an Agent node returns a single output, `text`: the agent's reply to its task, as one block of text. When a later step needs something more specific, like a single value or a particular file, declare it as its own output.
- Often a later step needs one specific piece of that, like a single value or a particular file. Declare it as its own output: type `/` in the **Agent task**, choose **New output**, then name it and pick a type in place. Each declared output can be referenced by downstream nodes on its own.
+ Type `/` in the **Agent task**, choose **New output**, then name it and pick a type in place. Each declared output can be referenced by downstream nodes on its own.
A declared output sits right in the task text, so you can tell the agent exactly what to put in it. For example, in this task `{{vendor_name}}` and `{{quote_file}}` are declared outputs:
@@ -199,7 +199,7 @@ description: Run an agent as a step in your workflow, reasoning and using tools
Compare the three vendor quotes in {{vendor_quotes}} and write a recommendation. Put the winning vendor's name in {{vendor_name}} and its quote PDF in {{quote_file}}.
```
- Each file the agent returns is capped at 50 MB by default, adjustable with [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/en/self-host/deploy/configuration/environments#new-agent-beta).
+ Each file the agent returns is capped at 50 MB by default, adjustable with `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`. See [Environment Variables](/en/self-host/deploy/configuration/environments#new-agent-beta) for details.
diff --git a/ja/self-host/deploy/configuration/environments.mdx b/ja/self-host/deploy/configuration/environments.mdx
index ba074e69a..bf272bafd 100644
--- a/ja/self-host/deploy/configuration/environments.mdx
+++ b/ja/self-host/deploy/configuration/environments.mdx
@@ -1415,7 +1415,7 @@ API が Agent バックエンドにアクセスするためのアドレスです
| `DIFY_AGENT_REDIS_PREFIX` | `dify-agent` | Agent バックエンドの Redis キーのプレフィックス。 |
| `DIFY_AGENT_SHUTDOWN_GRACE_SECONDS` | `30` | Agent バックエンドの停止時に、進行中の実行の完了を待つ秒数。 |
| `DIFY_AGENT_RUN_RETENTION_SECONDS` | `259200` | 終了した実行レコードの保持期間(デフォルトは 3 日)。 |
-| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | Agent 実行 1 回のモデルとツール処理に適用される制限時間。超過した実行は `agent_run_limit_exceeded` で失敗する。旧 `AGENT_BACKEND_RUN_TIMEOUT_SECONDS` を置き換える。
`e2b` バックエンドではサンドボックス側の `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS`(上限 3600)も適用されるため、1 時間を超える値が効くのは `local` バックエンドのみ。 |
+| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | Agent 実行 1 回のモデルとツール処理に適用される制限時間。超過した実行は `agent_run_limit_exceeded` で失敗する。旧 `AGENT_BACKEND_RUN_TIMEOUT_SECONDS` を置き換える。
API 側の `APP_MAX_EXECUTION_TIME` と `WORKFLOW_MAX_EXECUTION_TIME`(デフォルト `1200`)が先に実行を停止するため、合わせて引き上げること。
`e2b` バックエンドではサンドボックス側の `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS`(上限 3600)も適用されるため、1 時間を超える値が効くのは `local` バックエンドのみ。 |
| `AGENT_BACKEND_STREAM_READ_TIMEOUT_SECONDS` | `30` | Agent バックエンドへの SSE 接続 1 本あたりの読み取りタイムアウト。 |
| `AGENT_BACKEND_STREAM_MAX_RECONNECTS` | `3` | ストリーム切断時、実行を失敗と判定するまでに API が再接続を試みる回数。 |
| `DIFY_AGENT_PLUGIN_DAEMON_URL` | (空。`PLUGIN_DAEMON_URL` から導出) | Agent バックエンドがツール呼び出しに使うプラグインデーモンのアドレス。 |
diff --git a/ja/self-host/use-dify/build/new-agent/build.mdx b/ja/self-host/use-dify/build/new-agent/build.mdx
index 056b62ae0..a71f6319b 100644
--- a/ja/self-host/use-dify/build/new-agent/build.mdx
+++ b/ja/self-host/use-dify/build/new-agent/build.mdx
@@ -91,7 +91,11 @@ Dify ツールやファイルを Agent 自身の能力の一部にするには
| 動画 | 100 MB | `UPLOAD_VIDEO_FILE_SIZE_LIMIT` |
| 音声 | 50 MB | `UPLOAD_AUDIO_FILE_SIZE_LIMIT` |
-[ビルドモード](#チャットによるビルド) では、Agent にファイルを作成させ、ここに保存させることもできます。Agent が作成して保存するファイルは、デフォルトで 1 ファイルあたり最大 50 MB です。[`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) で調整できます。
+[ビルドモード](#チャットによるビルド) では、Agent にファイルを作成させ、ここに保存させることもできます。
+
+
+Agent が作成して保存するファイルは、デフォルトで 1 ファイルあたり最大 50 MB です。`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT` で調整できます。詳細は [環境変数](/ja/self-host/deploy/configuration/environments) を参照してください。
+
### ツール
@@ -111,9 +115,9 @@ Agent が [ビルドモード](#チャットによるビルド) でインスト
`.env` ファイルをインポートすれば、複数の変数を一度に追加できます。[ビルドモード](#チャットによるビルド) で Agent に設定させることもできます。
-
-ここに保存した値は、Agent が読み取るコマンド出力に現れることがあります。機密性の高い文字列をマスクするには、[`DIFY_AGENT_SHELL_REDACT_PATTERNS`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) を設定してください。
-
+
+ここに保存した値は、Agent が読み取るコマンド出力に現れることがあります。機密性の高い文字列をマスクするには、`DIFY_AGENT_SHELL_REDACT_PATTERNS` を設定してください。詳細は [環境変数](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) を参照してください。
+
## チャットによるビルド
@@ -195,17 +199,25 @@ Agent をワークスペース間で共有するには、DSL ファイルとし
### 実行の制限
-- **実行時間**:どのアクセスポイントから開始しても(Web アプリ、サービス API、ワークフロー)、1 回の実行はデフォルトで 1 時間後に停止され、未完成の返信は破棄されます。
+- **実行時間**
+
+ どのアクセスポイントから開始しても(Web アプリ、サービス API、ワークフロー)、1 回の実行はデフォルトで 20 分後に停止され、未完成の返信は破棄されます。
+
+ 実行が打ち切られた場合は、もう一度試すか、タスクを小さく分割してください。最長 1 時間まで許可するには、`APP_MAX_EXECUTION_TIME` と `WORKFLOW_MAX_EXECUTION_TIME` を `3600` に引き上げます。1 時間を超える場合は、この 2 つと `DIFY_AGENT_RUN_TIMEOUT_SECONDS` をいずれも目標の実行時間より高く設定します。
+
+ これらの変数の詳細は [環境変数](/ja/self-host/deploy/configuration/environments) を参照してください。
+
+- **モデルリクエスト数**
- 実行が打ち切られた場合は、もう一度試すか、タスクを小さく分割してください。タスクが日常的にそれ以上かかるなら、[`DIFY_AGENT_RUN_TIMEOUT_SECONDS`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) を引き上げ、`docker compose up -d` を実行して反映します。
+ Agent がモデルを呼び出すたびに、1 回の実行につき 500 回の上限を消費します。推論が重く、ツールを多く使うほど早く達します。
-- **モデルリクエスト数**:Agent がモデルを呼び出すたびに、1 回の実行につき 500 回の上限を消費します。推論が重く、ツールを多く使うほど早く達します。
+ タスクを小さく分割して、各実行を上限内に収めてみてください。
- タスクを小さく分割すれば、各実行を上限内に収められます。
+- **返信ファイル**
-- **返信ファイル**:Agent が返信で送り返すファイルは、デフォルトで 1 ファイルあたり最大 50 MB で、それを超えるファイルは届きません。
+ Agent が返信で送り返すファイルは、デフォルトで 1 ファイルあたり最大 50 MB で、それを超えるファイルは届きません。
- より大きな成果物が必要な場合は、[`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) を引き上げてください。
+ より大きな成果物が必要な場合は、`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT` を引き上げてください。詳細は [環境変数](/ja/self-host/deploy/configuration/environments) を参照してください。
## トラブルシューティング
@@ -213,7 +225,7 @@ Agent をワークスペース間で共有するには、DSL ファイルとし
デプロイの `.env` が 1.16.0 より古く、Agents のスイッチが存在しないか、オフのままになっています。
- `.env.example` と同期してください(スイッチは [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)))。その後、web コンテナを再作成(`docker compose up -d web`)し、ブラウザを強制リロードします。
+ `.env.example` と同期してください(スイッチは [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/ja/self-host/deploy/configuration/environments#next_public_enable_agent_v2))。その後、web コンテナを再作成(`docker compose up -d web`)し、ブラウザを強制リロードします。
Chatflow アプリでこのノードが見当たらないのは仕様です。新しい Agent ノードは Workflow アプリでのみ使用できます。
diff --git a/ja/self-host/use-dify/nodes/agent.mdx b/ja/self-host/use-dify/nodes/agent.mdx
index e217ff94c..a12516d4d 100644
--- a/ja/self-host/use-dify/nodes/agent.mdx
+++ b/ja/self-host/use-dify/nodes/agent.mdx
@@ -189,9 +189,9 @@ description: "ワークフローの 1 ステップとして Agent を実行し
## 出力の宣言
- すべての Agent ノードは、デフォルトで `text`、`files`、`json` を返します。Agent が書いた内容と生成物は、すべてこの 3 つに入ります。
+ Agent ノードがデフォルトで返す出力は `text` の 1 つで、タスクに対する Agent の返信がテキストとして入ります。後続のステップで、単一の値や特定のファイルなど、より具体的な内容が必要な場合は、独自の出力として宣言します。
- 後続のステップでは、その中の特定の 1 つ、たとえば単一の値や特定のファイルだけが必要になることがよくあります。その場合は独自の出力として宣言します。**Agent タスク** 内で `/` を入力して **新しい出力** を選び、その場で名前と型を指定します。宣言した各出力は、下流のノードから単独で参照できます。
+ **Agent タスク** 内で `/` を入力して **新しい出力** を選び、その場で名前と型を指定します。宣言した各出力は、下流のノードから単独で参照できます。
宣言した出力はタスク本文の中に置かれるため、何を入れるかを Agent に直接指示できます。次のタスクでは、`{{vendor_name}}` と `{{quote_file}}` が宣言した出力です。
@@ -199,7 +199,7 @@ description: "ワークフローの 1 ステップとして Agent を実行し
{{vendor_quotes}} の 3 社の見積もりを比較して、推薦をまとめてください。採用するベンダー名を {{vendor_name}} に、その見積もり PDF を {{quote_file}} に入れてください。
```
- Agent が返すファイルは、デフォルトで 1 ファイルあたり最大 50 MB です。[`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) で調整できます。
+ Agent が返すファイルは、デフォルトで 1 ファイルあたり最大 50 MB です。`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT` で調整できます。詳細は [環境変数](/ja/self-host/deploy/configuration/environments#新しい-agent(ベータ版)) を参照してください。
diff --git a/writing-guides/glossary.md b/writing-guides/glossary.md
index bb052d9ab..561b14913 100644
--- a/writing-guides/glossary.md
+++ b/writing-guides/glossary.md
@@ -175,7 +175,7 @@ Terms appear in body text exactly as written in this table. Capitalize them furt
## UI Labels
-Terms in this section must match the Dify product interface exactly. When these terms appear **bolded** in documentation, translations MUST use the corresponding UI string from the product.
+Terms in this section must match the Dify product interface exactly. When these terms appear **bolded** in documentation, translations MUST use the corresponding UI string from the product. Add a row only after confirming the key's value is the rendered label at its usage site, not an aria-label, tooltip, or placeholder.
For a label not yet in this table, resolve its exact i18n key before writing any language's form: find the key whose en-US value matches on the surface you are documenting — several keys often share one value, so trace the rendering component to disambiguate (`git grep -nF '' "$REF" -- 'web/app/**'`, `$REF` pinned per writing-guides/index.md § "Syncing the Dify codebase safely"; components often reference the key without its file prefix, so retry with the suffix — `menus.apps` for `common.menus.apps` — when there are no hits) — then take each language from that key. Never pick a translation by matching values across namespaces; a label whose key you cannot identify is unverified and must be flagged, not approximated.
diff --git a/zh/self-host/deploy/configuration/environments.mdx b/zh/self-host/deploy/configuration/environments.mdx
index 22303cceb..05336c421 100644
--- a/zh/self-host/deploy/configuration/environments.mdx
+++ b/zh/self-host/deploy/configuration/environments.mdx
@@ -1419,7 +1419,7 @@ API 访问 Agent 后端所用的地址。在 Docker Compose 中保持默认值
| `DIFY_AGENT_REDIS_PREFIX` | `dify-agent` | Agent 后端 Redis 键的前缀。 |
| `DIFY_AGENT_SHUTDOWN_GRACE_SECONDS` | `30` | Agent 后端停止时,等待进行中的运行结束的时长(秒)。 |
| `DIFY_AGENT_RUN_RETENTION_SECONDS` | `259200` | 已结束运行记录的保留时长(默认 3 天)。 |
-| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | 单次 Agent 运行中模型与工具工作的总时限,超时的运行以 `agent_run_limit_exceeded` 失败。取代原 `AGENT_BACKEND_RUN_TIMEOUT_SECONDS`。
在 `e2b` 后端下,沙箱自身的 `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS`(上限 3600)仍然生效,因此高于 1 小时的值只在 `local` 后端下有效。 |
+| `DIFY_AGENT_RUN_TIMEOUT_SECONDS` | `3600` | 单次 Agent 运行中模型与工具工作的总时限,超时的运行以 `agent_run_limit_exceeded` 失败。取代原 `AGENT_BACKEND_RUN_TIMEOUT_SECONDS`。
API 侧的 `APP_MAX_EXECUTION_TIME` 与 `WORKFLOW_MAX_EXECUTION_TIME`(默认 `1200`)会更早终止运行,需一并调高。
在 `e2b` 后端下,沙箱自身的 `DIFY_AGENT_E2B_ACTIVE_TIMEOUT_SECONDS`(上限 3600)仍然生效,因此高于 1 小时的值只在 `local` 后端下有效。 |
| `AGENT_BACKEND_STREAM_READ_TIMEOUT_SECONDS` | `30` | 与 Agent 后端单个 SSE 连接的读取超时时间。 |
| `AGENT_BACKEND_STREAM_MAX_RECONNECTS` | `3` | Agent 后端流中断后,API 判定运行失败前的最大重连次数。 |
| `DIFY_AGENT_PLUGIN_DAEMON_URL` | (空;由 `PLUGIN_DAEMON_URL` 推导) | Agent 后端调用工具所经过的插件守护进程地址。 |
diff --git a/zh/self-host/use-dify/build/new-agent/build.mdx b/zh/self-host/use-dify/build/new-agent/build.mdx
index 5e930dd67..37cc8a678 100644
--- a/zh/self-host/use-dify/build/new-agent/build.mdx
+++ b/zh/self-host/use-dify/build/new-agent/build.mdx
@@ -91,7 +91,11 @@ Skill 是 Agent 针对某项特定任务遵循的一套流程。提示词设定
| 视频 | 100 MB | `UPLOAD_VIDEO_FILE_SIZE_LIMIT` |
| 音频 | 50 MB | `UPLOAD_AUDIO_FILE_SIZE_LIMIT` |
-你也可在 [构建模式](#通过对话构建) 中让 Agent 创建文件并保存到这里。Agent 创建并保存的文件,单个默认不超过 50 MB,可通过 [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/zh/self-host/deploy/configuration/environments#新-agent(beta)) 调整。
+你也可在 [构建模式](#通过对话构建) 中让 Agent 创建文件并保存到这里。
+
+
+Agent 创建并保存的文件,单个默认不超过 50 MB,可通过 `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT` 调整。详见 [环境变量](/zh/self-host/deploy/configuration/environments)。
+
### 工具
@@ -111,9 +115,9 @@ Agent 在 [构建模式](#通过对话构建) 中安装的工具,发布后仍
可导入 `.env` 文件,一次添加多个。你也可在 [构建模式](#通过对话构建) 中让 Agent 代为设置。
-
-这里存储的值可能出现在 Agent 读取的命令输出中。要遮盖其中的敏感内容,设置 [`DIFY_AGENT_SHELL_REDACT_PATTERNS`](/zh/self-host/deploy/configuration/environments#新-agent(beta))。
-
+
+这里存储的值可能出现在 Agent 读取的命令输出中。要遮盖其中的敏感内容,设置 `DIFY_AGENT_SHELL_REDACT_PATTERNS`。详见 [环境变量](/zh/self-host/deploy/configuration/environments#新-agent(beta))。
+
## 通过对话构建
@@ -195,17 +199,25 @@ Agent 工作时会直接修改面板中的配置,所有更改都会列在 **Bu
### 运行限制
-- **时长**:单次 Agent 运行无论从哪个访问点发起(Web 应用、服务 API 或工作流),默认都会在 1 小时后被终止,未完成的回复会被清除。
+- **时长**
+
+ 单次 Agent 运行无论从哪个访问点发起(Web 应用、服务 API 或工作流),默认都会在 20 分钟后被终止,未完成的回复会被清除。
+
+ 若运行被中断,可重试或把任务拆分成更小的步骤。要允许运行最长 1 小时,将 `APP_MAX_EXECUTION_TIME` 和 `WORKFLOW_MAX_EXECUTION_TIME` 调高到 `3600`;要运行更长时间,将这两个变量和 `DIFY_AGENT_RUN_TIMEOUT_SECONDS` 都调高到目标时长以上。
+
+ 这些变量的说明详见 [环境变量](/zh/self-host/deploy/configuration/environments)。
+
+- **模型请求次数**
- 若运行被中断,可重试或把任务拆分成更小的步骤。若 Agent 的任务经常需要更长时间,调高 [`DIFY_AGENT_RUN_TIMEOUT_SECONDS`](/zh/self-host/deploy/configuration/environments#新-agent(beta)),再运行 `docker compose up -d` 使其生效。
+ Agent 每次调用模型都会计入单次运行 500 次的上限,推理越密集、工具用得越多,消耗越快。
-- **模型请求次数**:Agent 每次调用模型都会计入单次运行 500 次的上限,推理越密集、工具用得越多,消耗越快。
+ 可尝试把任务拆分成更小的步骤,让每次运行保持在上限之内。
- 把任务拆分成更小的步骤,可让每次运行保持在上限之内。
+- **回复文件**
-- **回复文件**:Agent 在回复中发回的文件,单个默认不超过 50 MB,超出的文件不会被送达。
+ Agent 在回复中发回的文件,单个默认不超过 50 MB,超出的文件不会被送达。
- 若 Agent 需要产出更大的文件,调高 [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/zh/self-host/deploy/configuration/environments#新-agent(beta))。
+ 若 Agent 需要产出更大的文件,调高 `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`。详见 [环境变量](/zh/self-host/deploy/configuration/environments)。
## 故障排查
@@ -213,7 +225,7 @@ Agent 工作时会直接修改面板中的配置,所有更改都会列在 **Bu
部署的 `.env` 早于 1.16.0,Agents 开关缺失或仍处于关闭状态。
- 将它与 `.env.example` 同步(开关是 [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/zh/self-host/deploy/configuration/environments#新-agent(beta))),然后重建 web 容器(`docker compose up -d web`)并强制刷新浏览器。
+ 将它与 `.env.example` 同步(开关是 [`NEXT_PUBLIC_ENABLE_AGENT_V2`](/zh/self-host/deploy/configuration/environments#next_public_enable_agent_v2)),然后重建 web 容器(`docker compose up -d web`)并强制刷新浏览器。
在 Chatflow 应用中看不到该节点则属正常:新 Agent 节点仅在 Workflow 应用中可用。
diff --git a/zh/self-host/use-dify/nodes/agent.mdx b/zh/self-host/use-dify/nodes/agent.mdx
index f7e5a92b1..8add202b9 100644
--- a/zh/self-host/use-dify/nodes/agent.mdx
+++ b/zh/self-host/use-dify/nodes/agent.mdx
@@ -189,9 +189,9 @@ description: 将 Agent 作为工作流中的一步运行,通过推理和调用
## 声明输出
- 每个 Agent 节点默认返回 `text`、`files` 和 `json`,Agent 写下和产出的一切都会经由这三个字段输出。
+ Agent 节点默认只返回一个输出 `text`,即 Agent 对任务的回复文本。当后续步骤需要更具体的内容,比如一个具体的值或某份文件,可将它声明为独立输出。
- 有时,后续步骤只需要其中某一项,比如一个具体的值或某份文件。此时可将它声明为独立输出:在 **Agent 任务** 中输入 `/`,选择 **新建输出**,然后就地命名并选择类型。每个声明的输出,下游节点都可单独引用。
+ 在 **Agent 任务** 中输入 `/`,选择 **新建输出**,然后就地命名并选择类型。每个声明的输出,下游节点都可单独引用。
声明的输出就写在任务文本里,因此你可明确告诉 Agent 该往里面放什么。下面的任务中,`{{vendor_name}}` 和 `{{quote_file}}` 就是声明的输出:
@@ -199,7 +199,7 @@ description: 将 Agent 作为工作流中的一步运行,通过推理和调用
对比 {{vendor_quotes}} 中的三份供应商报价并给出推荐。把胜出供应商的名称放入 {{vendor_name}},其报价 PDF 放入 {{quote_file}}。
```
- Agent 返回的文件,单个默认不超过 50 MB,可通过 [`DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT`](/zh/self-host/deploy/configuration/environments#新-agent(beta)) 调整。
+ Agent 返回的文件,单个默认不超过 50 MB,可通过 `DIFY_AGENT_STUB_UPLOAD_FILE_SIZE_LIMIT` 调整,详见 [环境变量](/zh/self-host/deploy/configuration/environments#新-agent(beta))。