Skip to main content

Policy

Every action an agent takes is a request for a capability, with a target (the tool, the path, the host, the server). The policy decides each request: allow it, deny it, or ask a person. An ask pauses the run until someone decides (durable runs); the security model explains the design.

How a request is decided

  1. A deny rule that matches wins.
  2. Otherwise an ask rule that matches: a person decides. An ask outranks an allow, so adding an allow rule to a profile does not lift that profile’s asks; remove the ask rule, or write your own policy.
  3. Otherwise an allow rule that matches.
  4. Otherwise the policy’s mode decides: permissive allows, interactive asks (reason unknown_capability), strict denies.
A decision is recorded in the run’s trace with its effect and reason_code (matched_allow, matched_ask, matched_deny, unknown_capability, approved when a person allowed an ask, and others). Two capabilities are decided when the agent connects, not during a run: mcp.server.start and mcp.server.connect. There is no run to pause then, so an ask on them fails the connection with ApprovalRequiredError; allow the servers you trust. The served agent’s policy also decides what an operator asks of OmniServe’s background API: background.task.* and background.run.*. A refusal there is an HTTP 403.

Writing a rule

Or the whole policy as a dict:

Capabilities

Built-in profiles

Each profile below is build_default_policy(name). Start from one and add rules, or write your own policy.

permissive-dev

Mode permissive.

interactive-dev

Mode interactive.

strict-production

Mode strict.