HTTP clients¶
HolographicClient and AsyncHolographicClient talk to hms-server, which stores vectors you supply and answers queries by exact cosine.
client ¶
HolographicError ¶
Bases: HTTPStatusError
The service rejected a request with its documented {"error": {"code", "message"}} body.
status_code, code and message come from that response. It is still an httpx.HTTPStatusError, so code that catches that, such as the importer's retries, keeps working.
VectorMask ¶
Keyed signed permutation of embedding coordinates.
Applied client-side so the server can rank vectors without the original coordinates. Inner products, norms and cosine similarity are preserved exactly, which also means the server learns every pairwise similarity. This is obfuscation, not encryption: known plain/masked pairs reveal the key material for the coordinates they cover.
HolographicClient ¶
Core sync HTTP client for communicating with a Holographic Memory backend.
client instance-attribute ¶
memory property ¶
memory: MemoryClient
Agent memory (remember, recall, forget, explain) over this client's connection.
__init__ ¶
__init__(url: str = 'http://localhost:8080', zero_trust_key: str = '', api_key: Optional[str] = None, tenant_id: Optional[str] = None, timeout: int = 30, mask_salt: Optional[bytes] = None, transport: Optional[BaseTransport] = None)
encrypt_vector ¶
Mask an embedding when a zero_trust_key is configured. Not encryption; see VectorMask.
add_documents ¶
Batch upload documents to the holographic store.
query ¶
query(query_vector: List[float], top_k: int = 3, filter: Optional[Dict[str, Any]] = None) -> Dict[str, Any]
AsyncHolographicClient ¶
Core async HTTP client for communicating with a Holographic Memory backend.
client instance-attribute ¶
memory property ¶
memory: AsyncMemoryClient
Agent memory (remember, recall, forget, explain) over this client's connection.
__init__ ¶
__init__(url: str = 'http://localhost:8080', zero_trust_key: str = '', api_key: Optional[str] = None, tenant_id: Optional[str] = None, timeout: int = 30, mask_salt: Optional[bytes] = None, transport: Optional[AsyncBaseTransport] = None)
encrypt_vector ¶
Mask an embedding when a zero_trust_key is configured. Not encryption; see VectorMask.
query async ¶
query(query_vector: List[float], top_k: int = 3, filter: Optional[Dict[str, Any]] = None) -> Dict[str, Any]