| name | longer-memory |
| description | Persistent vector memory — save information and semantically recall it across sessions. Trigger when the user says "nhớ", "lưu", "remember", "save", "ghi lại", or asks "trước tôi có nói gì về X?", "tìm lại", "recall", "what did I say about". Also trigger proactively at the end of any conversation that contains important facts, decisions, or knowledge the user might want to recall later. ALWAYS use this skill for any memory or recall request, even casual ones like "nhớ cái này".
|
Longer Memory
Lưu trữ và tìm kiếm thông tin theo dạng vector (semantic search) với LanceDB.
Config đọc từ ~/.config/longer-memory/config.json — xem skill configure để thiết lập.
Lưu memory
cd skills/longer-memory
python scripts/save.py --text "Nội dung" --category user_info --tags "tag1,tag2" --source "mô tả"
Categories: user_info | conversation | knowledge | document
Tìm kiếm
python scripts/search.py --query "câu hỏi" --top-k 5
python scripts/search.py --query "..." --category knowledge
Liệt kê / Xoá / Thống kê
python scripts/list.py --limit 20
python scripts/delete.py --id <memory-id>
python scripts/stats.py
Khi nào tự động lưu
Sau mỗi cuộc trò chuyện quan trọng, nếu phát hiện có:
- Thông tin cá nhân về user (tên, công ty, sở thích, thói quen)
- Quyết định kỹ thuật hoặc business đã được đưa ra
- Kiến thức domain-specific được chia sẻ
- Tóm tắt công việc đã hoàn thành
→ Chủ động hỏi: "Cuộc trò chuyện này có [X, Y, Z] — bạn muốn mình lưu lại không?"
→ Nếu đồng ý, tóm tắt các điểm chính thành 2-5 entries và lưu.
Khi nào tự động recall
Khi bắt đầu một task mới hoặc nhận câu hỏi liên quan đến lịch sử:
→ Chạy search.py với query từ nội dung câu hỏi.
→ Nếu có kết quả relevance > 0.7, đưa context đó vào câu trả lời tự nhiên.
→ Không cần thông báo mỗi lần recall — chỉ dùng context đó một cách tự nhiên.