Articles in this section

Create a guardrail

Guardrails help you protect your flow by checking each record for safety and compliance as it runs. It works in real time and can be placed before or after an AI agent, or anywhere in the flow.

Create a Celigo guardrail as a new import model type:

  • Navigate to AI studioCreate Guardrail. Click + Create guardrail in the upper right side of the Guardrails page.

    AIstudio_guardrails.jpg
  • Alternatively, you can add a guardrail in Flow builder. Open BuildFlows, click the + button,and select Add guardrail.

    Flowbuilder_guardrail.jpg

Configure the guardrail

While navigating through a flow, in the Create guardrail panel after you provide a name and an optional description, click Next. The settings expand to allow you to configure the guardrail.

General

  1. Name your guardrail: Enter a clear and reusable name for your convenience when referencing it from other parts of the application.
  2. Description (optional) - Describe what the guardrail checks and where it should be used (pre- or post-agent). Keep this description updated as you make changes.
  3. Guardrail type: Select one policy mode and configure its settings:

    guardrail_type.jpg
    • PII - Personally identifiable information (PII) helps you detect, mask, or block sensitive information in real time, ensuring only compliant data is processed by your AI agent.

      • Set Confidence threshold (required)
      • Under the Categories, select PII entities/categories to detect and protect
      • You can optionaly mask the detected entities
      • Click Save & close
    • Moderation: You can either select Use native guardrail (The Use native guardrail option is available only for BYOK.) or Bring your own key.

      Guardrailtype_moderation.jpg
      • Bring your own key: Select a connection from the Connection list or select Create connection to create another one. (This option is available only with BYOK.)
      • Create connection: Use the toggle button to switch between Simple and HHTP connection. Then fill in the required details and select Save & close

        create connection_ moderation.png
      • Set the mandatory Confidence threshold.
      • Select Categories of PII entities.
      • Click Save & close.
    • Custom prompt check - You can select either Celigo AI or Bring your own key.

      Guardrailtype_custom_prompt_check.jpg

      Note

      By default, Celigo AI is selected.

       

      • Select one of the AI model selection options. These models run under the Celigo managed account:

        • OpenAI - gpt-5, gpt-5-pro, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini (default), and gpt-4.1-nano
        • Gemini - gemini-2.5-pro, gemini-2.5-flash-lite, gemini-2.5-flash, and gemini-2.5-flash-image
        • Anthropic - claude-sonnet-5, claude-sonnet-4-6, claude-opus-4-8, claude-opus-4-8, and claude-opus-4-7, and claude-haiku-4-5
        Guardrail_AI_Model.jpg
      • Bring you own key (BYOK): Select a connection from the Connection list or create another one. (This option is available only with BYOK.)

        If you wish to create a connection, Select Create connection and select either OpenAI connectionGemini connectionMistral connection, xAICohereHugging faceDeep Seek, or Anthropic connection from the Connection list and select Close
        create connection - BYOK.png

        Note:

        • If you prefer to use your own connection (BYOK), you can attach either n OpenAI connection, Gemini connection, Mistral connection, xAICohereHugging faceDeep Seek, or Anthropic connection connector. The list is then automatically populated with all supported models available through that connection
        • If you create a Gemini, OpenAI, Mistral, xAI, Cohere, Hugging face, Deep Seek, or Anthropic connection and use it in a guardrail, then that connection doesn't count toward your endpoint entitlement. If the same connection is also used in an integration, it counts as a single endpoint
      • Set the Confidence threshold (if applicable).
      • Click Save & close.

Advanced

Click Advanced to expand this section (collapsed by default) and select one of the following options below One to many:

  • Select Yes (advanced) if a single source record needs to internally create multiple destination records.
    Path to many: If you're processing JSON objects, select or enter the JSON path to the child records. Not needed for array- or row-based data. Only applies when One to many is set to Yes (advanced).
  • Select No (default) to leave the guardrail import behaving as it does today. This option can't be used when importing a CSV file.

Note

If the JSON path is misspelled or invalid, the flow run succeeds but shows a success count of 0. See Create a one-to-many import and access nested arrays for full behavior, including nested arrays.

Preview guardrails

The guardrails wizard includes:

  • Configuration panel (left)
  • Preview panel (right)

Preview allows you to:

  • Provide mock input data. To see how import requests will look during configuration, click within the Input panel.
  • In Output, click Send to review the structured JSON output that will be available to downstream mappings/transformations.

The Mock response panel works similarly across the Celigo platform. You can reference and provide mock response data, as described elsewhere, also for guardrails.