Add or update an entity
Get entity by ID
Query entities
Optional options: KnowledgeQueryOptionsAdd or update a relation
Get relations for an entity
Optional options: { Optional direction?: "both" | "outgoing" | "incoming"Optional types?: RelationType[]Record an episodic memory. A record whose context names a memory trace (memoryTraceId, as MemoryStore.store
writes it) is the trace's copy; the in-memory, SQL and Neo4j graphs keep one copy per trace, so recording the
trace again replaces it.
Get memory by ID
Query episodic memories
Optional options: { Optional types?: ("error" | "success" | "discovery" | "conversation" | "task" | "interaction")[]Optional participants?: string[]Optional minOptional timeOptional from?: stringOptional to?: stringOptional limit?: numberRecall relevant memories (updates access count)
Optional topK: numberOptional deleteDelete the episodic records that copy memory traces (MemoryCopyFilter). MemoryStore.store records each
trace here with its full text, so a deleted trace takes its record with it. Optional: a graph without it keeps
its records, and CognitiveMemoryManager.deleteScope reports it as not reached.
The number of records deleted.
Traverse the graph from a starting entity
Optional options: TraversalOptionsFind shortest path between two entities
Optional maxDepth: numberGet neighborhood of an entity
Optional depth: numberSemantic search across entities and memories
Extract entities and relations from text
Optional options: { Optional extractOptional entityMerge duplicate entities
Get knowledge graph statistics
Interface for the Knowledge Graph system