The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Sigma Gate listing page.
Deterministic trust layer for AI/agent output. One call → one verdict. No model, no API key, no network.
The other four Spektre repos are routing protocols — they move value, capability, promises, and identity
across networks. σ-gate is not a routing protocol, and does not pretend to be one. It is the suite's
deterministic trust verdict: the gate that sits at the edge of any pipeline and answers, in ~85µs and
identically every time, is this output safe to ship? LLM-as-judge guards are slow, burn a model call per
check, and silently degrade under rate-limits. But the highest-frequency risks — a leaked AKIA… key, a
Luhn-valid card number, an "ignore all previous instructions" — are structurally detectable: you don't
need a model, you need a gate that gives the same answer every time. That determinism is the
primitive. σ = declared − realized: a block is always nameable (secret[high]: github_pat), never an
opaque float, so what the gate declares unsafe is exactly what it refuses to realize. guard is that gate.
Block a bad output:
Pass a clean output through:
| Dimension | What it catches |
|---|---|
| secret | Leaked credentials — 20+ providers (AWS, GitHub, Stripe, GCP, …), entropy-ranked |
| injection | Prompt-injection and jailbreak patterns — structural, not heuristic |
| pii | Email, phone, card (Luhn-verified), SSN, IBAN, IP — compliance-class detection |
Every dimension runs independently. A combined hit fires all three:
Zero dependencies, pure stdlib, Python 3.9+.
No install is even required to import — from guard import guard works from the cloned directory.
Inline gate in any pipeline:
CLI — pipe any output through:
Self-test — prove every threat class fires:
Tune the threshold via env var (default: medium):
σ-gate ships a zero-dependency MCP server — give any agent
(Claude Code, Claude Desktop, Cursor, Cline) a deterministic guard tool it can call before shipping
output. No model, no key, no token cost.
Claude Code:
Claude Desktop (claude_desktop_config.json):
Exposes two tools: guard(text, …) → the ship/block verdict, and guard_selftest() → proof every
threat class fires. Pure stdlib stdio JSON-RPC.
σ-gate also runs as a hosted remote MCP server (scale-to-zero), listed in the
official MCP Registry as io.github.spektre-labs/sigma-gate.
Connect with zero local setup:
MCP clients that browse the registry discover it automatically.
| Open core (this repo) | Hosted σ scoring | |
|---|---|---|
| What | Deterministic gate: secret + injection + PII | Coherence / hallucination σ-scoring on a hot path |
| Latency | ~85µs | Network round-trip |
| Dependencies | Zero | None on your side |
| Cost | Free, always | Pay-per-call via x402 — no signup |
| Offline | Yes | No |
| Model | None | Optional |
The open core handles what models cannot do reliably — structural pattern detection with identical verdicts on identical inputs. The hosted layer adds probabilistic coherence scoring for the cases where structure alone is insufficient.
Hosted endpoint:
severity: "error" — the call does not silently pass.REAL — shipped, deterministic, deployed. CI green, 7/7 tests passing, zero dependencies; live as a local MCP tool and as a hosted scale-to-zero MCP server listed in the official registry.
σ-gate is the deterministic trust verdict of a five-part estate. The other four are routing protocols; this one is the gate they ship through:
Apache-2.0 — see LICENSE.
Part of Spektre Labs — coherence-theory research lab.
σ = declared − realized · 1 = 1, made executable.