This package wraps the local Temporal Memory engine binary and the remote HTTP API with the same interface.
from aletheia import AletheiaClient
client = AletheiaClient.from_local(auto_start=True)
client.ingest(entity_id="user-123", text="I prefer pourover coffee.")
hits = client.query("What coffee do I prefer?", entity_id="user-123")from aletheia import AletheiaClient
client = AletheiaClient.from_cloud(
"http://143.110.246.15:3000",
api_key="XXX1111AAA",
)from_local() and ensure_engine() resolve the engine in this order:
- Explicit
binary_path ALETHEIA_ENGINE_BINARYorTEMPORAL_MEMORY_ENGINE_BINARY- Repo-local
target/release/temporal_memoryortarget/debug/temporal_memory - Cached binary in
ALETHEIA_ENGINE_CACHE_DIR - Manifest download from
ALETHEIA_ENGINE_MANIFEST_URL
The SDK starts the Rust engine with:
TEMPORAL_MEMORY_HOSTTEMPORAL_MEMORY_PORTTEMPORAL_MEMORY_DATA_DIRTEMPORAL_MEMORY_API_KEYwhen a local key is configured