Observed since 20 Oct, 20:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Fail-closed LLM gateway with durable signed forensic evidence and bounded response enrichment
AI Governance and Cryptographic Evidence Gateway
Aegis Latent Core commits signed, hash-linked evidence of every governed AI call — before the response reaches the caller — and issues a portable proof that a third party verifies without trusting the gateway, us, or you.
Every load-bearing claim in this file carries a locator and a stated boundary; the gates that enforce that discipline run in CI.
Current release:
v5.0.1— the latest published release (the checked-out source isv5.0.2, an Apache-2.0 source target that is not published), published 2026-09-24 on every surface (PyPIaegis-latent-core5.0.1followed on 2026-09-26), read back the same day (Release Status §1.0a). The Sigstore-signed tag passesgitsign verify-tag; the GitHub Release carries 31 assets and all 15 files listed in itsSHA256SUMSre-hash to their digests; PyPIaegis-latent-sdk5.0.1and npmaegis-latent-sdk5.0.1are byte-identical to the release assets of the same name; and the GHCR gateway and dashboard images passcosign verifyand their build-provenance attestations verify, each against the exact publishing workflow identity. The gateway distributionaegis-latent-corereached PyPI at5.0.1on 2026-09-26 (run36224961909ofpublish_pypi_gateway.yml, read back 2026-09-29, Release Status §1.0b);pip install aegis-latent-coreresolves to5.0.1, and its wheel and sdist match the release assets byte for byte. The GHCR images and the Release assets remain available. The previous release,v5.0.0, was published 2026-09-16 on the same surfaces (§1.0). There is no4.2.0; the number was skipped.First published version with the gateway on PyPI:
v4.1.2, read back on 2026-09-04 — signed annotated tag, GitHub Release with 31 assets, PyPIaegis-latent-core4.1.2, PyPIaegis-latent-sdk4.1.2, npmaegis-latent-sdk4.1.2, and GHCR gateway and dashboard images.4.1.2is the first version installable from PyPI asaegis-latent-core; before it the gateway came from source or GHCR only. The npm version list skips4.1.1, whose publish step failed. Av4.1.0release object also exists but was created outside the pipeline and carries no assets; ignore it. The two4.1.2PyPI gateway artifacts are byte-different from the release assets of the same name — same content, different build host — soSHA256SUMSdoes not cover those downloads; the5.0.1PyPI gateway artifacts match it. See Release Status for provenance and readback.
Your AI decisions are logged to a database your administrators can edit. When someone asks what the model was told six months ago, you answer from records the interested party could have changed.
In a regulated industry that is not a paperwork problem — it is an existential one. The regulator, the court and the auditor each ask the same question, and "our logs are probably fine" is not an answer they accept:
verify_integrity() detects tampering on read; tampering is detected, not prevented — see the boundaries below.CLM-039 is LEGAL-REVIEW-REQUIRED).→ Prove it yourself — twelve lines of Python, no call to our servers, three cases of which two must fail.
pip install aegis-latent-sdk aegis-latent-core # verifier + gateway, both 5.0.1 on PyPI python tools/sales/prove_it/prove_it.py --demo # accepts one record, rejects two forgeries python -m examples.demo # gateway + mock upstream, tamper detectedBoth commands run from a checkout of this repository; what each one shows and does not show.
caller ──────────► Aegis gateway ──────────────────────────► upstream provider
│ admission: auth · scope · bounds
│ WAF · rate limiting · session checks
│
│ (policy passed) forward
│ ◄─────────────── response ─────────
│
│ redact → hash → sign → WAL append + fsync → MMR leaf
│ (refused requests: the refusal is committed to the
│ same signed chain before the error returns)
│
caller ◄────────── response + X-Aegis-Evidence-Status
+ X-Aegis-Request-ID + X-Aegis-MMR-* proof headers
Non-streaming. The evidence record is committed before the response is observable by the caller.
Streaming. Sanitized events are emitted incrementally through a bounded, byte-accounted queue while evidence status reads pending-terminal. One exact-byte terminal summary is committed, and only then is the terminal marker emitted. If that commit fails, the marker is withheld.
Fail-closed. No signer, no distributed limiter, or a ledger that fails to replay means no service — rather than quietly serving unevidenced traffic.
Details: Architecture · Failure Semantics
Real measurements from the retained 2026-09-24 artifact (evidence/benchmarks/benchmarks_5.0.1_2026-09-24.json), taken against real backends — a real WAL fsync per commit — on one shared, unpinned four-CPU x86_64 container (Linux, CPython 3.11.15). Reproduce with scripts/run_benchmarks_5.0.1.py --json.
| Metric | Result (2026-09-24) | What it measures |
|---|---|---|
| Commit latency (P99) | 1.22 ms (p50 0.62 · p95 1.00 · max 4.18 ms, n = 1,000) | MMR append + HMAC sign + one real WAL fsync, per commit |
| Throughput | 1,727 commits/s at 10 threads · 1,630/s at 50 · 1,482/s at 100 | One process, one WAL, one writer — does not scale with threads, by design (AD-16) |
| Memory | +20.1 MB RSS for 1,000 concurrent in-process SSE streams (20 events each) | Bounded stream ingestion, not network or durable-WAL cost |
| Backpressure (current) | p50 33.545 ms · p99 51.875 ms; 2,500 offered → 2,500 durable, zero failures | 2 ms injected fsync delay; superseded pre-group-commit run was p99 836.35 ms; the earlier 10,000-record run at p99 1,189.89 ms is retracted (UC-018) — no artifact in this tree produces it |
| Ed25519 sign / verify | 40.5 µs/op · 128.6 µs/op (cryptography, RFC 8032) | Device-order-of-magnitude timing on the recorded host |
| ML-DSA-65 sign / verify | 173.0 µs/op · 62.4 µs/op (aegis_rust, FIPS 204) | A latency sample only — the constant-time claim remains blocked (REG-041, UC-012) |
Measured suite (dated records; counts move as tests are added — run pytest -q on the commit you evaluate): 7,444 passed / 39 skipped / 0 failed (pytest -n auto -q) and 7,449 passed / 34 skipped / 0 failed (CI's exact serial Forensic command), both 2026-09-24 on the checked-out 5.0.1 tree. Statement coverage: 91.30% (2026-09-24; 91.25% on a later same-day run). The floor CI enforces is 65% (--cov-fail-under=65, .github/workflows/ci.yml); the 90% figure was a one-off mission floor, met at 90.07% on 2026-09-21 (REG-D36) and not enforced.
None of this is a capacity claim. Offered load is not accepted throughput. The absolute latencies are properties of one shared container; what transfers is the shape — per-commit cost stopped growing with chain length — not the numbers. Re-run the harnesses in your own environment before planning against any of them.
Evidence Index · Benchmark Method · Benchmark Record
Three steps, copy-pasteable. Honest channel note first: pip install aegis-latent-core installs 5.0.1 (read back 2026-09-29, CLM-113); at 5.0.0 the gateway was never on PyPI (UC-047, kept as history). You can also use this repository, the GHCR image ghcr.io/juanlunaia/aegis-latent-core:5.0.1, or the wheel attached to the v5.0.1 GitHub Release.
Step 1 — get the source:
git clone https://github.com/JuanLunaIA/aegis-latent-core.git && cd aegis-latent-core
python3 -m venv .venv && . .venv/bin/activate
python -m pip install --require-hashes -r requirements.lock
python -m pip install --no-deps -e .
Step 2 — run it (isolated local evaluation, against a mock upstream on 127.0.0.1:9999):
export AEGIS_SECURITY_ENFORCEMENT_MODE=development
export AEGIS_DEBUG_MODE=true
export AEGIS_AUTH_DISABLED=true
export AEGIS_BACKEND_URL=http://127.0.0.1:9999
aegis
Development mode disables the controls that make records meaningful — it is for reading the API, not for evaluating security. For a hardened single node see Deployment Profiles; to run one on Azure with a generated kit, see the Azure Quickstart. Container alternative: docker compose up --build (evaluation profile, bound to 127.0.0.1).
Step 3 — make a governed call and read the evidence headers:
curl -sS http://127.0.0.1:8080/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'x-session-id: demo-session' \
-d '{"messages":[{"role":"user","content":"Hello, Aegis."}]}'
curl -sS -D - -o /dev/null http://127.0.0.1:8080/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'x-session-id: demo-session' \
-d '{"messages":[{"role":"user","content":"Hello, Aegis."}]}' \
| grep -i '^x-aegis'
Expect X-Aegis-Evidence-Status, X-Aegis-Request-ID and the X-Aegis-MMR-* proof headers; X-Aegis-Proof-Status is sent on streaming responses only (pending-terminal).
More: Developer Quickstart · Usage Examples
A third party verifies a log entry without trusting the Aegis server — offline, from the exported bundle, against a key and root obtained out of band:
pip install "aegis-latent-sdk[verify]"
aegis-sdk verify export.zip --public-key operator-ed25519.pub.pem
Exit 0 only when nothing failed and the manifest signature verified against a key you supplied. Exit 3 (INCOMPLETE) means the digests are internally consistent but the signature was not checked. The same check in library form:
from aegis_sdk.proof import InclusionProof, verify_inclusion_hash
proof = InclusionProof.from_mapping(record["mmr_proof"])
verify_inclusion_hash(record["mmr_leaf_hash"], proof, trusted_root)
Three cases, and two of them must fail:
| Case | Result |
|---|---|
| Genuine record against the root it belongs to | INCLUDED |
| One altered byte in the record, same proof and root | NOT INCLUDED |
| Genuine record against a root you did not obtain independently | NOT INCLUDED |
The third case is the one to understand first: a root supplied by the same gateway that produced the proof establishes internal consistency and nothing more (CLM-044). Getting the root by a path the discloser does not control is your design problem, and no software solves it for you. A passing verification establishes inclusion under the root you supplied — not that the response was correct, not who produced the record, and not that nothing was omitted. Full worked transcript with the failing cases: docs/PROVE_IT.md
Release assets carry a digest, and checking one needs no checkout and no cooperation from this project:
curl -fsSL -O https://github.com/juanlunaia/aegis-latent-core/releases/download/v5.0.1/SHA256SUMS
# then, for each artifact you downloaded:
curl -fsSL -O https://github.com/juanlunaia/aegis-latent-core/releases/download/v5.0.1/<artifact-name>
sha256sum -c SHA256SUMS --ignore-missing
Two things that snippet does not establish. It shows the bytes match the manifest; it does not show who built them — an OCI signature (cosign verify) and a build attestation (gh attestation verify) are separate checks against separate infrastructure. And it covers the release assets only: the PyPI wheels for aegis-latent-core are rebuilt from the same source on a different build host, so their bytes differ from the release assets of the same name and SHA256SUMS does not cover them (see docs/RELEASE_STATUS.md).
python scripts/verify_release_readback.py --tag v5.0.1 --verify-assets automates the whole readback — the GitHub Release, the SHA256SUMS sweep, the PyPI and npm versions, and the GHCR manifest digests — and prints NOT_EXECUTED, with the reason, for anything it could not check from where it ran. This block is emitted by that same tool, so the documented commands cannot drift from it.
manifest.json over DAG-CBOR, content-addressed with CIDv1, plus a technical PDF and an embedded VERIFY.sh. Non-finite numbers are rejected fail-closed rather than silently normalized.aegis-mmr-inclusion-v2 scheme — RFC 6962-style domain separation, so a leaf payload cannot hash to an interior node (CLM-064). Existing v1 chains keep verifying unchanged; a scheme mismatch faults instead of replaying to a different root.UC-068). No cross-replica global ordering. No guaranteed prompt-injection prevention.SECURITY.md · Threat Model · Compliance Mapping · Boundaries
Aegis Latent Core is developed by one maintainer. A donation is voluntary: it buys no licence, support, feature or influence, and it is not tax-deductible. The source is licensed under Apache-2.0 for every use, commercial or not (COMMERCIAL.md).
Copyright © 2026 Juan Luna. Licensed under the Apache License, Version 2.0 from 5.0.2 (releases up to 5.0.1 keep the AGPLv3-or-commercial terms they were published under; see docs/legal/LICENSE_TRANSITION_5.0.2.md). Full documentation index: docs/INDEX.md
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 5.0.2 | 1 Oct 2026 | 45 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 20:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:77f69667fdea0642c36370dc89506a7d68cacc04ef404f3438def57c126966a2