ValkeyDb implements the Db interface with Valkey as its storage backend. It stores sessions, memories, metrics, evaluations, knowledge metadata, traces, spans, and learnings as prefixed Valkey keys, with optional key expiration.
Methods
upsert_sessions
Upsert multiple sessions in one method call.
Parameters:
sessions(List[Session]): List of sessions to upsertdeserialize(Optional[bool]): Whether to deserialize the sessions. Defaults toTruepreserve_updated_at(bool): Whether to keep the sessions' existingupdated_attimestamps. Defaults toFalse
List[Union[Session, Dict[str, Any]]]
upsert_memories
Upsert multiple memories in one method call.
Parameters:
memories(List[UserMemory]): List of memories to upsertdeserialize(Optional[bool]): Whether to deserialize the memories. Defaults toTruepreserve_updated_at(bool): Whether to keep the memories' existingupdated_attimestamps. Defaults toFalse
List[Union[UserMemory, Dict[str, Any]]]