Keep users safeGuard

Policy rules

Write behaviour as YAML your compliance team can read.

Policy rules match on a user's state, their message or the time since they were last seen, then fire an event, adjust settings for that turn, set the safety action or skip the model. Rules are validated when they compile and can be tested before they go live.

Policy · sustained_low_mood

rules:
  - name: sustained_low_mood
    priority: 80
    when:
      all:
        - mood < 0.3
        - interaction_count > 1
    actions:
      - type: fire_event
        event: proactive.policy_sustained_distress
        cooldown: 1h

Test run · mood 0.24

Matched

fire_event → proactive.policy_sustained_distress

Illustration of a policy rule and its test run
Examples

Rules people can review

Each rule has a name, an optional priority from 0 to 100, a condition and a list of actions.

yaml
version: 1
rules:
  - name: sustained_low_mood
    priority: 80
    when:
      all:
        - mood < 0.3
        - interaction_count > 1
    actions:
      - type: fire_event
        event: proactive.policy_sustained_distress
        cooldown: 1h
Conditions

What a rule can match

  • all, any and not, nested as deep as you need
  • Comparisons on mood, energy, trust, familiarity, sentiment, interaction count and risk score
  • between ranges, such as trust between [0.2, 0.5]
  • message_contains: case-insensitive phrases
  • message_matches: a regular expression
  • since_last_seen, such as "> 48h"
  • detected_emotions_include: any of a list
Actions

What a rule can do

  • fire_event: send a proactive.* webhook, with a cooldown per user
  • patch_config: adjust empathy, formality, sharpness, delay or jitter for this turn
  • override_safety: set PROCEED, HOLD or BLOCK, tagged with the rule's name
  • annotate: tag the interaction for later review
  • stop: skip the model and reply with the policy's message

Author, test, ship

  1. 1

    Start from a template

    Starter policies cover common patterns, so you edit rather than write from scratch.

  2. 2

    Test it

    Run the rule against a sample state and message to see exactly which actions it would emit.

  3. 3

    Ship and watch

    Every execution is logged with the rule that fired, so you can check it behaves as intended.

Policy questions

Something else? Ask us.

Every AI should know who it's talking to.

The safety and human-oversight layer for emotional AI: user state across sessions, risk alerts, safety gates and human takeover, with every decision explained.