Guardian icon

Guardian

Policy-based safety gate for AI agents and workflows. Check actions against Guardian policies, enforce previously-evaluated intents, or gate AI agent tool calls. Returns Allowed (including OBSERVED advisory decisions), Denied, or Needs Approval.

Agent Gate

AI-generated

Summary

Evaluate an AI agent’s proposed action against Guardian policies, then either return the decision or atomically claim execution when the operation is Evaluate & Claim. Connect the node as an AI Agent tool and provide the complete action payload so Guardian can evaluate it and verify the same data when execution is claimed.

Inputs

  • Operation — Choose Evaluate to check policy and pass the returned intentRunId to a downstream Guardian Enforce step, or Evaluate & Claim (the default) to check and claim execution in one call.
  • Action Type — The action category to check, such as email.send or payment.send.
  • Payload — JSON containing the complete action data. Guardian uses it for policy evaluation and integrity verification; invalid JSON is refused.
  • Amount — Optional payment amount. A nonzero value overrides payload.amount; when the field is left at its default 0, an amount already in the payload is preserved.
  • Recipient — Optional recipient identifier. When provided, it is added to the payload and its domain is derived and normalized.
  • Recipient Domain — Optional normalized recipient domain. Used when no recipient is provided; a leading @ is added if needed.
  • Subject — Optional email subject added to the payload when provided.
  • Body — Optional email body added to the payload when provided.
  • Reason — Optional reason added to the payload when provided.
  • Tool Description — Description shown to the AI agent. The default instructs the agent to call this gate before acting and how to interpret its result.
  • Requester Name — Identifier recorded in Guardian audit logs; defaults to n8n-ai-agent.
  • Project Slug — Optional Guardian project scope.
  • Test Mode — Run the intent in test mode; defaults to off and does not consume quota when enabled.
  • Idempotency Key — Optional key to prevent duplicate intents. If empty, a deterministic key is derived from the workflow execution and action identity (action type, recipient, subject, and amount).

Output shape

Three output branches: Allowed, Denied, and Needs Approval. For AI Agent tool use, decision results are returned as JSON on the first (Allowed) output.

The JSON includes decision, canProceed, executed, intentRunId, actionType, payload, and a message, with some fields varying by result. Evaluate returns an allowed action with executed=false and requires a downstream Enforce step to claim execution. Evaluate & Claim returns executed=true when the claim succeeds; a duplicate claim or claim failure returns canProceed=false. DENY, REQUIRE_APPROVAL, and API-check errors also appear on the first output for the agent tool. OBSERVED is advisory and is returned as canProceed=true with executed=false.

Links

Discussion