plivo-mirror v4 — dual-boundary policy firewall

A real-time safety net for any LLM voice agent. Feed a customer turn + the LLM's planned reply/tool call through the real router logic and watch where the firewall passes, corrects, or blocks — across any domain. Deterministic layers run faithfully in your browser; the model-backed nodes (grounded verifier, NLI) are yours to toggle.

Scenario library

Pick a real-world scenario across industries, or edit anything below and re-run. The firewall is generic — same engine, different policies & state.

The turn

Session state source of truth

Policies FORBID: / REQUIRE: = deterministic

Model-backed nodes you decide

The grounded verifier & NLI run real models in production; here you set their output to explore every branch.
— ready —
Pick a scenario to see the verdict, the path, and the spoken output.
pass correct block semantic route skipped / not reached
Inputs
Customer turn
caller utterance
State grounding
extract → validated entities
LLM
planned reply + tool intents
① Speech guard tokens → TTS
Deterministic
FORBID / REQUIRE
Risk-span tagger
price · number · commit · name
Committal gate
skip questions/refusals
NLI semantic
contradicts customer?
Confidence gate
inert (no logprobs)
Grounded verifier
supported by state/policy?
Intervention
deflect → regenerate → re-verify
② Action guard tool call → execution · only if speech passed
False-completion
"done" w/ no tool
Arg ↔ state
consistency
Authorization
separate service
Param / policy
business rules (code)
Final output
speak / fire tools — or correction

Decision trace