1.1 KiB
1.1 KiB
title, type, tags, sources, last_updated
| title | type | tags | sources | last_updated | ||||
|---|---|---|---|---|---|---|---|---|
| Memory in AI Agent | concept |
|
2025-03-06 |
Definition
Memory(记忆)是 AI Agent 保持多轮对话上下文连贯性的机制,通过在每次交互中注入历史消息,使 Agent 能够记住之前的对话内容,输出更相关和连贯的响应。
工作原理
- 每次对话 → 将历史消息追加到 context
- Agent 在决策时读取完整 context
- 结合 Memory + 当前输入 → 生成响应
N8N 实现
N8N AI Agent 节点内置 Memory 配置,支持:
- 对话历史注入
- 与外部数据库(如 Airtable)联动存储长期记忆
与传统 Workflow 的区别
- Workflow:完全确定性,每次执行相同输入=相同输出
- 带 Memory 的 Agent:输入相同但上下文不同,输出可能变化
Related Entities
Related Concepts
- Agentic System:依赖 Memory 实现多轮交互
- Workflow vs Agent:Agent 的 Memory 是其与 Workflow 本质区别