Skip to content

The Policy

The Policy is one YAML file per agent, overmind.yaml, kept in the agent’s repository. It says which tools the agent has and how risky each is, which business rules it follows, which data it may handle, what it may spend and how strictly Shield acts in each environment.

It is yours. It is versioned with the code, reviewed in pull requests like the code, and a change to it triggers a run like a change to the code.

The same file is read in two places:

  • In CI, OverMind generates tests from it and adds them to the catalog tests for the agent’s type.
  • In production, Shield enforces it on the agent’s tool calls, model calls and data.

Because both come from one file, what was verified is what runs. There is no second configuration to keep in step.

overmind init creates the Policy from a template for the agent’s type. There are five: customer service, collections, sales assistant, internal helpdesk and back-office processing.

A template is a starting point. Replace its example rules with your own process before you rely on the result.

agent: collections
template: customer-service
languages: [es, en]
expected_load: { concurrent_users: 200 }
tools:
get_order: { risk: read }
create_payment_plan: { risk: write, approval: "amount_mxn > 10000" }
send_email: { risk: write, only_to: registered_address }
delete_customer_data: { risk: destructive, approval: always }
rules:
must:
- id: approval-notice
when: the customer asks for a payment plan
then: say that the plan is subject to approval
never:
- id: no-tax-advice
do: give tax, legal or medical advice
escalate:
- id: legal-threat
when: the customer threatens legal action
data:
allowed: [internal]
forbidden_out: [pii, payment_credentials]
limits:
cost_per_task_usd: 0.35
cost_per_day_usd: 250
tool_calls_per_task: 12
steps_per_task: 25
runtime:
staging: { posture: observe }
production: { posture: control, on_violation: block_and_escalate, notify: security-oncall }
Section What it declares
agent, template, languages Which agent this is, the template it started from and the languages it is tested in
expected_load The concurrent users you expect. Capacity is measured against this number
tools Each tool with its risk (read, write, destructive), limits on its arguments and when it needs approval
rules What the agent must do, must never do and must hand to a person, in plain language
data The data classes the agent may handle and the ones that must never leave
limits Budgets per task and per day: cost, tool calls and steps
runtime Shield’s posture per environment and what happens on a violation. Used only when Shield is enabled

The file is validated against its schema. A rule that cannot be compiled fails the run and names its line and the reason.

The difference matters most in production.

Structural rules Behavior rules
Sections tools, data, limits and approvals rules: must, never, escalate
Written as Names of actions, arguments, data classes and numbers Plain language
In CI Tested Tested with generated cases and the judge
In production Enforced by Shield deterministically, before the action happens Sampled and judged after the fact. A violation opens a finding

Shield never blocks inline on a behavior rule. A sentence such as “never give tax advice” needs judgment to evaluate, and a judgment can be wrong. What stops a harmful action is a structural rule: the tool is not allowed, the amount needs approval, the data class may not leave.

When a behavior rule protects something that matters, back it with a structural one. “Tell the customer the plan is subject to approval” is behavior. approval: "amount_mxn > 10000" is what makes sure the plan cannot be created without it.

For each must, never and escalate rule, OverMind generates business cases and plays each one with five simulated user profiles: legitimate, confused, malicious, limited permissions and trying to bypass. Generated cases are kept per version of the Policy, so a pull request that does not touch the file reuses them and its result stays comparable with the baseline.

The structural sections are tested as well. A run checks that a tool cannot be called outside its rules, that forbidden data classes do not leave and that the limits hold under loops and long tasks.

The Policy screen of an agent shows the file at its current version and which rules, tools and limits have tests.

A change to the Policy is a pull request. The check runs on it, and the summary notes that the Policy changed since the baseline, because part of any difference in the result may come from the new rules rather than from the agent.

In production, each rule can be in monitor or in enforce, so a team moves one rule at a time instead of switching the whole Policy at once. See Postures.