| 1 | # Memory Plugin DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own persistent memory, knowledge import, vector indexing, and memory management UI. |
| 6 | |
| 7 | ## Ownership |
| 8 | |
| 9 | - `helpers/memory.py` owns FAISS store loading, embedding metadata, and knowledge preload. |
| 10 | - `helpers/knowledge_import.py` and `helpers/memory_consolidation.py` own import and consolidation behavior. |
| 11 | - `tools/` owns memory save/load/delete/forget and behavior adjustment tools. |
| 12 | - `api/` and `webui/` own memory dashboard and knowledge reindex/import flows. |
| 13 | - `prompts/`, `default_config.yaml`, and `plugin.yaml` own memory and behavior-tool prompts, defaults, and metadata. |
| 14 | |
| 15 | ## Local Contracts |
| 16 | |
| 17 | - Keep memory scoped by configured subdirectory/context. |
| 18 | - Preserve embedding metadata needed to rebuild indexes safely. |
| 19 | - Delayed recall results must survive `LoopData` replacement, stay scoped to the originating memory/profile/project, and be consumed once by the next prompt; do not persist live task objects into chat JSON. |
| 20 | - `memory_load` accepts numeric `threshold` and `limit` values as native numbers or numeric strings and coerces them before vector search. |
| 21 | - Grouped tool-prompt declarations must start with `arg` or `args` so native Responses models receive every memory tool. |
| 22 | - Auto-recall embeds each prepared query once and reuses that vector for the memory and solution filters; manual `memory_load` keeps the ordinary text-query path. |
| 23 | - Avoid storing transient action-history noise as durable memory. |
| 24 | |
| 25 | ## Work Guidance |
| 26 | |
| 27 | - Keep dashboard metadata JSON-safe without changing shared API serialization. |
| 28 | - Coordinate tool, prompt, and consolidation changes so saved memories remain useful and bounded. |
| 29 | |
| 30 | ## Verification |
| 31 | |
| 32 | - Smoke-test save, recall, delete, dashboard search/update, and knowledge import/reindex after changes. |
| 33 | |
| 34 | ## Child DOX Index |
| 35 | |
| 36 | No child DOX files. |