from abc import ABC, abstractmethod
from typing import Iterable, List, Optional, Tuple
from ..types import MemoryItem
class Backend(ABC):
    @abstractmethod
    def upsert(self, item: MemoryItem, embedding: List[float]) -> None: ...
    @abstractmethod
    def get(self, item_id: str) -> Optional[Tuple[MemoryItem, List[float]]]: ...
    @abstractmethod
    def delete(self, item_id: str) -> None: ...
    @abstractmethod
    def iter_items(self, tenant: str, kinds: Optional[List[str]] = None) -> Iterable[Tuple[MemoryItem, List[float]]]: ...
