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
Get memory by ID
Query episodic memories
Optional options: { Optional types?: ("error" | "success" | "task" | "conversation" | "discovery" | "interaction")[]Optional participants?: string[]Optional minOptional timeOptional from?: stringOptional to?: stringOptional limit?: numberRecall relevant memories (updates access count)
Optional topK: numberTraverse 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