Skip to content

SharjeelAbbas014/aletheia-python-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Aletheia Python SDK

This package wraps the local Temporal Memory engine binary and the remote HTTP API with the same interface.

Local-first flow

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")

Cloud flow

from aletheia import AletheiaClient

client = AletheiaClient.from_cloud(
    "http://143.110.246.15:3000",
    api_key="XXX1111AAA",
)

Binary resolution

from_local() and ensure_engine() resolve the engine in this order:

  1. Explicit binary_path
  2. ALETHEIA_ENGINE_BINARY or TEMPORAL_MEMORY_ENGINE_BINARY
  3. Repo-local target/release/temporal_memory or target/debug/temporal_memory
  4. Cached binary in ALETHEIA_ENGINE_CACHE_DIR
  5. Manifest download from ALETHEIA_ENGINE_MANIFEST_URL

Sidecar environment

The SDK starts the Rust engine with:

  • TEMPORAL_MEMORY_HOST
  • TEMPORAL_MEMORY_PORT
  • TEMPORAL_MEMORY_DATA_DIR
  • TEMPORAL_MEMORY_API_KEY when a local key is configured

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages