osyra_ome.adapters.llamaindex
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 adapter — register OME as a memory store + vector store.
Exports:
- :class:`OmeMemoryStore` — concrete ``BaseMemory`` impl writing each message to OME as a Claim.
- :class:`OmeAsyncMemoryStore` — async variant for OmeAsyncClient.
- :class:`OmeVectorStore` — VectorStore audit-decorator wrapping any
BasePydanticVectorStore(Chroma/FAISS/Pinecone/Postgres).
Optional install::
pip install 'osyra-ome[llamaindex]'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, ...]class OmeVectorStore
Bases: BasePydanticVectorStore
LlamaIndex VectorStore audit-decorator over a delegate index.
Args:
client: OmeClient bound to the destination workspace.
delegate: any LlamaIndex :class:BasePydanticVectorStore.
workspace_id: OME workspace identifier. If omitted, defers
to the workspace_id bound on the wrapped client.
collection: logical collection name; encoded into
subject_id of every emitted Claim
(did:web:collection.osyra.ai/<collection>).
BasePydanticVectorStore abstract methods covered: add, delete, query, client
Attributes
| Name | Type | Default |
| --- | --- | --- |
| is_embedding_query | bool | True |
| stores_text | bool | True |
Methods
__init__
def __init__(self, *, client: OmeClient, delegate: BasePydanticVectorStore, workspace_id: str | None = None, collection: str = 'default') -> Noneadd
def add(self, nodes: Sequence[BaseNode], **kwargs: Any) -> list[str]Persist nodes to the delegate AND to OME as Claims.
class_name @classmethod
def class_name(cls) -> strclient @property
def client(self) -> AnyUnderlying delegate's client handle (per abstract).
delegate @property
def delegate(self) -> BasePydanticVectorStoredelete
def delete(self, ref_doc_id: str, **delete_kwargs: Any) -> Nonequery
def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResultworkspace_id @property
def workspace_id(self) -> strwritten_claim_ids @property
def written_claim_ids(self) -> tuple[str, ...]