update: agent memory

This commit is contained in:
Jing Y.
2025-04-17 18:08:32 +08:00
parent 1fa7b803b2
commit fcef174201
3 changed files with 24 additions and 0 deletions
+8
View File
@@ -73,3 +73,11 @@ After choosing the Agent strategy, the configuration panel will display the rele
During execution, the Agent node generates detailed logs. You can see overall node execution information—including inputs and outputs, token usage, time spent, and status. Click Details to view the output from each round of Agent strategy execution.
<figure><img src="../../../.gitbook/assets/en-1-9-6.png" alt=""><figcaption></figcaption></figure>
## Memory
Enabling the **Memory** toggle empowers the Agent to retain and recall conversation context. By adjusting the **Window Size**, you can control how many previous conversation messages the Agent can “remember”. This allows the Agent to understand and reference earlier exchanges, delivering coherent and contextually relevant responses that enhance multi-turn dialogue experiences.
For example, when users employ pronouns (such as “it”, “this”, or “they”) in subsequent messages, an Agent with Memory enabled can understand what these pronouns refer to from previous context without requiring users to restate complete information.
{% embed url="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" %}
+8
View File
@@ -69,3 +69,11 @@
実行時には詳細なログが生成されます。基本情報(入出力/トークン使用量/処理時間/状態)に加え、「詳細」から各処理ステップの出力を確認可能です。
<figure><img src="../../../.gitbook/assets/en-1-9-6.png" alt=""><figcaption></figcaption></figure>
## メモリ機能
メモリスイッチを有効にすると、エージェントに会話コンテキストを記憶する能力が付与されます。メモリウィンドウサイズスライダーを調整することで、エージェントが「記憶」できる過去の会話メッセージ数を制御できます。これにより、エージェントは以前のやり取りを理解して参照し、一貫性のある文脈に沿った応答を提供することができ、複数ターンの対話体験を大幅に向上させます。
例えば、ユーザーが後続のメッセージで代名詞(「それ」、「これ」、「彼ら」など)を使用する場合、メモリ機能が有効になっているエージェントは、ユーザーが完全な情報を繰り返し述べなくても、これらの代名詞が前のコンテキストから何を指しているかを理解できます。
{% embed url="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" %}
+8
View File
@@ -69,3 +69,11 @@ ReAct 策略使 Agent 交替进行思考和行动:LLM 首先思考当前状态
Agent 节点执行过程中将生成详细日志。显示节点执行的总体信息,包括输入和输出、token 开销、耗时和状态。点击 "详情" 查看 Agent 策略执行的每一轮输出信息。
<figure><img src="../../../.gitbook/assets/zh-1-9-6.png" alt=""><figcaption></figcaption></figure>
## 记忆
启用记忆开关可以为 Agent 提供对话上下文记忆能力。通过调整记忆窗口滑块,你可以控制 Agent 能够“记住”的对话历史消息数量。这使 Agent 能够理解和引用先前的交流内容,从而提供连贯且上下文相关的回答,大幅提升多轮对话体验。
例如,当用户在后续消息中使用代词(如“它”、“这个”或“他们”)时,启用了记忆功能的 Agent 能够理解这些代词所指代的前文实体,无需用户重复提及完整信息。
{% embed url="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" %}