Skip to contents

Policies and Rules

Scanners

scan_prompt()
Scan a prompt
preflight_check()
Preflight-check a prompt
scan_context()
Scan retrieved context rows
scan_output()
Scan model output
scan_conversation()
Scan a conversation while preserving message roles
scan_stream()
Scan streamed output chunks with rolling context
stream_guard()
Create a stateful safe-release stream guard
scan_tool_call()
Scan a tool call before execution
scan_tool_output()
Scan tool output before it re-enters model context
scan_url_target()
Check a URL immediately before network use
scan_grounding()
Check output citations against admitted sources
scan_document()
Scan extracted document content
scanner_options()
Configure optional text scanners
redaction_strategy()
Configure redaction behavior
output_contract()
Define a destination-specific output contract
validate_output_contract()
Validate output against a contract
context_policy()
Define retrieved-context admission requirements
grounding_policy()
Configure citation and grounding checks
url_policy()
Configure URL destination policy
document_input()
Describe extracted document content
entity_recognizer()
Create a custom entity recognizer
native_recognizers()
Native checksum-aware recognizers
secret_registry()
Configure versioned secret detection

Orchestration

secure_chat()
Run a guarded chat call
shield_ollama()
Guard an Ollama chat workflow (deprecated)
shield_gemini()
Guard a Gemini Developer API chat workflow (deprecated)
ollama_reviewer()
Create a local Ollama reviewer
remote_reviewer()
Create a remote semantic reviewer
trust_boundary()
Wrap a chat object in a trust boundary
rate_guard()
Create or check a rate guard
tool_policy()
Define authorization and limits for model tools
guard_tool()
Dispatch one tool through guardrails
telemetry_options()
Configure privacy-safe guardrail telemetry

Optional Detector Adapters

guardrail_provider()
Create an optional guardrail provider
prompt_guard_provider()
Adapt a prompt-injection classifier
presidio_provider()
Optional Presidio detector adapter
gitleaks_provider()
Optional Gitleaks secret detector adapter
opa_provider()
Optional Open Policy Agent adapter

Audit and Explanation

write_audit_log()
Write an audit log
explain_findings()
Explain findings
example_prompts()
Example prompts
evaluate_security_cases()
Evaluate scanner behavior on a labeled corpus
summarize_security_evaluation()
Summarize a labeled security evaluation
compare_policies()
Compare policy decisions on the same corpus
owasp_crosswalk()
OWASP LLM Top 10 2026 migration crosswalk
reviewer_prompt()
Return the default semantic reviewer prompt

Constructors

shieldr_rule()
Construct a shieldr_rule
shieldr_policy()
Construct a shieldr_policy
shieldr_report()
Construct a shieldr_report
shieldr_audit()
Construct a shieldr_audit
shieldr_result()
Construct a shieldr_result
print(<shieldr_policy>)
Print a shieldr_policy
print(<shieldr_report>)
Print a shieldr_report