← Back to AI Engineering Mind Map
🤖 AI EngineeringID: agent-memory-architecture

Agent Memory Architecture

Agent 长短期记忆工程
🎯Core Definition
Agent Memory Architecture is the multi-tiered persistence subsystem that endows stateless LLMs with cross-session personalization, long-term fact retention, and evolving skill accumulation; it structures memory into 3 layers: 1) Working/Short-term Memory (the active conversational Context Window managed via sliding summaries); 2) Long-term Episodic & Entity Memory (vector databases and knowledge graphs storing extracted entities and historical episodic events, e.g., Mem0, Zep); 3) Procedural Memory (reusable executable code snippets, tool blueprints, and verified Reflexion rules).
💡Use Cases
Long-term personalized companion agents, continuously learning software engineering agents (Claude Code, Open-Devin), and multi-month enterprise advisors.
⚡Key Problems Solved
Base LLMs lose all memory upon session reset, while blindly dumping full chat history triggers context window overflow and attention degradation; memory engineering enables selective extraction, decay, contradiction resolution, and precision recall.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Agent Memory Architecture.
Use Cases
In production engineering, what are the primary use cases for Agent Memory Architecture and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Detail the workflow in Mem0 for dynamically extracting facts, updating existing memories, and invalidating contradictory stale facts?
2
Explain short-term working memory management combining sliding message windows with asynchronous incremental LLM summarization?
3
Derive the tripartite retrieval scoring formula for Episodic Memory: Semantic Similarity + Time Decay Factor + Importance Weight?
4
How does Procedural Memory persist successfully authored Python tool scripts into a dynamic skill library (e.g., Voyager paradigm)?
5
How to implement deterministic hard-deletion across vector/graph memory systems to comply with GDPR 'Right to be Forgotten' mandates?
📖 In-depth Guide:📄 agent-design-patterns →
Updated 2026-08-14
🎯
Verify Mastery: Practice Exam Questions for "Agent Memory Architecture"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardSupervisor-Worker ArchitectureNext Card →Computer Use GUI Agent

🔗 More AI Engineering Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/AI_Engineering/card/agent-memory-architecture
中文速览与面试要点

Agent 长短期记忆工程 (Agent Memory Architecture)

定义: 智能体记忆工程 (Agent Memory Architecture) 是为无状态 LLM 赋予跨会话、跨时间维度的个性化认知、技能沉淀与上下文持久化能力的存储体系;系统将记忆划分为三层协同结构:1) 感知工作记忆 (Working / Short-term Memory: 当前 Context Window 内的多轮消息与滑动摘要);2) 长期情境与实体记忆 (Long-term Episodic & Entity Memory: 基于向量数据库与知识图谱,通过实体提取与时序元数据检索历史事实,如 Mem0, Zep);3) 过程技能记忆 (Procedural Memory: 固化保存的高效代码模板、工具使用经验与 Reflexion 反思规则)。 使用场景: 长期伴随式个性化 AI 助手、持续演进的自治开发 Agent (Claude Code / Open-Devin)、以及跨越数月项目的企业级顾问系统。 解决的问题: 传统大模型窗口关闭即“失忆”,且无限扩大的对话历史会迅速突破 Context 上限并造成注意力严重涣散;记忆工程实现了记忆的动态提取、更新衰减、冲突消解与精准按需召回。

核心要点

  • 详细剖析 Mem0 框架中基于 LLM 动态提取用户偏好、更新已有事实 (Memory Update) 与删除过期冲突事实 (Memory Invalidation) 的工作流?
  • 短期工作记忆的滑动窗口 (Sliding Window) 与基于 LLM 异步压缩的增量摘要生成 (Incremental Conversation Summary) 架构?
  • 情境记忆 (Episodic Memory) 的三维混合检索机制:向量语义相似度 + 时间衰减系数 (Time Decay) + 重要性权重 (Importance Score)?
  • 程序记忆 (Procedural Memory) 如何通过将成功执行的 Python 函数代码持久化到工具库中实现 Agent 的自我技能扩展 (Skill Accumulation)?
  • 在严格遵循 GDPR / CCPA 隐私合规体系下,如何实现用户遗忘权 (Right to be Forgotten) 在向量记忆库中的精准硬删除?