Articles in this section

Understand Celigo guardrails

A Celigo guardrail is an import-type flow step that evaluates each record against safety, compliance, or governance policies. For every record, it returns a structured JSON result with a deterministic decision:

  • If flagged true → the record violates the configured policy

  • If flagged false → the record does not violate the configured policy

Important

Guardrails only flag – and do not enforce – actions. Based on their output, you must then implement your own logic (stop, route, retry, skip) in the flow using standard Flow builder and API builder settings, such as branching/routing, mappings, transformations, and error paths.

Guardrails always return schema-validated structured JSON so downstream mappings remain predictable and auditable.

Where to use guardrails in a flow

You can place a guardrail step:

  • Before an AI agent – Detect unsafe inputs like prompt injection signals and PII, and route records based on the flag returned

  • After an AI agent – Validate generated output before downstream mapping/export

  • Anywhere in a traditional flow or API endpoint – Apply policy checks to any record

You can also chain multiple guardrails to check data sequentially (for example: PII detection → moderation → custom policy).

How a guardrail step behaves

At runtime, a guardrail...

When to use a guardrail

Among other applications, create a guardrail step when you need to:

  • Detect unsafe or non-compliant content on a record-by-record basis

  • Add governance checks before or after AI-generated content

  • Drive deterministic routing in your flow according to structured output (flagged, reasons, triggers)

  • Capture audit-friendly evidence of policy checks (what was flagged and why)

Prompt examples (custom policy)

Example 1: Policy compliance

Review the input text and determine whether it complies with company policies. Return only one of the following values: Allowed or Blocked. If blocked, briefly state why.

Example 2: Sensitive data check

Check the input content for any medical or legal advice. Flag when medical or legal advice is detected and explain briefly.

Policy modes available in guardrails

Each guardrail is configured for a single policy mode: Moderation, PII, or AI policy.

Moderation

Checks text and images (when supported) against standard safety categories. Output indicates:

  • flagged true/false

  • triggered categories/reasons

  • confidence/score (if applicable)

PII

Detects personally identifiable information (PII) such as email addresses, phone numbers, IDs (based on configured entities). Output indicates:

  • flagged true/false

  • detected entities/types 

  • optional masked/safe representation if your implementation returns it (the guardrail itself still does not change the record automatically)

AI policy (custom prompt check)

Runs a custom instruction/policy check and returns:

  • flagged true/false

  • short explanation

Guardrail model selection (Celigo AI vs BYOK)

Choose a model when the guardrail type is Moderation or AI policy.

Celigo AI

  • Uses Celigo-provided OpenAI models

  • Respects control-plane enabled model lists

Bring your own key (BYOK)

  • Uses your own OpenAI connection

  • Respects that connection’s allowed models and concurrency limits

Guardrails at a glance (AI studio)

Navigate to AI studioGuardrails to create, manage, and review guardrails.

guardrails_glance.jpg

The list view shows:

  • Name / Description

  • Type

  • Last updated

  • Actions: Click the overflow (...) menu to select any of the following actions:

    • Edit guardrail

    • View audit logs

    • Used by

    • Clone

    • Delete

Guardrail trace view

Every guardrail step provides an in-product trace view for preview runs and runtime sessions. It typically includes:

This trace provides key details, including:

  • Guardrail Identification: The type of guardrail policy

  • Configuration: The specific thresholds or policies

  • Outcome: Whether or not the result was flagged.

  • Triggers: The specific categories or entity types that were activated.

  • Performance data: High-level information regarding timing and usage.

Note

The trace data is specific to a session and is not stored permanently.