mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 03:58:09 +00:00
The four memory tools memory_load, memory_save, memory_delete, and memory_forget collapse into one memory tool whose action arg selects load, save, delete, or forget, matching the action-dispatch shape of other tools. The tool keeps the numeric threshold and limit coercion, the destructive-confirmation guidance, and the exact-match cleanup of forget, and rejects unknown actions through a plugin prompt file. Memory messages now log as a single memory type with icon verb headlines and a dedicated MEM badge matching the behavior adjustment brain pink accent. Update the tool prompt, the Responses schema and prompt tests, the auto-recall and consolidation imports, the orchestrator skill and README references to the new tool, and the plugin DOX and README. Validation: pytest tests/test_responses_tools.py plugins/_memory/tests/test_memory_tool_ui.py tests/test_tool_action_contracts.py plugins/_orchestrator/tests/test_status_adapters.py
1.5 KiB
1.5 KiB
memory tool
use when durable recall or storage is useful
memory: argsaction, thenquery,text,ids,area,threshold,limit,filteras the action needs- actions:
loadsearches by meaning and metadata,savestores durable information and returns a memory ID,deleteremoves memories by comma-separated IDs,forgetfinds and removes matching memories
notes:
thresholdis similarity from0to1filteris a metadata expression (e.g.area=='main')- confirm destructive changes when accuracy matters
- memories usually include timestamp metadata; use it as a soft recency signal, not a hard TTL
- when the user updates a durable fact/preference, load related memories first, forget/delete superseded versions, then save one complete current version
- do not append a second memory for the same mutable subject when the new statement replaces the old one
- do not forget a memory only because it is old; forget it when current evidence shows it is stale, false, superseded, duplicated, or unwanted
forgetalso cleans exact matches and derived fragment/solution records related to removed memories- use
savefor stable current facts, not short-lived test markers, greetings, or one-off conversation events
example:
{
"thoughts": ["I should search memory for relevant prior guidance."],
"headline": "Loading related memories",
"tool_name": "memory",
"tool_args": {
"action": "load",
"query": "tool argument format",
"threshold": 0.7,
"limit": 3
}
}