Overview
Protector Plus is Cloudsine’s managed LLM firewall. Where SDK Guardrails run your own LLM-judge prompts, Protector Plus runs a managed pipeline of seven sub-checks (prompt-injection LLM judge, keyword/regex/PII detectors, vector similarity, content moderation, system-prompt leak detection) against every input and output you send it. Use SDK guardrails for bespoke business rules (“never authorise payments over $10k without manager approval”). Use Protector Plus when you want a hosted firewall managed in one place from the TraceCtrl Settings page.Configuration flow
- Configure your Protector Plus deployment (endpoint URL, API key, which sub-guardrails are enabled) inside the Protector Plus UI.
- In the TraceCtrl dashboard, open Settings (
/settings) and paste the Protector Plus endpoint URL and API key. Toggle the sub-guardrails you want active. - On
guard()entry, the SDK fetches that configuration from the engine and wires its background worker. No code changes are needed when operators toggle a sub-guardrail on or off — the change picks up within ~60s on the nextguard()entry.
GET /api/v1/guardrails/protector-config/sdk on TRACECTRL_API_URL (defaults to http://localhost:8000).
Usage
guard() is a context manager. On entry it:
- Fetches Protector Plus config from the engine (60-second cache).
- Starts a single daemon background worker thread.
- Emits one
tracectrl.guardrail.registeredspan per enabled sub-guardrail so the dashboard’s registry picks them up immediately.
Asynchronous semantics
check_input and check_output return a GuardrailVerdict immediately with flagged=False. The actual POST to Protector Plus happens on the background worker; when it completes the verdict’s fields are populated.
This is deliberate — Protector Plus’s LLM judge adds ~1.6s per call and the SDK never blocks the wrapped LLM by default.
Callers that need synchronous gating must explicitly wait:
bool(verdict) is always True — don’t use truthy checks. Always read .flagged after .wait().
GuardrailVerdict
Supported sub-guardrails
The seven checks Protector Plus runs, in canonical display order:
Each registered sub-guardrail appears in the dashboard as
protector_plus.<key> so its alerts and registry rows are distinguishable from your own custom guardrails.
Endpoints
The SDK POSTs to two paths on the configured Protector Plus root:
Request body:
{"message": "<text>"}. Header: X-API-Key: <your key>. Timeout: 5 seconds.
Span attributes emitted
For every sub-guardrail that runs on acheck_input / check_output call, the SDK emits a tracectrl.guardrail.evaluation span (child of the OTel context captured at the call site):
Transport errors (Protector Plus unreachable, HTTP 5xx, timeout) emit one
decision="error" span named protector_plus.transport so outages surface as degraded health rather than silent drops.
Registration spans (tracectrl.guardrail.registered) emitted on guard() entry carry the same fields described in Guardrails, plus tracectrl.guardrail.provider = "protector_plus" and tracectrl.guardrail.mode = "monitoring".

