Assign an input guardrail to a specialized agent

  • Updated

Assign an input guardrail to an individual specialized agent when separate agents handle distinct conversations and need their own content policies. A per-agent guardrail enforces its policy only on messages sent to that agent. This gives you targeted control beyond the single instance-level guardrail.

Per-agent guardrails operate independently of the instance-level active guardrail. An agent has its own guardrail even when no instance-level guardrail is active, and the reverse is also true. When you assign a guardrail to a specialized agent, Opal evaluates each input the agent receives. Opal blocks the message when any input violates a policy.

Prerequisites

The guardrail must already exist and have a trained model with the status Ready. To create and train one, see Create and train an input guardrail.

Assign a guardrail to an agent

To assign a guardrail to an agent, complete the following steps:

  1. Open a specialized agent in the agent editor. See Manage agents for information on selecting or creating an agent.
  2. Find the Input Guardrails setting.

    Screenshot of a specialized agent with the Input guardrail drop-down list expanded and highlighted.
  3. Select the trained guardrail you want to enforce for this agent from the drop-down list.
  4. Select the version of the guardrail you want to enforce for this agent from the Select version drop-down list.

    Screenshot of the version drop-down list.
  5. Do one of the following to save your changes:
    1. Click Update if you are editing an existing agent.
    2. Click Save if you are creating an agent.

The guardrail takes effect immediately for conversations with that agent. To change the policy later, select a different guardrail version or clear the setting to remove per-agent enforcement.

Related documentation

Learn more about input guardrails in the following articles: