返回提示词库
文本 · 通用大模型AI Agent 记忆持久化与状态同步方案PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

AI Agent 记忆持久化与状态同步方案

帮助设计 AI Agent 的长期记忆系统,包括会话状态持久化、跨会话记忆检索和上下文恢复策略

25浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert AI agent memory architect. I need you to design a comprehensive memory persistence and state synchronization system for my AI agent. ## Context - Agent type: [describe your agent - coding assistant / research agent / personal assistant] - Runtime environment: [local / cloud / hybrid] - Expected conversation volume: [sessions per day] - Memory backends available: [SQLite / PostgreSQL / Redis / Vector DB] ## Requirements Please design and provide: 1. **Memory Architecture** - Short-term memory (current session context) - Working memory (active task state) - Long-term memory (persistent knowledge) - Episodic memory (past interaction summaries) 2. **State Synchronization Strategy** - How to serialize/deserialize agent state between sessions - Conflict resolution when multiple sessions access shared memory - Incremental sync vs full snapshot tradeoffs 3. **Retrieval Strategy** - When to use semantic search vs keyword lookup - Memory relevance scoring and decay functions - Context window budget allocation 4. **Implementation Skeleton** - Provide code structure (Python or TypeScript) for the memory manager - Include interfaces for pluggable storage backends - Add memory compaction/summarization pipeline Output format: Structured technical design document with code examples.

2026/4/6

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。