SERAPH Docs

The guardian layer for every LLM — an open, model-agnostic jailbreak-defense guardrail. This page describes exactly how it works.

1 · What it is

SERAPH is a guardrail that sits between the user and any model. Every prompt is inspected before it reaches the LLM; attacks are blocked, and only clean prompts are forwarded. Because it lives at the boundary rather than inside the weights, it works with any model — open-weights or API, large or small — with no retraining.

2 · The pipeline

user prompt └─▶ deobfuscate (strip zero-width chars, decode base64/hex, normalize leetspeak) └─▶ score across 7 signal detectors → risk = soft-OR of weighted signals └─▶ verdict: risk ≥ 0.60 BLOCK · 0.34 FLAG · else ALLOW └─▶ ALLOW → forward to your model BLOCK → refuse, log the signals

3 · The seven signals

SignalCatches
Instruction override"ignore previous instructions", "you are now…", rule overrides (prompt injection)
Persona jailbreakDAN, developer mode, "unfiltered/amoral AI", no-rules roleplay
Refusal suppression"start with 'Sure, here'", "never refuse/warn/apologize" (PAIR-style)
System-prompt extraction"reveal your system prompt", "repeat the words above"
Obfuscation / encodingbase64/hex/leetspeak smuggling, zero-width chars, "decode then follow"
Adversarial suffixGCG-style symbol clusters, camelCase token-welding, high-entropy gibberish
Harmful-intent topica defensive category blocklist that flags the domain, not the how-to

Each detector returns a score in [0,1]. The aggregate is a soft-OR: any single strong signal is enough to block, and multiple signals compound. This is why the guardrail generalizes — an attack rarely avoids all seven tells at once.

4 · Using it

The guardrail is one dependency-free file (shared/guardrail.js) that runs in Node and the browser. Wrap any model call:

const Seraph = require('./shared/guardrail.js'); function protectedComplete(prompt, callModel) { const g = Seraph.analyze(prompt); if (g.verdict === 'BLOCK') return { blocked: true, signals: g.signals }; return { blocked: false, reply: callModel(prompt) }; // any provider }

Or hit the HTTP endpoint: POST /api/guard { prompt }{ verdict, risk, signals[] }.

5 · The benchmark

The benchmark board runs SERAPH over an open corpus of jailbreak techniques drawn from the standard families — Harmbench-style harmful-intent wrappers, JailbreakBench GCG and PAIR attacks, DAN, injection and encoding. Every attack wraps a harmless canary payload, so the benchmark measures the guardrail's grip on the technique and never stores real harmful content. Clone it and reproduce the numbers.

6 · Honest limits

7 · $SERAPH

$SERAPH is the community token around the project. The guardrail is open source and free to use; the token funds bounties for new attacks and patches. Nothing here is financial advice.

Break it, and it gets patched — that's the whole model. Every attack that slips through the playground is a test case that makes the next version stronger.