Skip to content

How policies work

A policy is the governance principle for what your application allows. For example, a policy can state that only trusted agents may act, or that a sensitive action needs a stronger check. You create a policy by creating rulesets. A ruleset holds the rules Agent Governance evaluates when your backend asks for a decision, and it returns an outcome your application enforces. This article explains how a policy, a ruleset, and its rules fit together, and how modes and publishing control when a ruleset takes effect.

Policies and rulesets

A policy is expressed as one or more rulesets. Each ruleset is an ordered list of rules. Each rule has:

  • One or more conditions on signals, such as Current Actor or Current Platform ID. Conditions combine with And or Or, and Not negates a group.
  • A result: Allow, Challenge, or Deny.
Note

Agent Governance evaluates the rules in a ruleset in order and returns the result of the first rule that matches. If no rule matches, the ruleset defaults to Allow. You write rules for the cases you want to stop, challenge, or limit.

Data sources

A ruleset's signals come from a data source. For agent decisions, the data source is Agent Intelligence, which contributes session signals such as who is acting, which agent platform is involved, and how the session has behaved so far. For the full list of signals, see Manage policies.

A ruleset's data source is fixed once you publish it. You choose the data source when you build the ruleset, and you cannot change it afterward.

Modes

A ruleset has three modes:

  • Draft: An unpublished working copy. Add and edit rules here. A draft is never evaluated, so it does not affect your application.
  • Monitor: Agent Governance evaluates the ruleset on your real data and logs the result, but does not perform any action. Use Monitor to confirm a ruleset behaves as you expect before it affects your application.
  • Enforce: Agent Governance evaluates the ruleset and returns the result for your backend to act on.

The same ruleset can hold a different version in each mode at the same time, which works like versioning. For example, you can keep your tested rules in Enforce in production, run a set of rules you are still evaluating in Monitor, and work on new rules in a Draft—all at once. Publishing a draft to Monitor or Enforce replaces that mode's current version. You can promote a ruleset from Monitor to Enforce. That replaces the enforced version. You cannot move a ruleset from Enforce back to Monitor.

Publishing

You edit rules in the Draft, then publish to put a version into effect. When you publish, you choose the mode—Monitor or Enforce. Publishing locks the ruleset's data source. You can keep editing in the draft and publish again. Promotion only goes from Monitor to Enforce.

To create a ruleset, add rules, and publish it, see Manage policies.