MCPcopy Create free account
hub / github.com/MemTensor/MemOS / add_node

Method add_node

src/memos/graph_dbs/base.py:35–42  ·  view source on GitHub ↗

Add a memory node to the graph. Args: id: Unique identifier for the memory node. memory: Raw memory content (e.g., text). metadata: Dictionary of metadata (e.g., timestamp, tags, source).

(self, id: str, memory: str, metadata: dict[str, Any])

Source from the content-addressed store, hash-verified

33 # Node (Memory) Management
34 @abstractmethod
35 def add_node(self, id: str, memory: str, metadata: dict[str, Any]) -> None:
36 """
37 Add a memory node to the graph.
38 Args:
39 id: Unique identifier for the memory node.
40 memory: Raw memory content (e.g., text).
41 metadata: Dictionary of metadata (e.g., timestamp, tags, source).
42 """
43
44 @abstractmethod
45 def update_node(self, id: str, fields: dict[str, Any], user_name: str | None = None) -> None:

Calls

no outgoing calls

Tested by

no test coverage detected