AI Coding Agents With Project Memory: 3 Months and 500 Lessons Later
Описание и применение
Система памяти проекта для AI‑агентов позволяет хранить и воспроизводить правила (lessons) при работе с кодом, уменьшая количество токенов до ~10 за вызов и повышая точность рекомендаций.
Задача
AI coding agents repeatedly make the same mistakes because corrections are stored only in chat history, not in a persistent project memory.
Результат
After 3 months, 542 lessons were stored, recalled 5,521 times, with an average token cost of ~10 per recall and 0.2s latency—18× cheaper than preloading all rules. The system prioritizes specific rules, reduces noise, and provides analytics to prune unused lessons.
Рабочий процесс
- 1. Capture a lesson with
agentsmesh lessons add "<sentence>" --topic <topic> --trigger-file <glob> - 2. Commit lessons.json to the repo
- 3. Agents load lessons via hooks or task‑start queries
- 4. Before a tool call, recall engine matches file/command triggers or BM25 keyword matches
- 5. If a rule is relevant and not already shown in session, it is injected into context
- 6. Agent proceeds with tool call
- 7. Optional telemetry logs recall events for analysis
Доказательства
Recall now puts the most specific rule first, understands a task from its wording and not only its keywords, speaks once and before the action, and can tell you which memories are actually earning their place.
Tokens per recall, averaged over every call ~10; Tokens when a rule is delivered ~190; Recall latency 0.2 s; Versus preloading every rule 18× cheaper.
- Дата записи: 2026-09-14T12:45:41.423Z