My support bot stopped forgetting everything when I changed AI memory write triggers
Описание и применение
Бот поддержки перестал забывать детали, ограничив запись памяти пятью типами событий: подтверждённые факты, изменения предпочтений, изменения состояния, решения и результаты.
Задача
The support bot repeatedly asked customers to repeat actions they had already performed, indicating it was not retaining relevant case history.
Результат
After restricting memory writes to five event types, retrieval became cleaner, the bot no longer repeated redundant steps, and customer interactions were more efficient.
Рабочий процесс
- 1. Identify event type from conversation turn
- 2. Apply shouldWriteMemory filter to decide if event should be stored
- 3. If true, create structured event JSON and write to pgvector
- 4. During retrieval, fetch recent relevant events and build memory context
- 5. Pass context to LLM for next turn
Доказательства
The rule that fixed my support agent: write memory only on 5 event types — confirmed facts, preference changes, state-changing troubleshooting steps, decisions, and outcomes.
I stopped writing every turn and only wrote memory on 5 event types.
Once I did that, retrieval got smaller, cleaner, and actually useful.
- Дата записи: 2026-10-03T23:55:53.028Z