Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion en/api-reference/guides/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tag: New
---

<Info>
Agent here means the new Agent app type (`agent` mode). The Legacy Agent app (`agent-chat`) is covered on [Chatbot and Legacy Agent](/en/api-reference/guides/chat).
Agent here means the new Agent app type (`agent` mode). The legacy Agent app (`agent-chat`) is covered on [Chatbot and Legacy Agent](/en/api-reference/guides/chat).
</Info>

[Agent apps](/en/self-host/use-dify/build/new-agent/overview) run in `agent` mode: you send a message, stream the reply as it generates, and keep multi-turn context in conversations.
Expand Down
6 changes: 3 additions & 3 deletions en/api-reference/guides/chat.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: Chat App API
sidebarTitle: Chatbot and Legacy Agent
description: API for Chatbot and Legacy Agent apps, covering chat messages, conversation management, file uploads, voice, and annotations
description: API for Chatbot and legacy Agent apps, covering chat messages, conversation management, file uploads, voice, and annotations
---

[Chatbot apps](/en/cloud/use-dify/build/chatbot) (`chat` mode) and [Legacy Agent apps](/en/cloud/use-dify/build/agent) (`agent-chat` mode) share the same endpoints to send messages, manage conversations, handle files, and retrieve app settings. Only the streamed reply differs: Chatbot apps stream the reply as `message` events, while Legacy Agent apps stream `agent_thought` and `agent_message` events.
[Chatbot apps](/en/cloud/use-dify/build/chatbot) (`chat` mode) and [legacy Agent apps](/en/cloud/use-dify/build/agent) (`agent-chat` mode) share the same endpoints to send messages, manage conversations, handle files, and retrieve app settings. Only the streamed reply differs: Chatbot apps stream the reply as `message` events, while legacy Agent apps stream `agent_thought` and `agent_message` events.

<Info>
Authentication, the base URL, and the `user` field that scopes end-user data are covered in [Get Started](/en/api-reference/guides/get-started) and [End User Identity](/en/api-reference/guides/end-user-identity).
</Info>

## Send Messages and Stream Replies

- **[Send Chat Message](/en/api-reference/chat-messages/send-chat-message)**: send a query to your Chatbot or Legacy Agent app. Blocking mode returns the full reply once it finishes; Legacy Agent apps support streaming mode only.
- **[Send Chat Message](/en/api-reference/chat-messages/send-chat-message)**: send a query to your Chatbot or legacy Agent app. Blocking mode returns the full reply once it finishes; legacy Agent apps support streaming mode only.
- **[Stop Chat Message Generation](/en/api-reference/chat-messages/stop-chat-message-generation)**: interrupt a streaming reply before it finishes.
- **[Get Next Suggested Questions](/en/api-reference/chat-messages/get-next-suggested-questions)**: propose follow-up questions after a reply completes, based on the conversation so far.

Expand Down
4 changes: 2 additions & 2 deletions en/api-reference/guides/streaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ The typical minimum:
1. Concatenate reply chunks in order:

- `message` events for Chatbot and Chatflow apps
- `agent_message` events for Legacy Agent and Agent apps
- `agent_message` events for legacy Agent and Agent apps

For Agent apps, a single closing `message` event repeats the complete answer; treat it as the final answer, not extra text to append.

