v1.0.0

Guardrails and human review

Updated 30 Nov 2026Edit this page

Input Guard, Output Guard, PII Redactor and Human Approval.

Guardrails are opt-in nodes with explicit branches, so a blocked input or a failed output takes a visible path on the canvas. Human Approval pauses a run durably until a person decides. See Guardrails and Human in the loop.

Node Category Summary
Input Guard Guardrails Validates user input before a model sees it: length, PII, prompt injection, banned words, topics.
Output Guard Guardrails Validates model output (JSON Schema, regex, PII leaks, policies) and can repair it with the model.
PII Redactor Guardrails Finds and redacts emails, phone numbers, cards, SSNs, IBANs, IPs and credentials in text.
Human Approval Human Pauses the run until a person approves or rejects (optionally editing the value), then continues.

Input Guard

agenticmind.core.input_guard · version 1.0.0

Validates user input before a model sees it: length, PII, prompt injection, banned words, topics.

Typical use. Checks user input before a model sees it: length, PII (flag, redact or block), prompt-injection heuristics, banned words and patterns, and, with llm: on, model-judged injection and allowed or denied topics. Takes the passed or blocked branch.

Input Type Required Description
text Any yes User input (text, Document or JSON)
Output Type Description
text String The input, with PII redacted if configured
passed Boolean
violations JSON Every check that fired
message String blocked_message when blocked, else empty
  • Control branches: passed, blocked
  • Permissions: network, credentials
  • Execution policy: timeout 60s, max attempts 2, idempotent
Setting Type Default Description
min_chars integer 0 Min Chars
max_chars integer 20000 Longer text is blocked.
pii_action off · flag · redact · block redact What to do with personal data and credentials found in the text.
pii_types array Pii Types
redaction_style label · mask · hash label label: [EMAIL]; mask: ****1234; hash: [EMAIL:1a2b3c4d].
banned_words array Words or phrases that block the text.
blocked_patterns array Regular expressions that block the text.
on_block branch · fail branch branch: take the blocked/failed branch. fail: stop the run with an error.
llm off · on off Also let a model judge the text.
provider openrouter · openai · anthropic · gemini · azure_openai · bedrock · mistral · groq · deepseek · together · xai · huggingface · ollama · openai_compatible · mock openrouter Provider
model string google/gemini-3.8-flash Model
api_key secret ref API key for the model checks, e.g. OPENROUTER_API_KEY
base_url string Base Url
max_tokens integer 2000 Max Tokens
injection_action off · flag · block block Prompt-injection / jailbreak detection.
injection_threshold number 0.5 Heuristic score (0-1) at or above which the input counts as an injection attempt.
allowed_topics array If set, the model blocks inputs outside these topics (needs llm on).
denied_topics array The model blocks inputs about these topics (needs llm on).
blocked_message string Sorry, I can't help with that request. Returned on the message output when blocked.

Output Guard

agenticmind.core.output_guard · version 1.0.0

Validates model output (JSON Schema, regex, PII leaks, policies) and can repair it with the model.

Typical use. Checks model output: JSON or JSON Schema, required and blocked patterns, PII and credential leaks, and model-judged policies. With llm: on and max_repairs it asks the model to fix a failing output and re-checks it. Takes passed or failed.

Input Type Required Description
text Any yes Model output (text or JSON)
prompt String no The original request (helps policy checks and repairs)
Output Type Description
value Any Parsed JSON in json mode, else the checked text
text String The checked text (PII redacted if configured)
passed Boolean
violations JSON Checks that fired on the final output
report JSON Attempts, repairs and earlier violations
  • Control branches: passed, failed
  • Permissions: network, credentials
  • Execution policy: timeout 180s, max attempts 2, idempotent
Setting Type Default Description
min_chars integer 0 Min Chars
max_chars integer 20000 Longer text is blocked.
pii_action off · flag · redact · block redact What to do with personal data and credentials found in the text.
pii_types array Pii Types
redaction_style label · mask · hash label label: [EMAIL]; mask: ****1234; hash: [EMAIL:1a2b3c4d].
banned_words array Words or phrases that block the text.
blocked_patterns array Regular expressions that block the text.
on_block branch · fail branch branch: take the blocked/failed branch. fail: stop the run with an error.
llm off · on off Also let a model judge the text.
provider openrouter · openai · anthropic · gemini · azure_openai · bedrock · mistral · groq · deepseek · together · xai · huggingface · ollama · openai_compatible · mock openrouter Provider
model string google/gemini-3.8-flash Model
api_key secret ref API key for the model checks, e.g. OPENROUTER_API_KEY
base_url string Base Url
max_tokens integer 2000 Max Tokens
format text · json text json: the output must parse as JSON.
json_schema object Optional JSON Schema the parsed output must satisfy (implies json).
required_patterns array Regular expressions the output must match.
policies array Rules a model checks the output against, e.g. ‘No medical diagnoses’ (needs llm on).
max_repairs integer 0 With llm on: ask the model to fix a failing output this many times, re-checking each fix.

PII Redactor

agenticmind.core.pii_redactor · version 1.0.0

Finds and redacts emails, phone numbers, cards, SSNs, IBANs, IPs and credentials in text.

Typical use. Redacts emails, phone numbers, payment cards, SSNs, IBANs, IPs and credentials anywhere in a graph, with label, mask or stable hash styles.

Input Type Required Description
text Any yes Text, Document or JSON
Output Type Description
text String Redacted text
found JSON Count per type (values are never output)
  • Control branches: done
  • Permissions: none
  • Execution policy: timeout 30s, max attempts 1, idempotent
Setting Type Default Description
pii_types array Pii Types
style label · mask · hash label label: [EMAIL]; mask: ****1234; hash: [EMAIL:1a2b3c4d] (same value, same tag).

Human Approval

agenticmind.core.human_approval · version 1.0.0

Pauses the run until a person approves or rejects (optionally editing the value), then continues.

Typical use. Pauses the run (durably, surviving restarts) until a person approves or rejects in the Approvals tab, optionally editing the value. Takes the approved or rejected branch. Cannot be placed inside a loop body.

Input Type Required Description
value Any yes What the reviewer sees
Output Type Description
value Any The value, as approved (or edited)
decision String approved or rejected
comment String
reviewer String
  • Control branches: approved, rejected
  • Can pause the run for a human response
  • Permissions: none
  • Execution policy: timeout 30s, max attempts 1, idempotent
Setting Type Default Description
title string Approval needed Title
instructions string Review the content and approve or reject it. Shown to the reviewer.
allow_edit boolean false Let the reviewer change the value before approving.
require_comment_on_reject boolean true Rejections must explain why.