Skip to content

neo4j_txns

Memory Graph Transaction Functions.

This module provides backend functions for interacting with the Memgraph database. It is primarily used for maintaining agent memory graphs.

Functions

add_memory_edge

add_memory_edge(
    txn: Union[Transaction, ManagedTransaction],
    parent_memory_pkid: str,
    child_memory_pkid: str,
    merge: bool = True,
) -> Result

add_memory_node

add_memory_node(
    txn: Union[Transaction, ManagedTransaction],
    memory_pkid: str,
    collection_name: str,
    memory_type: str,
    memory_txt: str,
    merge: bool = True,
) -> Result

bulk_add_memory_edges

bulk_add_memory_edges(
    txn: Union[Transaction, ManagedTransaction],
    edges: List[Dict[str, str]],
    merge: bool = True,
) -> Result

bulk_add_memory_nodes

bulk_add_memory_nodes(
    txn: Union[Transaction, ManagedTransaction],
    nodes: List[Dict[str, str]],
    merge: bool = True,
) -> Result

delete_memory_collection_nodes

delete_memory_collection_nodes(
    txn: Union[Transaction, ManagedTransaction],
    collection_name: str,
) -> None