Skip to content

Jailbreak guardrail

The jailbreak guardrail is a Tier 1 (in-process, sub-millisecond) guardrail pre-loaded with 18 known attack phrases covering instruction-override attempts, persona jailbreaks, bypass and override commands, and fake system-message injection. It works with zero configuration — add a single JSON object and detection begins immediately.

Screenshot: Jailbreak guardrail editor in the Guardrail Builder Jailbreak guardrail editor

When to use the jailbreak guardrail

Use the jailbreak guardrail as a fast first layer against common, literal prompt-injection attacks. It adds no latency overhead and requires no configuration. For semantic coverage beyond literal phrases — rephrasing, encoding tricks, indirect injection — layer a Prompt Guard guardrail after it.

How it works

The guardrail performs exact string matching against a built-in list of 18 attack phrases. Matching is case-insensitive and not restricted to word boundaries by default. When the keywords field is set to a non-empty array, it replaces the 18 built-in phrases entirely — the original list is not merged in.

The guardrail scans the raw request body (on the response target: the raw response body) as one string, so it also matches phrases in the system prompt and in earlier turns. The first phrase that matches is recorded as the block or flag reason.

Agent instructions are trusted author text. On an agent run (an invoke, a draft preview, a scheduled task, the workflow copilot) the system message is the one the gateway built itself: the agent's instructions plus the gateway's own blocks (organization policy, date, output format). The caller cannot supply one. That exact system message is not scanned, so instructions such as "watch out for prompt injection in the reports" no longer block every run. Everything else is still scanned exactly as before: the user's messages, earlier turns, tool results, and any system content that differs from the text the gateway built (for example a fetched page summarised in an inner step). On any other request (chat, plain API) the whole body is scanned, the system prompt included. The agent-authoring helpers (Tidy the wording, the purpose proposal) do not run this guardrail on the agent's instructions at all; see Tidy the wording.

Workflow agent steps. In a workflow's agent step the user message is built from the step's input template. Only the values substituted into it (form fields, webhook and email values, other steps' output) are scanned, each on its own; the workflow's template text and the platform's [Untrusted …] markers are not. A phrase in a value blocks and records where it matched (for example untrusted:form). The rest of the request body is scanned as before. If the gateway cannot tell the parts apart, the whole message is scanned. Details: Prompt Injection — In a workflow agent step.

Malformed keywords values fall back to the built-in list: null, a non-array value, an empty array, and an array without a non-empty string. A mixed array keeps only its non-empty strings.

Tool results

A jailbreak guardrail with target request or both also scans tool results (file reads, RAG, web search, MCP tools, fetched pages, code-interpreter output) before they go back to the model. This scan also decodes base64, rot13, hex and percent-encoded variants and ignores zero-width characters and extra whitespace. It covers the whole of each tool result going back to the model, up to 96 KiB (the 80 KiB tool-result cap plus 16 KiB headroom), except that a document fetched by the agentic fetch is scanned up to its own input limit (about 200 KiB); a tool result stored in a conversation record is scanned over its first 16 KB only.

  • action: "block" — the tool result is withheld; the model receives the placeholder [tool result withheld: blocked by an injection guardrail] instead.
  • action: "flag" — the tool result is passed on unchanged; the match is logged.

Configuration reference

Field Type Default Description
type string — Must be "jailbreak"
name string — Human-readable label for this guardrail instance
action string "flag" What to do on a match: block or flag
target string "request" Which traffic to inspect: request, response, or both
keywords array [] When non-empty, replaces the 18 built-in phrases entirely with this custom list
case_sensitive boolean false Match case-sensitively
whole_word boolean false Match only at word boundaries

Minimal configuration

{
  "type": "jailbreak",
  "name": "jailbreak-check",
  "action": "flag"
}

This is the complete configuration needed. The Jailbreak button in the Guardrail Builder creates a similar configuration with target: "request", case_sensitive: false, whole_word: false, and the 18 built-in phrases copied into keywords.


Built-in phrase list

The following 18 phrases are active when keywords is empty or omitted:

# Phrase
1 ignore previous instructions
2 ignore all instructions
3 ignore your instructions
4 disregard previous instructions
5 disregard your instructions
6 forget your instructions
7 DAN mode
8 do anything now
9 jailbreak
10 developer mode
11 unrestricted mode
12 your true self
13 bypass your guidelines
14 bypass your restrictions
15 override your guidelines
16 override your restrictions
17 prompt injection
18 [SYSTEM]

Customising the phrase list

When keywords is set to a non-empty array, it replaces the 18 built-in phrases entirely:

{
  "type": "jailbreak",
  "name": "custom-jailbreak",
  "action": "block",
  "keywords": ["my custom phrase", "another attack pattern"]
}

Leave keywords empty or omit it to use the built-in defaults.


Layered defence

Layer Guardrail What it catches Latency
1 jailbreak Literal jailbreak phrases (18 built-in, customisable) Sub-millisecond
2 prompt_guard Semantically unsafe requests across 14 policy categories Milliseconds (sidecar call)

The jailbreak guardrail catches literal, unmodified phrases only. Creative rephrasing, character insertion, encoding, or indirect prompt injection embedded in retrieved documents are not caught. Layer a prompt_guard guardrail for semantic coverage — Llama Guard 3 runs locally within Myra's certified infrastructure, so no prompt data leaves the Myra perimeter.


Configuring the jailbreak guardrail

Screenshot: Jailbreak guardrail card in the Guardrail Builder Jailbreak guardrail card — expanded view

Proceed as follows to configure the jailbreak guardrail in the Guardrail Builder:

  1. Open the gateway page (Organisation › AI setup › Gateways) and its Guardrails & residency tab with the Guardrails card.
  2. Click on the Jailbreak button.
    • A collapsed jailbreak guardrail card appears at the bottom of the list. The 18 built-in phrases are copied into its phrase list.
  3. Click on the card to expand it.
  4. Enter a name in the Name text field.
  5. Select the action from the Action drop-down list: block or flag.
    • The drop-down offers only these two actions. A legacy scrub value that is already stored on a jailbreak guardrail is treated as flag.
  6. Select the target from the Target drop-down list: request, response, or both.
  7. If required, change the phrase list:
    • The list is shown under Active phrases, with the banner Custom list active (18 phrases). Each phrase is a chip with a remove button.
    • To add a phrase, type it into the add a phrase… input and click on the Add button (pressing Enter also adds it).
    • If you remove every phrase, the banner changes to Using built-in phrases, the heading changes to Built-in phrases (read-only — add below to override), and the guardrail uses the built-in list.
    • Select the Whole-word matching and Case sensitive checkboxes if required. Both are off by default.
  8. Click on the Save Guardrails button.

-> The jailbreak guardrail is saved and appears in the execution plan.


Pipeline position

The jailbreak guardrail is Tier 1 — it runs in-process with no external calls. All Tier 1 guardrails run before any Tier 2 guardrail. When multiple guardrails are configured, they run in the order they appear in the guardrails array.

A block verdict from this guardrail stops the pipeline immediately. No subsequent guardrails run.


See also