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"])
Switching the LLM at runtime
The default model is whatever the project has saved in Dashboard → Settings. You can override it on a single call without touching the project default:
client.add(
messages=[{"role": "user", "content": "I love sushi."}],
user_id="alice",
llm={"provider": "anthropic", "model": "claude-haiku-4-5-20251001"},
)
# Same override shape works on search:
client.search(
query="What food do I like?",
user_id="alice",
llm={"provider": "anthropic", "model": "claude-haiku-4-5-20251001"},
)
Pass api_key inside the dict to bring your own upstream key for that
single call (never persisted server-side):
client.add(
messages=[...],
user_id="alice",
llm={
"provider": "anthropic",
"model": "claude-haiku-4-5-20251001",
"api_key": "sk-ant-…",
},
)
Override the embedder the same way with embedder={"provider": "...", "model": "...", "api_key": "..."}.
Without overrides every call uses the project's saved defaults — set those once in the dashboard and forget about them.
Get an API key
- Sign up at https://contextkit.outhad.com.
- Open the dashboard → API keys.
- Click Create key, copy the one-shot secret (looks like
ock_live_<8-char-prefix>_<32-byte-secret>). - Either pass it as
MemoryClient(api_key=…)or export it in your shell asOUTHAD_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, llm, embedder)get_all(*, user_id, agent_id, run_id, limit)get(memory_id)search(query, *, user_id, agent_id, run_id, filters, limit, llm, embedder)update(memory_id, *, text)history(memory_id)delete(memory_id)delete_all(*, user_id, agent_id, run_id)
llm / embedder (optional, since 1.1.0) — per-request model override
(see Switching the LLM at runtime above).
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.
Metadata
Release files for outhad-contextkit-sdk 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| outhad_contextkit_sdk-1.9.0.tar.gz | 22.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| outhad_contextkit_sdk-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.1 kB
Release files / outhad_contextkit_sdk-1.9.0.tar.gz
| Download URL | outhad_contextkit_sdk-1.9.0.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1e1fa6b62c9233aeb8c75722572174d4e7a4756fe27923fae9b158a373237a3
|
|
BLAKE2b-256 checksum How to use checksums |
77456a2b975a2211b5b4a2b043998cb5c664511932c0179682279dd581d61618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / outhad_contextkit_sdk-1.9.0-py3-none-any.whl
| Download URL | outhad_contextkit_sdk-1.9.0-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6111a62b784c1947cce85565fca6df70727743f945c11688a67541970f67d69
|
|
BLAKE2b-256 checksum How to use checksums |
34ce9cb263860b622b8c177103e0f674dfe0952b419b38bff386ac613fd5bb36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|