Skip to main content

Thin Python client for the Outhad ContextKit cloud — paywalled by API key minted at https://contextkit.outhad.com

Project description

outhad-contextkit-sdk

Thin Python client for the Outhad ContextKit cloud — long-term memory for AI agents, with multimodal + temporal-causal recall, personalised retrieval, and tenant isolation built in.

This package ships client only. There is no local memory engine, no vector store driver, no LLM provider. Calls go to the Outhad ContextKit cloud where the heavy lifting happens — billed against the API key you mint at https://contextkit.outhad.com.

Install

pip install outhad-contextkit-sdk

Quickstart

from outhad_contextkit_sdk import MemoryClient

client = MemoryClient(api_key="ock_live_...")  # or set OUTHAD_CONTEXTKIT_API_KEY

client.add(
    messages=[
        {"role": "user", "content": "Hi, my name is Alice and I love sushi."},
    ],
    user_id="alice",
)

hits = client.search(query="What food does Alice like?", user_id="alice")
for hit in hits["results"]:
    print(hit["score"], hit["memory"])

Get an API key

  1. Sign up at https://contextkit.outhad.com.
  2. Open the dashboard → API keys.
  3. Click Create key, copy the one-shot secret (looks like ock_live_<8-char-prefix>_<32-byte-secret>).
  4. Either pass it as MemoryClient(api_key=…) or export it in your shell as OUTHAD_CONTEXTKIT_API_KEY.

Auth header

The SDK sends Authorization: Token <api-key> on every request. The cloud dispatcher also accepts Bearer and X-API-Key if you prefer to hit the HTTP API directly (e.g. from curl).

Host resolution

Resolution order Default
host= constructor arg (none)
OUTHAD_CONTEXTKIT_HOST env var (none)
Production default https://contextkit.outhad.com
Dev fallback (transparent retry on connection error) http://localhost:8000

When the production default is unreachable (DNS failure / connection refused) the client transparently retries against http://localhost:8000 and pins itself there for the rest of the session — useful while you are working against make cloud-up locally. The fallback is disabled when you pass host= or set OUTHAD_CONTEXTKIT_HOST explicitly.

Async

from outhad_contextkit_sdk import AsyncMemoryClient

async def main():
    async with AsyncMemoryClient(api_key="ock_live_...") as client:
        await client.add(
            messages=[{"role": "user", "content": "I prefer dark mode."}],
            user_id="alice",
        )

API surface

  • add(messages, *, user_id, agent_id, run_id, metadata, infer)
  • get_all(*, user_id, agent_id, run_id, limit)
  • get(memory_id)
  • search(query, *, user_id, agent_id, run_id, filters, limit)
  • update(memory_id, *, text)
  • history(memory_id)
  • delete(memory_id)
  • delete_all(*, user_id, agent_id, run_id)

For dashboard-style operations the same client also exposes list_api_keys(), create_api_key(), revoke_api_key() — those require a Clerk session JWT and are intended for interactive tooling.

License

Apache-2.0.

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

outhad_contextkit_sdk-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

outhad_contextkit_sdk-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file outhad_contextkit_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: outhad_contextkit_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for outhad_contextkit_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 95f1cff08cc3aa40f360753825d095b671423a4d273fa3e79d2642e3849f370b
MD5 eb038680148d9b702268437472bd13ba
BLAKE2b-256 75fbfbb37a24dd0ba280eeb4ed2ce0d30032a6f8d2bb7b8f883985c060af3083

See more details on using hashes here.

File details

Details for the file outhad_contextkit_sdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for outhad_contextkit_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0761c7cf1a860612cfbb20468f37a1ebd2bd8034c1e9d83d67546a1c9c5a5a6b
MD5 2dfe6eedf1d5e48bab6b3990497826ea
BLAKE2b-256 e3f8a436cedb83924604a3ee273824013737176bd26aa9f23b1cc91b899ecb53

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