osyra_ome.adapters.llamaindex.memory_store
Private pre-release / network boundary: The currently usable customer surface is offline verification of an existing signed artifact against an out-of-band trust anchor. Memory/network RPC APIs and host snippets on this page describe protocol and interface shape; the public Edge bridge, package publication, and release acceptance remain pending. Do not treat
api.osyra.ai:443examples as a released customer route.
LlamaIndex :class:`BaseMemory` backed by the OME memory namespace.
LlamaIndex's chat memory abstraction (``llama_index.core.memory.BaseMemory``) defines the contract for persisting per-conversation chat history. :class:`OmeMemoryStore` implements that contract by emitting an OME :class:`~osyra_ome.Claim` per :meth:`put` / :meth:`aput` call.
Each conversation is keyed by a ``session_id`` encoded into the OME ``subject_id`` (``did:web:session.osyra.ai/<session_id>``) so all messages for a conversation are queryable together.
Classes
class OmeAsyncMemoryStore
Bases: BaseMemory
Async LlamaIndex BaseMemory backed by OmeAsyncClient.
Methods
__init__
def __init__(self, *, client: OmeAsyncClient, session_id: str, workspace_id: str | None = None) -> Noneaget (async)
async def aget(self, input: str | None = None, **kwargs: Any) -> list[ChatMessage]aget_all (async)
async def aget_all(self) -> list[ChatMessage]aput (async)
async def aput(self, message: ChatMessage) -> Noneaput_messages (async)
async def aput_messages(self, messages: list[ChatMessage]) -> Noneareset (async)
async def areset(self) -> Noneaset (async)
async def aset(self, messages: list[ChatMessage]) -> Noneclass_name @classmethod
def class_name(cls) -> strfrom_defaults @classmethod
def from_defaults(cls, **kwargs: Any) -> OmeAsyncMemoryStoreget
def get(self, input: str | None = None, **kwargs: Any) -> list[ChatMessage]get_all
def get_all(self) -> list[ChatMessage]put
def put(self, message: ChatMessage) -> Nonereset
def reset(self) -> Noneset
def set(self, messages: list[ChatMessage]) -> Noneworkspace_id @property
def workspace_id(self) -> strwritten_claim_ids @property
def written_claim_ids(self) -> tuple[str, ...]class OmeMemoryStore
Bases: BaseMemory
LlamaIndex BaseMemory implementation backed by OME claims.
Args:
client: a :class:osyra_ome.OmeClient (sync).
session_id: identifier for the conversation thread; encoded
into subject_id of every emitted Claim.
workspace_id: OME workspace UUID-like id; if omitted, defers
to the workspace_id bound on the wrapped client.
BaseMemory abstract methods covered: from_defaults, put, get, get_all, set, reset
Methods
__init__
def __init__(self, *, client: OmeClient, session_id: str, workspace_id: str | None = None) -> Noneclass_name @classmethod
def class_name(cls) -> strfrom_defaults @classmethod
def from_defaults(cls, **kwargs: Any) -> OmeMemoryStoreget
def get(self, input: str | None = None, **kwargs: Any) -> list[ChatMessage]Return the full conversation history.
LlamaIndex BaseMemory passes the latest user input on ``get(input=...)`` so memory implementations can scope the response. v0.1 surface ignores ``input`` and returns the entire history (matches the LlamaIndex ``ChatMemoryBuffer`` default).
get_all
def get_all(self) -> list[ChatMessage]Return the full ordered conversation.
put
def put(self, message: ChatMessage) -> NonePersist a single message as an OME Claim.
reset
def reset(self) -> NoneForget the in-process buffer.
Does NOT tombstone the underlying OME claims.
session_id @property
def session_id(self) -> strset
def set(self, messages: list[ChatMessage]) -> NoneReplace the conversation entirely.
v0.1 surface: writes each new message as a new Claim and clears the in-process buffer of prior claim ids — the old claims are NOT tombstoned (use v0.2 ``client.memory.tombstone`` for cryptographic erasure).
workspace_id @property
def workspace_id(self) -> strwritten_claim_ids @property
def written_claim_ids(self) -> tuple[str, ...]