POST /api/v1/context/retrieve
Core Concepts
Persistent Memory
Long-term storage referenced via memory_id . Backed by the Unified 8-Operator Surface .
Context
Assembled data passed via context object. Token-budget-aware context assembly for LLM system prompts via POST /api/v1/context/retrieve .
Users & Sessions
Scoped via user_id identifiers. Enterprise multi-tenancy enforced via strict namespace isolation ( X-Namespace-Prefix header) and automated PHI/PII privacy redaction.
Retrieval
Query via client.search() . Hybrid search engine combining dense vector similarity (HNSW via pgvector ) and BM25 trigram full-text search, fused using Reciprocal Rank Fusion ( RRF_K=30 ).
Knowledge
Structured domain data accessible through knowledge.query() . PiyGraph Knowledge Graph tracking real-world validity ( valid_at ) separately from system recording time ( system_at ).

