Class Neo4jKnowledgeGraph

Interface for the Knowledge Graph system

Implements

Constructors

Methods

  • Delete the episodic memories that copy the filter's traces or scopes. A trace's copies are read through their trace id (traceId, indexed); the first delete by trace id of this graph first gives the copies an older release recorded their trace id (backfillCopyTraceIds). While that pass fails, a delete by trace id also reads the copies that carry no trace id by the text their stored context JSON must hold ("memoryTraceId":"<id>") and matches them exactly in code. A scope's copies are read by the text their stored context JSON must hold (CONTAINS) and matched exactly in code, so a malformed context_json is skipped rather than failing the delete.

    Parameters

    Returns Promise<number>

  • Query episodic memories

    Parameters

    • Optional options: {
          types?: ("error" | "success" | "discovery" | "conversation" | "task" | "interaction")[];
          participants?: string[];
          minImportance?: number;
          timeRange?: {
              from?: string;
              to?: string;
          };
          limit?: number;
      }
      • Optional types?: ("error" | "success" | "discovery" | "conversation" | "task" | "interaction")[]
      • Optional participants?: string[]
      • Optional minImportance?: number
      • Optional timeRange?: {
            from?: string;
            to?: string;
        }
        • Optional from?: string
        • Optional to?: string
      • Optional limit?: number

    Returns Promise<EpisodicMemory[]>