High-level memory facade for AI agents.

Wraps either ICognitiveMemoryManager or the standalone Memory facade with a simple API that hides PAD mood models, HEXACO traits, SQLite storage details, and internal architecture.

Accessors

  • get rawMemory(): undefined | StandaloneMemoryBackend
  • Access the underlying standalone Memory facade for advanced usage.

    Returns undefined | StandaloneMemoryBackend

Constructors

Methods

  • Initialize the cognitive-manager path. Only needed when constructing the legacy cognitive backend directly (not via AgentMemory.wrap() or AgentMemory.sqlite()).

    Parameters

    Returns Promise<void>

  • Store information in long-term memory.

    Parameters

    • content: string
    • Optional options: {
          type?: MemoryType;
          scope?: MemoryScope;
          scopeId?: string;
          sourceType?: MemorySourceType;
          tags?: string[];
          entities?: string[];
          importance?: number;
      }
      • Optional type?: MemoryType
      • Optional scope?: MemoryScope
      • Optional scopeId?: string
      • Optional sourceType?: MemorySourceType
      • Optional tags?: string[]
      • Optional entities?: string[]
      • Optional importance?: number

    Returns Promise<RememberResult>

    Example

    await memory.remember("User prefers dark mode");
    await memory.remember("Deploy by Friday", { type: 'prospective', tags: ['deadline'] });
  • Recall memories relevant to a query.

    Parameters

    Returns Promise<RecallResult>

    Example

    const results = await memory.recall("what does the user prefer?");
    for (const m of results.memories) {
    console.log(m.content, m.retrievalScore);
    }
  • Feed a conversation turn to the observational memory system. The Observer creates dense notes when the token threshold is reached.

    Parameters

    • role: "user" | "assistant" | "system" | "tool"
    • content: string

    Returns Promise<null | ObservationNote[]>

    Example

    await memory.observe('user', "Can you help me debug this?");
    await memory.observe('assistant', "Sure! The issue is in your useEffect...");
  • Export memory data. Available only when backed by the standalone SQLite-first Memory facade.

    Parameters

    Returns Promise<void>

  • Record used/ignored retrieval feedback. Available only when backed by the standalone SQLite-first Memory facade.

    Parameters

    • traceId: string
    • signal: "used" | "ignored"
    • Optional query: string

    Returns void