Skip to main content

khotem

Thin zero-dependency client for KHOTEM — cryptographic witness for AI agents (https://khotem.com). Paid per call via x402 (USDC on Base). Python ≥ 3.9, stdlib only.

This package never asks for seeds or private keys. Paid calls are signed/settled by your wallet through the x402 flow — see https://khotem.com/docs/pay-x402.

Install

pip install khotem

Free surfaces ($0, no key)

import khotem

khotem.status()          # service pulse: seals, paid_calls, ledger size
khotem.catalog()         # x402 catalog (endpoints + prices)
khotem.receipt_check(ref)  # is this receipt/ref in the KHOTEM ledger? + Base on-chain fallback
khotem.anchor()          # daily Bitcoin anchor (OpenTimestamps) of the ledger chain tip

Neutral witness (halo-record compatible)

Works with the open-source halo-record client — point it at https://khotem.com/api/witness with any bearer key:

import khotem, hashlib

receipt = khotem.witness_anchor(
    key="your-witness-key",          # any string 8..128 chars; first use binds it to your subject+chain_root
    subject="my-agent-run",
    count=1,
    head=hashlib.sha256(b"head").hexdigest(),
    chain_root=hashlib.sha256(b"root").hexdigest(),
)

# offline verification, no network, no deps:
assert khotem.verify_witness_receipt(receipt) is True

# fetch checkpoints back (CORS-open):
cps = khotem.witness_checkpoints(subject="my-agent-run")

Every witness receipt is Ed25519-signed (public key: khotem.witness_pubkey()) and the witness log rides the daily Bitcoin anchor — khotem.anchor().

Paid calls

resp = khotem.call("/api/seal", method="POST", body={"data": "..."})
# HTTP 402 -> x402 payment required; settle with your wallet, retry with X-Payment.

Security

Metadata

Release files for khotem 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for khotem 0.2.0
File Size Uploaded Provenance Actions
khotem-0.2.0.tar.gz 5.1 kB Without provenance Details for khotem-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for khotem 0.2.0
File Interpreter ABI Platform Actions
khotem-0.2.0-py3-none-any.whl Python 3 none any Details for khotem-0.2.0-py3-none-any.whl

Total release size: 10.5 kB

Release files / khotem-0.2.0.tar.gz

Download URL khotem-0.2.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f61acb7a959f602e18721ccc214ea6f632b6f37eb97d18e813fe8de6363fa532
BLAKE2b-256 checksum
How to use checksums
4c6f7188495ffecf01c8217bb8a8d77b8c385cf4aa55a8507e8e66cf528e3dcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / khotem-0.2.0-py3-none-any.whl

Download URL khotem-0.2.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cf86d08e6a57d78909240009d38331166ba609bf9af7474a56c8bb6e91bbf37
BLAKE2b-256 checksum
How to use checksums
8e6a0bfbfbcb11b6d4da42ec5a384acabc322a0a41d469fc876e7a3b80796a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for khotem 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page