The agent's shared SQLite brain database connection.
Optional writeBack: MemoryToolWriteBackThe facade that made the tool (Memory.createTools()): a deleted trace's knowledge-graph copy
is deleted through it, and a delete a learning layer does not keep is taken back through it. Without it the tool
restores the row itself.
The refusal a delete meets whatever a human would answer, read before the tool orchestrator's approval gate
(ITool.refusalBeforeApproval), so no one is asked to approve a write that cannot act: a freeze, and, with the
turn's scope ids on the call, a session that records no writes. A refusal that reads the trace (other_user,
conflict) is given when the call runs. execute refuses the same call itself, in the same order.
The call's arguments, before the input schema is checked.
The call's context.
The refusal, or undefined when the call may run.
Set deleted = 1 on the memory trace matching traceId.
The WHERE clause filters to deleted = 0 so that attempting to
delete an already-deleted trace returns { deleted: false } rather
than silently succeeding — this gives callers accurate feedback.
The trace's knowledge-graph copy (the episodic record a memory manager on the same Brain writes of each trace it stores) is deleted with it, through the facade that made the tool.
Delete input (traceId, optional reason).
Tool execution context; where it carries the turn's scope ids, the call reaches only a live trace
of the turn's own scopes that the turn's own user filed (another scope's reads as not found, another user's is
refused, other_user), and the delete runs through the learner session's recorder, deleting only while the
trace holds what was read (conflict otherwise). Only a freeze stops a delete, with a layer or without one
(frozen).
{ deleted } status, or an error result.
Readonly idGlobally unique tool identifier.
Readonly nameLLM-facing tool name.
Readonly displayHuman-readable display name.
Readonly descriptionLLM-facing description.
Readonly categoryLogical category for discovery and grouping.
Readonly hasThis tool writes to the database.
Readonly inputJSON schema for input validation and LLM tool-call construction.
ITool implementation that soft-deletes a memory trace from the agent's SQLite brain database.
Usage: