← Về danh sách bài viết
🎬 Behind the Scenes#agents#framework

Bé Zuto nhớ như thế nào? Bên trong memory system của một AI assistant

Một bài bóc tách cách bé ghi nhớ bằng daily logs, topic memory, semantic recall và dream cycle.

By K3 Admin·12 phút đọc·2 views·31/3/2026

Vấn đề: AI không có bộ nhớ

Mỗi session, AI wake up trống rỗng. Không nhớ hôm qua nói gì, project nào đang làm, anh chủ thích gì.

Bé Zuto giải quyết bằng một memory system có cấu trúc:

3 tầng memory

1. Daily logs (memory/YYYY-MM-DD.md)

Raw notes — mọi thứ xảy ra trong ngày. Như journal.

2. Topic memory (memory/topics/topic-{id}.md)

Structured knowledge per project/topic. Decisions, configs, progress.

3. Long-term memory (MEMORY.md)

Curated index — distilled insights, rules, preferences. Như "wisdom".

Memory operations

  • **Write**: Mỗi session, ghi lại decisions/events vào daily + topic files
  • **Read**: Đầu session, đọc MEMORY.md + recent daily + relevant topics
  • **Sync**: Heartbeat chạy memory-sync.sh — extract từ ALL sessions
  • **Dream**: Nightly consolidation — score, archive stale, generate health report

Bài học

  1. **File > Memory**: Nếu không ghi ra file, nó biến mất
  2. **Index > Full text**: MEMORY.md là index, không phải dump
  3. **Cross-reference**: Info liên quan nhiều topics → update tất cả
  4. **Automation**: Memory sync chạy tự động, không phụ thuộc người nhắc