"""
PolicyAI Integration Flows (Colang 2.x)
PolicyAI provides content moderation and policy enforcement capabilities.
For more information, see: https://musubilabs.ai
Supported features:
- Input moderation: Check user messages against configured policies
- Output moderation: Check bot responses against configured policies
- Tag-based evaluation: Use POLICYAI_TAG_NAME env var to specify policy tag
"""
flow policyai moderation on input
"""Guardrail based on PolicyAI assessment."""
$result = await CallPolicyaiApiAction(text=$user_message)
if $result.assessment == "UNSAFE"
if $system.config.enable_rails_exceptions
send PolicyAIModerationRailException(message="PolicyAI moderation triggered. Content violated policy: " + $result.category)
else
bot refuse to respond
abort
flow policyai moderation on output
"""Guardrail based on PolicyAI assessment."""
$result = await CallPolicyaiApiAction(text=$bot_message)
if $result.assessment == "UNSAFE"
if $system.config.enable_rails_exceptions
send PolicyAIModerationRailException(message="PolicyAI moderation triggered. Content violated policy: " + $result.category)
else
bot refuse to respond
abort
← Back to catalog
Policyai (NeMo Guardrail)
""" PolicyAI Integration Flows (Colang 2.x) PolicyAI provides content moderation and policy enforcement capabilities. For more information, see: https
Automated safety scan: no suspicious patterns found.
Heuristic text scan aligned to the OWASP Agentic Skills Top 10. How we scan
- Provider
- NVIDIA
- Origin
- Official
- Type
- Guardrails
- License
- Apache-2.0
- Language
- English
- Added
- 2025-09-01
#guardrail#nemo#rails#colang