Skip to main content

Python SDK for AletheiaDB: The cognitive memory engine for AI agents with fact supersession, knowledge graphs, and temporal truth retrieval.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aletheiadb-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aletheiadb-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file aletheiadb-0.1.1.tar.gz.

File metadata

  • Download URL: aletheiadb-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aletheiadb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9918ece86fc50bca0cb0f06d948163741f8a87183097be73ddd6b91d8375cdf1
MD5 7aabf4dca8adcbbed4886c4c4895d845
BLAKE2b-256 8985c9b92033f9b0cac679ffbe3d860aed936196a21269c2b835009cf0d4afb8

See more details on using hashes here.

File details

Details for the file aletheiadb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aletheiadb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aletheiadb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7eb601554c5c971d01865d177a877d609192822c1ea7839b5a4363608c0b3df
MD5 34d4fd3cfd689497d4d1d418db063bc0
BLAKE2b-256 643d84fd748b85726c67d41726861a8f69dfed3123bb8b79665e523dca300dc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page