Skip to main content

Rules: check agent work before and after each step

Beta - Preview

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.
Availability

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​

TaskRole needed
Test the Rule ControllerWorkspace Manager or Settings Manager
Add a Jev keyWorkspace Manager
Set the rule policy, create and edit rulesWorkspace Manager or Policy Maker
Read rules, rule activity and the audit trailWorkspace Manager, Policy Maker, Policy Auditor or Auditor
Pick rule controls when starting a jobAnyone who can run jobs
Approve, deny or re-evaluate a paused checkpointWorkspace 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.

Recommended card

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.

Running jobs keep their key

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.

SituationChoicesDefault
Must-pass violationStop, PauseStop
Approval-required violationStop, Pause for approvalPause for approval
Controller failure (Jev unreachable, or an uncertain result)Stop, Pause for retryPause for retry
Unsupported controller (the agent cannot run checkpoints)Refuse, Wait for readinessRefuse

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

FieldWhat to enter
Rule nameA short statement of the rule, for example "Do not disclose restricted information".
When to evaluateBefore a step, After a step, or Before and after each step.
SeverityWarning 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:

ModeThe rule applies to
CompulsoryEvery agent and mission
SelectedOnly the Agents and Missions you pick
On demandA 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:

TypeUse it forHow the verdict is decided
Check a conditionA 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.
RateAn 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 categoryNamed 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 inApplies to
Rules (workspace)The jobs that match its Applies to mode
The Rules tab of a missionEvery job of that mission
The Rules tab of a jobThat 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.

Next: see what happens when a job runs with rules.