Guard Check Types
A guard is made up of one or more checks. Each check inspects content and, if it matches, contributes a score. The guard combines its checks into a single score out of 10 and fires when that score reaches the guard's threshold. You manage checks on the Checks tab of the guard editor.

Common fields
Every check, regardless of type, has:
| Field | Description |
|---|---|
| Name | A label for the check, shown in the checks list and in results |
| Type | One of the five types below |
| Certainty | The score this check contributes when it matches, on a 0-10 scale (for example, 10/10) |
| Enabled toggle | Turns the individual check on or off without removing it |
After editing checks you must select Save Checks for the changes to take effect.
The five types
| Type | What it does | Key configuration |
|---|---|---|
| Built-in | Uses one of Willow's managed detectors (secrets, PII, prompt injection, and so on) that run locally | Select the detector; no expression to write |
| Regex | Matches content against a regular expression | The pattern |
| JSONata | Evaluates a JSONata expression against structured payloads, for matching on specific fields or shapes | The expression |
| LLM | Sends the content to your connected model with a detection prompt and interprets the model's judgment | The prompt |
| Function | Runs custom logic for cases the other types cannot express | The function body |
Built-in
Built-in checks wrap Willow's own detectors, the same engines behind the built-in guards. They run on your infrastructure with no external API calls. Use them when a managed detector already covers what you need, such as API keys, credit card numbers, or SSNs.
Regex
A Regex check matches content against a pattern. Regex checks are deterministic: content that matches typically scores at the check's certainty (often 10/10), and content that does not match scores 0. They are ideal for well-defined formats like email addresses, IP addresses, or a specific token shape.
JSONata
A JSONata check evaluates an expression against the structured tool payload rather than raw text. Use it to match on a particular field, a nested value, or the shape of an argument, for example flagging a call only when a specific parameter is present.
LLM
An LLM check describes what to detect in natural language and lets your connected model judge the content. The editor provides a Name, a certainty score, and an LLM Prompt. Use LLM checks for fuzzy or context-dependent risks that a pattern cannot capture, such as "content that describes how to exfiltrate data."
LLM checks call your configured AI provider. They require Bring Your Own AI to be enabled under Settings › AI Settings.
Function
A Function check runs custom code against the content, for logic that none of the other types express cleanly. Use it as an escape hatch when you need bespoke matching.
How checks combine
The guard evaluates each enabled check against the content. The guard's overall score is the highest check score, so a single strong match is enough to reach the threshold. Each matched check appears in the result with its own score, which the Playground shows in the per-check breakdown.
For example, an Email Address Detection guard with two checks (Email Address and Mailto Link) scoring 10 and 0 on the input mail@example.com produces a guard score of 10/10, which meets an 8/10 threshold and fires.
Add Check with AI
Instead of writing a check by hand, select Add with AI on the Checks tab. The modal asks what the check should detect and offers a Check Type dropdown:

- Auto (let AI decide) lets Willow pick the most suitable type.
- Choosing Regex, LLM, JSONata, or Function constrains the generated check to that type.
Select Generate Check and Willow creates a check from your description. It appears in the checks list, where you can refine its fields and certainty before saving.
Add with AI is only available once Bring Your Own AI is configured under Settings › AI Settings. Without a connected AI provider the option does not appear, and you add checks manually instead. The same applies to LLM checks, which call your provider each time they run.