Class MemoryReflectTool

ITool implementation that triggers one full memory consolidation cycle via ().

Usage:

const tool = new MemoryReflectTool(brain, consolidationLoop);
const result = await tool.execute({}, context);
// result.output → { pruned: 3, merged: 1, derived: 0, compacted: 2, durationMs: 42 }

Implements

Constructors

Methods

Properties

id: "memory-reflect-v1" = 'memory-reflect-v1'

Globally unique tool identifier.

name: "memory_reflect" = 'memory_reflect'

LLM-facing tool name.

displayName: "Reflect on Memory" = 'Reflect on Memory'

Human-readable display name.

description: string = ...

Description shown to the LLM. The consolidation steps are described explicitly so the model understands what "reflect" means operationally.

category: "memory" = 'memory'

Logical category for discovery and grouping.

hasSideEffects: true = true

Consolidation writes to the database (pruning, merging, inserting insights). Mark as having side effects so callers may request confirmation if needed.

inputSchema: JSONSchemaObject = ...

JSON schema for input validation and LLM tool-call construction.