szl-ouroboros

Bounded agent-loop trace and loop-tax accounting as a pure-Python (noarch) kernel, published from GitHub szl-holdings/szl-ouroboros by its hf-kernel-publish workflow. GitHub is the source of truth; this repository is written only by that workflow.

Scope. This is not a trained model and holds no weights. It is a stdlib-only governance kernel that reconstructs the a11oy agent-loop trace and its loop-tax split from a run's provider-attempt windows. modelMs and peakAttemptMs are MEASURED upstream; overheadMs, serializationTaxMs and deadHopMs are DERIVED arithmetic on those measurements. serializationTaxMs is a counterfactual, never a realized saving. Lambda is not touched and stays Conjecture 1 (open).

Load it

# pip install "kernels>=0.17.2" torch
from kernels import get_kernel

ouroboros = get_kernel("SZLHOLDINGS/szl-ouroboros", version=1, trust_remote_code=True)

attempts = [
    {"provider": "sovereign", "model": "own-metal", "ok": False, "latency_ms": 220, "node": "tower"},
    {"provider": "sovereign", "model": "own-metal", "ok": True, "latency_ms": 900, "node": "laptop"},
]
trace = ouroboros.build_loop_trace(attempts, wall_ms=1300, exit="converged", max_budget=4)
print(trace["modelMs"], trace["overheadMs"], trace["deadHopMs"])  # 1120.0 180.0 220.0
print(ouroboros.explain(trace["labels"]))  # per-field MEASURED/DERIVED provenance
  • version=1 resolves the v1 branch, the stable API channel. It is republished from GitHub by the publish workflow. The kernels library refuses a call that names neither a version nor a revision.
  • trust_remote_code is required: SZLHOLDINGS is not a trusted kernel publisher on the Hub. The narrowest form is trust_remote_code=["SZLHOLDINGS/szl-ouroboros"].
  • CPU hosts load build/torch-cpu; CUDA and other hosts load build/torch-universal. Both variants carry identical code, built from the same GitHub commit. The kernel itself uses no tensors.

Pin an exact build (production)

from huggingface_hub import HfApi
from kernels import get_kernel

refs = HfApi().list_repo_refs("SZLHOLDINGS/szl-ouroboros", repo_type="kernel")
pin = next(b.target_commit for b in refs.branches if b.name == "v1")
ouroboros = get_kernel("SZLHOLDINGS/szl-ouroboros", revision=pin, trust_remote_code=["SZLHOLDINGS/szl-ouroboros"])

Record pin (a commit of this kernel repository) in your lockfile, after reviewing that revision: trust_remote_code executes its Python. SZL_KERNEL_SOURCE.json in this repository names the GitHub commit each build came from. Commits of the model repository https://huggingface.co/SZLHOLDINGS/szl-ouroboros are not kernel revisions and do not resolve here.

Doctrine v11. Lambda = Conjecture 1, advisory and never a theorem. Apache-2.0. Owner: Stephen Lutar / SZL Holdings.

Downloads last month
-
kernel
szl-holdings
governance
ouroboros
loop-tax
provenance
10.5281/zenodo.19944926
apache-2.0