2. Close on the right terminal event:
- `message_end` for Chatbot, Legacy Agent, and Agent apps
- `message_end` for Chatbot, legacy Agent, and Agent apps
- `message_end` then `workflow_finished` (both arrive, in that order) for Chatflow apps
- `workflow_finished` for Workflow apps
3. Surface `error`.
Expand Down
4 changes: 2 additions & 2 deletions en/api-reference/openapi_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@
"type": "string"
},
"response_mode": {
"description": "Mode of response return. `streaming` (recommended) uses SSE. `blocking` returns after completion (may be interrupted for long processes). Cloudflare timeout is `100 s`. When omitted, defaults to blocking behavior.",
"description": "Mode of response return. Defaults to blocking when omitted.\n\n- `streaming` (recommended): the reply arrives as Server-Sent Events.\n- `blocking`: returns once generation completes. Long generations risk interruption: on Dify Cloud, the edge proxy may end the connection if the response doesn't arrive within its timeout.",
"enum": [
"streaming",
"blocking"
Expand Down Expand Up @@ -7029,7 +7029,7 @@
"type": "object"
},
"response_mode": {
"description": "Response mode. Use `blocking` for synchronous responses (Cloudflare timeout is `100 s`), or `streaming` for Server-Sent Events. When omitted, defaults to blocking behavior.",
"description": "Response mode. Defaults to blocking when omitted.\n\n- `streaming`: the run's events arrive as Server-Sent Events.\n- `blocking`: returns once the run finishes. Long runs risk interruption: on Dify Cloud, the edge proxy may end the connection if the response doesn't arrive within its timeout.",
"enum": [
"streaming",
"blocking"
Expand Down
2 changes: 1 addition & 1 deletion en/cloud/use-dify/build/new-agent/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Build an agent once, then put it to work as a standalone app or ins
The new Agent is in beta.
</Info>

An *Agent* is an AI worker you set up once and then put to work. It's a different kind of agent than the [Legacy Agent app](/en/cloud/use-dify/build/agent):
An *Agent* is an AI worker you set up once and then put to work. It's a different kind of agent than the [legacy Agent app](/en/cloud/use-dify/build/agent):

- It works in a **sandbox of its own**: it runs commands, installs programs, and reads and writes files, so it takes on open-ended work rather than just calling the tools you configured.

Expand Down
1 change: 0 additions & 1 deletion en/cloud/use-dify/workspace/readme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Every resource in Dify belongs to a workspace. When you create an app, it inheri
├── 🤖 Apps (chatbots, workflows, agents)
├── 📊 Knowledge Bases (documents, embeddings)
├── 👥 Team Members (roles & permissions)
├── 🧠 Model Providers (API keys, configurations)
├── 🔧 Integrations (model providers, tools, custom code)
└── 💳 Billing (subscription, limits, usage)
```
Expand Down
2 changes: 1 addition & 1 deletion en/self-host/use-dify/build/new-agent/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The new Agent is in beta. It's on by default on Docker Compose, with its runtime
For production, replace [`DIFY_AGENT_SERVER_SECRET_KEY`](/en/self-host/deploy/configuration/environments#dify_agent_server_secret_key) and [`DIFY_AGENT_API_TOKEN`](/en/self-host/deploy/configuration/environments#dify_agent_api_token) with your own random values.
</Note>

An *Agent* is an AI worker you set up once and then put to work. It's a different kind of agent than the [Legacy Agent app](/en/self-host/use-dify/build/agent):
An *Agent* is an AI worker you set up once and then put to work. It's a different kind of agent than the [legacy Agent app](/en/self-host/use-dify/build/agent):

- It works in a **sandbox of its own**: it runs commands, installs programs, and reads and writes files, so it takes on open-ended work rather than just calling the tools you configured.

Expand Down
4 changes: 2 additions & 2 deletions ja/api-reference/openapi_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@
"type": "string"
},
"response_mode": {
"description": "レスポンスの返却モード。`streaming`(推奨)は SSE を使用します。`blocking` は完了後に返却します(長時間の処理では中断される場合があります)。Cloudflare のタイムアウトは `100 s` です。省略した場合、デフォルトでブロッキングモードになります。",
"description": "レスポンスの返却モードです。省略した場合はブロッキングになります。\n\n- `streaming`(推奨):応答は Server-Sent Events として届きます。\n- `blocking`:生成の完了後に返します。長時間の生成は中断されるおそれがあります。Dify Cloud では、応答がタイムアウト内に届かないと、エッジプロキシが接続を終了する場合があります。",
"enum": [
"streaming",
"blocking"
Expand Down Expand Up @@ -7029,7 +7029,7 @@
"type": "object"
},
"response_mode": {
"description": "レスポンスモードです。同期レスポンスには `blocking`(Cloudflare タイムアウトは `100 s`)、サーバー送信イベントには `streaming` を使用します。省略した場合、デフォルトはブロッキング動作になります。",
"description": "レスポンスモードです。省略した場合はブロッキングになります。\n\n- `streaming`:実行のイベントは Server-Sent Events として届きます。\n- `blocking`:実行の完了後に返します。長時間の実行は中断されるおそれがあります。Dify Cloud では、応答がタイムアウト内に届かないと、エッジプロキシが接続を終了する場合があります。",
"enum": [
"streaming",
"blocking"
Expand Down
3 changes: 1 addition & 2 deletions ja/cloud/use-dify/workspace/readme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Dify のすべてのリソースはワークスペースに属します。アプ
├── 🤖 アプリ (チャットボット、ワークフロー、エージェント)
├── 📊 ナレッジベース (ドキュメント、埋め込み)
├── 👥 チームメンバー (役割と権限)
├── 🧠 モデルプロバイダー (APIキー、設定)
├── 🔧 統合 (モデルプロバイダー、ツール、カスタムコード)
└── 💳 請求 (サブスクリプション、制限、使用量)
```
Expand All @@ -35,7 +34,7 @@ Dify のすべてのリソースはワークスペースに属します。アプ

## リソースの接続方法

構築するアプリケーションは、ワークスペースで設定されたあらゆるモデルプロバイダーを使用し、すべてのワークスペース知識ベースにアクセスし、インストール済みの統合を活用できます。チームメンバーは、ワークスペースの権限に基づいてアプリケーションを表示します。
構築するアプリケーションは、ワークスペースで設定されたあらゆるモデルプロバイダーを使用し、ワークスペースのすべてのナレッジベースにアクセスし、インストール済みの統合を活用できます。チームメンバーは、ワークスペースの権限に基づいてアプリケーションを表示します。

ワークスペースの役割は、すべてのリソースにわたるアクセスを決定します:
- **オーナー** は請求、モデルプロバイダー、ワークスペース設定を制御します
Expand Down
2 changes: 1 addition & 1 deletion ja/self-host/use-dify/workspace/readme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Dify のすべてのリソースはワークスペースに属します。アプ

## リソースの接続方法

構築するアプリケーションは、ワークスペースで設定されたあらゆるモデルプロバイダーを使用し、すべてのワークスペース知識ベースにアクセスし、インストール済みの統合を活用できます。チームメンバーは、ワークスペースの権限に基づいてアプリケーションを表示します。
構築するアプリケーションは、ワークスペースで設定されたあらゆるモデルプロバイダーを使用し、ワークスペースのすべてのナレッジベースにアクセスし、インストール済みの統合を活用できます。チームメンバーは、ワークスペースの権限に基づいてアプリケーションを表示します。

ワークスペースの役割は、すべてのリソースにわたるアクセスを決定します:
- **オーナー** はモデルプロバイダーとワークスペース設定を制御します
Expand Down
4 changes: 2 additions & 2 deletions zh/api-reference/openapi_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@
"type": "string"
},
"response_mode": {
"description": "响应返回模式。`streaming`(推荐)使用 SSE。`blocking` 等待完成后返回(长时间处理可能会被中断)。Cloudflare 超时为 `100 s`。省略时默认为阻塞式返回。",
"description": "响应返回模式。省略时默认为阻塞式返回。\n\n- `streaming`(推荐):回复以 Server-Sent Events 形式返回。\n- `blocking`:生成完成后一次性返回。生成时间较长时有中断风险:在 Dify Cloud 上,如果边缘代理在超时时间内未收到响应,就可能中断连接。",
"enum": [
"streaming",
"blocking"
Expand Down Expand Up @@ -7029,7 +7029,7 @@
"type": "object"
},
"response_mode": {
"description": "响应模式。使用 `blocking` 获取同步响应(Cloudflare 超时时间为 `100 s`),使用 `streaming` 获取服务器发送事件。未指定时默认为阻塞式返回。",
"description": "响应模式。省略时默认为阻塞式返回。\n\n- `streaming`:运行事件以 Server-Sent Events 形式返回。\n- `blocking`:运行结束后一次性返回。运行时间较长时有中断风险:在 Dify Cloud 上,如果边缘代理在超时时间内未收到响应,就可能中断连接。",
"enum": [
"streaming",
"blocking"
Expand Down
1 change: 0 additions & 1 deletion zh/cloud/use-dify/workspace/readme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Dify 中的每个资源都属于一个工作空间。当你创建应用时,它
├── 🤖 应用(聊天机器人、工作流、Agent)
├── 📊 知识库(文档、嵌入向量)
├── 👥 团队成员(角色和权限)
├── 🧠 模型供应商(API 密钥、配置)
├── 🔧 集成(模型供应商、工具、自定义代码)
└── 💳 账单(订阅、限制、使用情况)
```
Expand Down
Loading