Rules: check agent work before and after each step
Rules with Jev are in preview. The feature is enabled per workspace on request, and its behaviour and screens may change.
A rule is a check written in plain language, such as "Do not disclose restricted information". Studio asks Jev, an evaluation model by TypeSafe, whether each agent step respects it, then lets the work continue, pauses it for a person, or stops it.
- You decide what happens. Each rule is a warning, an approval gate or a hard stop.
- Jobs keep the rules they started with. Editing a rule never changes a running job.
- Everything is recorded. Every evaluation, approval and rule change lands in an audit trail.
Rules is in the Audit section of the sidebar. If it is missing, ask Runwaize to enable it for your workspace.
Who can do what
| Task | Role needed |
|---|---|
| Test the Rule Controller | Workspace Manager or Settings Manager |
| Add a Jev key | Workspace Manager |
| Set the rule policy, create and edit rules | Workspace Manager or Policy Maker |
| Read rules, rule activity and the audit trail | Workspace Manager, Policy Maker, Policy Auditor or Auditor |
| Pick rule controls when starting a job | Anyone who can run jobs |
| Approve, deny or re-evaluate a paused checkpoint | Workspace Manager or Policy Maker who can see the mission |
Set up in three steps
1. Configure the Rule Controller
The Rule Controller is the Jev credential Studio uses to evaluate rules. There is nothing to select: Studio picks it for you.
- Your workspace has an active Jev key: it is used for every Jev call. Open LLM Integrations and click Add Jev key on the Recommended card. You can also click Add API key and choose the provider Jev (TypeSafe). With several active Jev keys, the most recently updated one is used.
- Your workspace has an active OpenRouter key and no Jev key: the OpenRouter key is used. OpenRouter serves Jev, so you do not need a second key.
- Your workspace has neither: the Runwaize-managed credential is used, when Runwaize has enabled it for your deployment.
To see the key in use, open Rules and click Test controller. The Rule Controller popup shows Status, Credential and Last check. Click Test connection to run a live check. The status shows Ready when it succeeds and Unavailable with the reason when it fails. Jobs with active rules cannot start while no key is available.
The popup links to LLM Integrations for Workspace Managers. Other users see a request to ask a Workspace Manager.
The Recommended Jev card stays on LLM Integrations until the workspace has an active Jev key. An OpenRouter key does not remove it, but it still serves Jev.
In LLM Integrations, you can edit a key to load the provider's current models and pick the models the key may use.
A job is admitted with the key available at that moment and keeps it. Adding or disabling a Jev key only affects jobs started afterwards.
2. Set the rule policy
Open Rules and select the Policy tab. Only users who can write rules see this tab. The tab shows Rule policy. For each situation, choose the default outcome and which alternatives a job starter may pick instead.
| Situation | Choices | Default |
|---|---|---|
| Must-pass violation | Stop, Pause | Stop |
| Approval-required violation | Stop, Pause for approval | Pause for approval |
| Controller failure (Jev unreachable, or an uncertain result) | Stop, Pause for retry | Pause for retry |
| Unsupported controller (the agent cannot run checkpoints) | Refuse, Wait for readiness | Refuse |
Click Save policy. Policy Makers can change the policy without access to the controller credential.
3. Create a rule
On Rules, create a rule and fill in two sections.
Basics
| Field | What to enter |
|---|---|
| Rule name | A short statement of the rule, for example "Do not disclose restricted information". |
| When to evaluate | Before a step, After a step, or Before and after each step. |
| Severity | Warning records the result and lets work continue. Approval required pauses for an authorized decision. Must pass prevents work until it passes. |
Applies to
A workspace rule has an Applies to section. Choose one of three modes:
| Mode | The rule applies to |
|---|---|
| Compulsory | Every agent and mission |
| Selected | Only the Agents and Missions you pick |
| On demand | A job only when the person who starts it turns the rule on |
For Selected, pick at least one agent or mission. If you pick both agents and missions, a job must match both lists. Studio offers only agents that your workspace can use. If a selected rule has no usable agent or mission left, the list shows "This rule no longer applies to anything."
What to evaluate
Describe the condition under What should be checked?, then pick how Jev answers:
| Type | Use it for | How the verdict is decided |
|---|---|---|
| Check a condition | A yes/no question. Jev returns a probability of violation. | Passes at or below Pass ≤ (default 30%), is a violation at or above Violation ≥ (default 70%). In between, the result is uncertain. |
| Rate | An ordered rubric of 2 to 10 levels. | You set a Cutoff and whether a pass is at or above it, or at or below it. |
| Choose a category | Named categories, each mapped to pass, violation or uncertain. | The chosen category's outcome is the verdict. |
Rate and Choose a category also take a Minimum confidence (default 70%). Below it, the result is uncertain. Every level and category needs a name and criteria before you can save.
Then choose:
- Save draft to keep working. Drafts are never evaluated.
- Activate rule to apply it to jobs started from now on.
Add a Change note when you edit a rule. It appears in the rule's revision history.
Where a rule applies
A rule belongs to one scope, and applies to everything below it:
| Created in | Applies to |
|---|---|
| Rules (workspace) | The jobs that match its Applies to mode |
| The Rules tab of a mission | Every job of that mission |
| The Rules tab of a job | That job only |
The Applies to section shows only when you create or edit a workspace rule. The form of a mission rule or a job rule does not have it.
On a mission or job, rules from a higher scope are listed as Inherited and are read-only there. Edit them where they were created.
Test a rule before activating it
In the rule form, the Optional test box lets you paste a sample step context, choose Before or After and click Run test. Studio shows the verdict, or Needs more context when the result is uncertain.
The test calls Jev but runs no agent action, and it is never required to activate a rule.
Deactivating a rule
Click Deactivate on an active rule to stop it. The rule and its revisions are kept so that jobs which ran under it stay explainable.