Skip to main content

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

  1. Configure your Protector Plus deployment (endpoint URL, API key, which sub-guardrails are enabled) inside the Protector Plus UI.
  2. In the TraceCtrl dashboard, open Settings (/settings) and paste the Protector Plus endpoint URL and API key. Toggle the sub-guardrails you want active.
  3. 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 next guard() entry.
The engine endpoint the SDK calls is 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.registered span per enabled sub-guardrail so the dashboard’s registry picks them up immediately.
There is no teardown — the worker thread is process-lifetime, so calls outside the scope still work. The context manager’s role is to lazily configure the runner and register guardrails against the currently-active agent.

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 a check_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".

Failure modes