---
name: guardrails
description: NeMo guardrails self-check input config plus harmful-message check workflow. Use when the task involves guardrail configurations, content safety, self-check input rails, or `nemo guardrail` commands.
---
Guardrails tasks

- Build one valid self-check input config, then run one harmful-message check.
- Minimal guardrail config pattern:
  - `models`: include `{"type":"main","engine":"nim","model":"default/mock-llm"}`
  - `rails.input.flows`: include `"self check input"`
  - `prompts`: include a `self_check_input` prompt
- Commands:
  - `nemo guardrail configs create <name> --data '<json>'`
  - `nemo guardrail configs list`
  - `nemo guardrail configs get <name>`
  - `nemo guardrail check --model <model> --messages '<json_array>' --guardrails '{"config_id":"default/<name>"}'`
- Use a clearly harmful message and confirm output indicates blocked status.
- Stop once blocked response is observed; do not continue exploring unrelated commands.
