Laya-as-a-Judge v1.2.0 ⚡⚖️

One open-source, zero-output-token Decision, Judge & Governance API — built for both solo developers ($0 on a 6 GB edge or single 16 GB GPU) and air-gapped regulated enterprises (EU AI Act / DORA / NIS2 / Sixi Assure).
Try live (CPU): 🤗 Hugging Face Space Demo · Install: pip install laya-as-judge · Read the write-ups: v1.2.0 — Closed Attack → Guard → Prove Loop (sixi-scanner ↔ laya-as-judge) · v1.1.0 — PyPI, 512 RAIL Guard Tests, FastMCP & LangGraph · v1.0.0 — Solo & Enterprise
What's New in v1.2.0 (Closed Attack → Guard → Prove Loop with sixi-scanner)
Pair laya-as-judge with sixi-scanner v1.2.0 to close red-team findings automatically in CI — zero output tokens, zero cloud judge bills:
| Addition |
Interface / CLI |
Live Measured Proof ($0.00 Local GPU) |
RedTeamVerdictJudge Preset |
POST /v1/judge (judge="redteam") · RedTeamVerdictJudge |
3 orthogonal typed criteria (violation_confirmed, is_benign_refusal, severity), 0 output tokens, 131.5 ms avg on CUDA Laya — explicitly separates polite refusals from real breaks |
| Deterministic Guard Loader |
load_sixi_scanner_rules("guard-rules.json") · laya-judge serve --rules-file |
Loads sixi-scanner --export-laya packs into JudgedDecisionEngine, FastMCP LayaToolGateMiddleware, & LangGraph LayaJudgedGateNode (0.29 ms check overhead, 0/10 benign false blocks) |
| CI Regression Verifier |
laya-judge verify-sixi guard-rules.json · pack.verify_regression(...) |
Live Qwen3.8-27B (45 probes): 2/2 findings closed (still_open=0) on sixi-scanner diff; live DVMCP C04 rug-pull (get_weather): blocked in 1.00 ms (ActionGate.BLOCK) while clean get_system_time commits (ActionGate.COMMIT) |
# 1. ATTACK: scan target, confirm with zero-token RedTeamVerdictJudge, export guard rules
laya-judge serve --profile rtx-16gb --port 8000
sixi-scanner scan --url http://agent/v1/chat/completions --stateful --context agent.json \
--confirm-url http://127.0.0.1:8000/v1/judge --out baseline.json --export-laya guard-rules.json
# 2. GUARD: verify closure in CI & load rules into Laya server / FastMCP / LangGraph
laya-judge verify-sixi guard-rules.json
laya-judge serve --profile rtx-16gb --rules-file guard-rules.json --port 8000
# 3. PROVE: re-scan guarded agent and diff honestly
sixi-scanner scan --url http://agent/v1/chat/completions --stateful --out after.json
sixi-scanner diff baseline.json after.json
What's New in v1.1.0 (PyPI, Ecosystem Drop-Ins, FastMCP & LangGraph, DecisionBench & RAIL Guard)
| Addition |
Interface / Endpoint |
Measured Highlight |
| PyPI & Zero-Setup HF Space |
pip install laya-as-judge · rbai86/laya-as-judge-demo |
Official PyPI package ([server] extra, uvx ready) + zero-cold-start browser playground |
| OSS Ecosystem Drop-In APIs |
POST /v1/decisions/batch, /v1/moderations (OpenAI), /v1/rerank (Cohere/vLLM), /v1/rank (Best-of-N), GET /metrics (Prometheus), get_engine("hf-decision") |
7.97× batch speedup (32 items), 6.7 ms /v1/decisions & 18.2 ms /v1/rank on Laya-Q8_0 (+575 MiB VRAM, 0 output tokens) |
| FastMCP & LangGraph Middleware |
LayaToolGateMiddleware, @laya_tool_guard, make_decision_router, LayaJudgedGateNode, laya_gate_router |
Zero-bloat duck-typed integrations wiring 4-way COMMIT / FALLBACK / ABSTAIN / BLOCK into MCP tools & StateGraph nodes in 5 lines |
| DecisionBench Native Runner |
laya-judge decision-bench · examples/decisionbench_laya_adapter.py |
100% native jev-compatible-systemone-http-v1 parity across noul, choice, score for Hanno-Labs/decision-bench (run-system-one-http) |
| RAIL Guard Benchmark Harness |
laya-judge rail-guard --source hf (responsible-ai-labs/rail-guard-benchmark) |
$0.00 local GPU (512 real HF cases): Pool A 95.0% F1 (90.5% adv catch, 0.0% benign FPR on Kev-4B) · Full Pool B (392/392 on GLiDE-9B): 94.6% unsafe intercept, 89.9% GAP caught, 70.7% safe not hard-blocked (full per-domain write-up) |
MCP Stdio Server, A2A v1.0 & GitHub Action (v1.1.1) |
uvx laya-as-judge mcp (server.json) · GET /.well-known/agent-card.json & POST /a2a/v1 · uses: radeksixi/laya-as-judge@v1.1.1 (action.yml) |
5 native MCP tools (laya_decide, laya_judge, laya_judged_decision, laya_moderate, laya_rerank), A2A v1.0 Agent Card, and native CI gate (--gate-judgement, --max-failing, --format sarif) |
# 5-line FastMCP tool guard + LangGraph conditional-edge router (0 output tokens)
from laya_as_judge import LayaToolGateMiddleware, LayaJudgedGateNode, laya_gate_router, make_decision_router, get_engine
engine = get_engine("systemone", base_url="http://127.0.0.1:8080")
mcp.add_middleware(LayaToolGateMiddleware(engine, high_stakes_tools=["issue_refund", "delete_account"]))
graph.add_conditional_edges("triage", make_decision_router(engine, routes=["billing", "shipping", "security"]))
graph.add_node("governance_gate", LayaJudgedGateNode(engine))
graph.add_conditional_edges("governance_gate", laya_gate_router) # commit / fallback / abstain / block
What Laya-as-a-Judge Offers (API & Core Features)
Software rarely needs an autoregressive LLM writing 250 tokens of prose just to route a ticket, block a prompt injection, score RAG faithfulness, or approve a tool call. laya-as-judge v1.0.0 ships a Python SDK, CLI (laya-judge), and FastAPI HTTP server (laya-judge serve) exposing three unified, zero-output-token modes:
1. Three Unified API Modes
| Mode |
HTTP Endpoint(s) |
Python / CLI Entry |
What It Does |
Output Contract |
| Mode 1 · Decision API (Cloud Drop-in) |
POST /v1/decisions``POST /v1/systemone | SystemOneHTTPBackend``OmegaDecisionEngine | Drop-in local replacement for TypeSafe Jev, Google, and Azure Decisions APIs (state/input & noul/bool aliases) | Strictly typed noul, choice, score answers + calibrated simplex probabilities (0 output tokens, 0% parse failures) |
| Mode 2 · Judge API (Eval & Guardrails) |
POST /v1/judge |
FaithfulnessJudge, SafetyGuardJudge, PairwiseComparisonJudge, AgentTrajectoryJudge, CustomJudge, laya-judge eval |
6 built-in evaluation presets + declarative custom rubrics, inline sub-15 ms guardrails, JSONL batch eval, and multi-task benchmark suite |
passed, typed judgements, Shannon-entropy confidence, Top-1 probability, latency & token accounting |
| Mode 3 · Hybrid ("The Judged Decision") (Governance Gate) |
POST /v1/judged-decision |
JudgedDecisionEngine``laya-judge judged-decision | Decide → Cross-Family Verify → Orthogonal Judge → Deterministic Policy Rules answering "Is this proposed action safe & grounded to commit?" | 4-way ActionGate (COMMIT / FALLBACK / ABSTAIN / BLOCK), effective_decision, calibrated_risk, full JSON audit_trace |
2. Platform Capabilities — From Solo GPU to Air-Gapped Enterprise