Use the compact editor, memory recall, and notification layouts for saved calls. Summarize default skill listings and configured vision analysis, and keep skill instructions and reference bodies in View details. Preserve recorded headings, Action fields, and full recorded results and arguments. Verify both saved and current card formats with WebUI regression coverage.
4.0 KiB
Memory Plugin DOX
Purpose
- Own persistent memory, knowledge import, vector indexing, and memory management UI.
Ownership
helpers/memory.pyowns FAISS store loading, embedding metadata, and knowledge preload.helpers/knowledge_import.pyandhelpers/memory_consolidation.pyown import and consolidation behavior.tools/memory.pyowns the singlememorytool whoseactionarg selects load, save, delete or forget.- Legacy
tools/memory_{load,save,delete,forget}.pyfiles re-export that implementation for saved prompts/calls. Their names fix the action regardless of supplied arguments; onlymemoryis advertised to models. - The memory tool logs messages as its own
memorytype with icon verb headlines;extensions/webui/get_message_handler/owns the sharedMEMbadge presentation in the behavior adjustment brain pink accent andextensions/webui/get_process_step_types/registers the types. get_tool_message_handlerreuses the memory renderer for savedtype="tool"logs with legacy memory names.- Memory search steps show the recorded action, query, match count and a short excerpt when recall returns matches. Saved
memory_loadcalls use this summary even when they have no action field. Full results stay in View details. api/andwebui/own memory dashboard and knowledge reindex/import flows.extensions/webui/owns the welcome-screen Memory card and the quick-actions dropdown entries.prompts/,default_config.yaml, andplugin.yamlown memory prompts, defaults, and metadata.
Local Contracts
-
Keep memory scoped by configured subdirectory/context.
-
Shared tool policy preserves saved per-action memory permissions in both unified and legacy calls; an allowed load must not grant save, delete or forget. Explicit tool-wide blocks cover every alias.
-
helpers/native_store.pykeeps IDs, text, JSON metadata, model identity and float32 vectors transactionally inmemory.sqlite3. Search uses native FAISS in the framework. Migrate legacy document records using the restricted reader and existing embedding cache. Preserve legacy files and abort on unsupported records. Re-embed stored text when the model changes. -
Delayed recall results must survive
LoopDatareplacement, 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. -
The
loadaction accepts numericthresholdandlimitvalues as native numbers or numeric strings and coerces them before vector search. -
The tool-prompt declaration must start with
argsso native Responses models receive thememorytool. -
Auto-recall embeds each prepared query once and reuses that vector for the memory and solution filters; manual
loadkeeps the ordinary text-query path. -
Keep auto-recall context capability-neutral; memory-tool routing belongs in the policy-filtered memory tool prompt.
-
Avoid storing transient action-history noise as durable memory.
-
PDF and HTML knowledge import use the Document Query sandbox loader, preserving source/page metadata and host-side indexes. Text/CSV loaders remain local. Reusable parser code is available independently of the document tool toggle.
Work Guidance
- Both dashboard selection toolbars use icon-only actions with accessible labels and the shared borderless close control before the selection count.
- Dashboard selection checkboxes reuse the shared native theme from
webui/index.css; keep header and row controls 16px and centered in their table cells. - Keep dashboard metadata JSON-safe without changing shared API serialization.
- Coordinate tool, prompt, and consolidation changes so saved memories remain useful and bounded.
Verification
- Smoke-test save, recall, delete, dashboard search/update, and knowledge import/reindex after changes.
- Run
tests/test_tool_policy.pyandtests/test_tool_compatibility.pyfor action permissions and legacy calls, andtests/test_webui_tool_compatibility.pyfor saved-log rendering.
Child DOX Index
No child DOX files.