memory-persist
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemory Persist Skill
Memory Persist Skill
This skill provides persistent key-value memory storage that survives across agent sessions and conversations.
该技能提供可跨Agent会话和对话留存的持久化键值对内存存储。
When to Use
何时使用
- You need the agent to remember user preferences across sessions
- You want to store facts or information for later retrieval
- You're building a conversational agent with long-term memory
- You need to persist state between job executions
- 您需要Agent跨会话记住用户偏好
- 您希望存储事实或信息以便后续检索
- 您正在构建具备长期记忆的对话式Agent
- 您需要在任务执行之间持久化状态
Capabilities
功能
- memory_store: Store a key-value pair in persistent memory
- memory_recall: Search and retrieve memories by query
- memory_delete: Remove a memory by key
- memory_list: List all stored memories
- memory_clear: Clear all memories
- memory_store: 在持久化内存中存储键值对
- memory_recall: 通过查询搜索并检索记忆
- memory_delete: 通过键删除记忆
- memory_list: 列出所有存储的记忆
- memory_clear: 清空所有记忆
Storage Location
存储位置
Memories are stored in (or )
~/.thepopebot/memory.json$HOME/.thepopebot/memory.json记忆存储在(或)
~/.thepopebot/memory.json$HOME/.thepopebot/memory.jsonUsage Examples
使用示例
javascript
// Store a memory
memory_store('user_name', 'Alice')
// Returns: "Stored: user_name"
// Recall a memory
memory_recall('user')
// Returns: {"user_name": "Alice"}
// Search by value
memory_recall('Alice')
// Returns: {"user_name": "Alice"}
// Delete a memory
memory_delete('user_name')
// Returns: "Deleted: user_name"
// List all memories
memory_list()
// Returns: ["user_name", "favorite_color", ...]
// Clear all memories
memory_clear()
// Returns: "Cleared all memories"javascript
// Store a memory
memory_store('user_name', 'Alice')
// Returns: "Stored: user_name"
// Recall a memory
memory_recall('user')
// Returns: {"user_name": "Alice"}
// Search by value
memory_recall('Alice')
// Returns: {"user_name": "Alice"}
// Delete a memory
memory_delete('user_name')
// Returns: "Deleted: user_name"
// List all memories
memory_list()
// Returns: ["user_name", "favorite_color", ...]
// Clear all memories
memory_clear()
// Returns: "Cleared all memories"Features
特性
- Full-text search: Both keys and values are searched
- JSON persistence: Data survives process restarts
- Case-insensitive: Search works regardless of case
- Safe storage: Invalid JSON is gracefully handled
- 全文搜索: 同时搜索键和值
- JSON持久化: 数据在进程重启后仍保留
- 大小写不敏感: 搜索不受大小写影响
- 安全存储: 可优雅处理无效JSON