Set up prompt injection protection
A prompt injection protection policy in Creatio AI Studio checks the messages that users send to an agent for jailbreak and prompt injection attempts, that is, messages that try to override the agent's instructions, for example, to make the agent ignore its rules or reveal its setup. The policy reacts when it detects an attempt. You choose how readily the policy flags a message and what happens next, from recording the attempt to stopping the message with a refusal.
Before you start, make sure the agents you want to protect exist in Creatio AI Studio. If you want to route reviews to a specific team, prepare the approver role in advance.
Create a prompt injection protection policy
For example, stop messages that try to override the instructions of the Customer Support Agent, and reply with your own refusal text.
-
Go to the Policies section under Trust & Governance in the navigation panel.
-
Click New. This opens the "Add governance policy" dialog.
-
Select Prompt injection protection. This opens the policy page.
-
Fill out the General settings & Runtime block.
Field
Field value
Policy name
A name that tells reviewers what the policy guards, for example, "Support agent injection guard."
Scope — who this policy applies to
What the policy covers. Available values:
- "Agents" — the agents you select in the Assigned agents block.
- "Models" — any agent that runs on the models you select in the Target models block.
- "Agents + models" — only the selected agents when they run on the selected models.
When multiple policies cover the same message, the most specific one applies: agent and model, then agent, then model.
Status
"Enabled" or "Disabled." Set to "Enabled" out of the box.
Severity — severity of this policy
"Low," "Medium," "High," or "Critical." Set to "High" out of the box.
-
Click Add agent in the Assigned agents block and select the agent, such as "Customer Support Agent." This block appears when the scope includes agents.
-
Click Add model in the Target models block and select the model. This block appears when the scope includes models.
-
Select the Sensitivity in the Detection block. It sets how readily a message counts as an attempt.
Value
Behavior
Low — flag only clear attempts
Flags only messages that plainly try to override the agent's instructions. Genuine requests are almost never stopped.
Medium — balanced (recommended)
Flags plain attempts and the more suspicious borderline ones, with the occasional false alarm. Set out of the box.
High — flag borderline attempts too
Flags borderline wording as well. Catches more attempts, but stops more genuine requests by mistake.
-
Select the Reaction. It sets what happens when the policy detects an attempt.
Value
What happens
Record it only — the conversation continues unchanged
The policy records the attempt. Set out of the box.
Require approval for risky actions for the rest of the conversation
The agent keeps talking, but its risky actions need a reviewer's approval until the conversation ends.
Require approval for every action, including read-only ones
Every action needs approval. A busy agent can raise an approval request for each step, so use this value for a single agent.
Stop this message and ask a person to approve it — once approved, risky actions still need approval for the rest of the conversation
The message waits for a reviewer. After approval, risky actions still need approval until the conversation ends.
Stop this message and reply with a refusal
The agent does not process the message and replies with the refusal message.
-
Review the Refusal message in the Reject options block. The field shows the default text. Enter your own text if needed. Users see it when the policy stops a message, or when a reviewer denies a message without writing their own reply. Leave the field empty to use the default text.
-
Leave Allow replacement message after reject turned on to let a reviewer deny the message and send their own reply instead of the refusal text. It is turned on out of the box. The Pre-fill the default replacement message field sets the text the reviewer's message box opens with.
-
Select an Approver role, such as "SupportSupervisor," to route reviews to that team. Leave it empty to send approvals to the standard approvals queue.
-
Enter a Pending notification (to the requester) that users see while they wait. Leave it empty to send no notification. It is delivered only in synchronous channels.
-
Set the Active environments block if the policy should not apply everywhere. It reads "Active in all environments" out of the box. To limit the policy, click Add environment and select the environment.
-
Click Create policy.
As a result, Creatio AI Studio adds the policy to the Policies list. The policy checks every message that users send to the covered agents and applies the selected reaction. Approval requests appear on the Approvals page.
Review detected attempts
- Go to the Decisions section under Trust & Governance in the navigation panel.
- Select "Prompt injection" in the All rule types list. This adds the Any sensitivity list and, if your organization has channels, the All channels list.
- Open a decision to see its Prompt injection detection section.
As a result, Creatio AI Studio shows the sensitivity, the reaction, and the channel of each detected attempt. Learn more: Review policy decisions.