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

Verify us without trusting us (v1.0.0)

Every paid response carries an Ed25519 receipt you can verify offline — zero dependencies: spec + verifier + a real paid test vector at https://khotem.com/verifier/. Ledger tip is anchored to Bitcoin daily (https://khotem.com/api/anchor). On-chain identity: ERC-8004 agent #68748 (Base). Machine manifest: https://khotem.com/.well-known/ucp.

Metadata

Release files for khotem 1.0.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 1.0.0
File Size Uploaded Provenance Actions
khotem-1.0.0.tar.gz 5.3 kB Without provenance Details for khotem-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.9 kB

Release files / khotem-1.0.0.tar.gz

Download URL khotem-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
12b2cb323a2272feabcbe5add929bbb33ea06407b5d939cad1a37905f6644fb0
BLAKE2b-256 checksum
How to use checksums
300421fe606ac8b785e346252b6c807cd486a66e05a58833a6f47ad9b806b5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

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

Download URL khotem-1.0.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e607fd9af05880111a2803501e481357ec85eb5cc6a8c67ff82a8a7aee7e1617
BLAKE2b-256 checksum
How to use checksums
71d0f9f0056c7c1dde1c9c9743c7f5894ecd271ae4db8c712126530416c5d3f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for khotem 1.0.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