Guardrail Nodes
Overview
Section titled “Overview”Guardrail nodes check input or output for safety concerns. They have two output handles: pass and block.
{ "id": "guard-1", "type": "guardrail", "data": { "type": "guardrail", "guardrailType": "content", "config": { "blockedTopics": ["violence", "illegal"], "action": "block" } }}PII Detection
Section titled “PII Detection”Detects personally identifiable information (emails, phone numbers, SSNs, etc.).
{ "guardrailType": "pii", "config": { "detectors": ["email", "phone", "ssn", "credit_card", "address"], "action": "redact", "redactWith": "[REDACTED]" }}| Action | Behavior |
|---|---|
block | Reject the message entirely |
redact | Replace PII with placeholder text |
warn | Allow but flag for review |
Jailbreak Prevention
Section titled “Jailbreak Prevention”Detects prompt injection and jailbreak attempts.
{ "guardrailType": "jailbreak", "config": { "sensitivity": "medium", "action": "block", "customPatterns": [] }}Sensitivity levels: low, medium, high
Content Filtering
Section titled “Content Filtering”Filters content based on blocked topics or custom rules.
{ "guardrailType": "content", "config": { "blockedTopics": ["violence", "illegal", "adult"], "action": "block", "customRules": [ { "pattern": "competitor_name", "action": "warn" } ] }}Placement
Section titled “Placement”Place guardrails before agent nodes to check input, or after to check output:
Start → Guardrail (input check) → Agent → Guardrail (output check) → End