Skip to content
AgentOS
DocumentationPermissions and policies

Platform

Permissions and policies

Write, test and enforce policies, with approvals for high-risk actions.

Policies decide what agents may do. They are evaluated in the execution path, before a tool call, a memory access or a model request runs, and each decision is recorded with the rule that produced it.

policies/payments-over-1000.yamlYAML
id: payments-over-1000description: Money movement above $1,000 needs a finance approver.mode: enforceapplies_to:  tools:    - stripe.create_refund    - internal-erp.post_journal_entryrules:  - effect: allow    when: args.amount <= 1000  - effect: require_approval    when: args.amount > 1000    approvers: ["group:finance-controllers"]    timeout: 4h    on_timeout: deny

How a decision is made

  1. The policies whose applies_to matches the action are collected. A policy can apply to tools, agents, sandboxes or the whole workspace.
  2. Within a policy, rules are read from top to bottom, and the first rule whose when matches gives the policy's answer. A rule without when always matches.
  3. Across policies, the strictest answer wins: deny over require_approval over allow.
  4. If no policy allows the action, it is denied.

Effects

EffectResult
allowThe action runs.
require_approvalThe run pauses until an approver decides.
denyThe action does not run. The run is marked as blocked and shows the rule's reason.

Conditions

A when expression compares values from the request.

ValueContains
argsThe arguments of the tool call, such as args.amount.
agentThe agent, its granted tools, its budget and its spend today.
run.contextValues set by the trigger, such as a ticket's priority.
requestFor sandbox network rules, the host being contacted.

Expressions support comparisons, and, or and in, and helpers such as pii(email, phone), which matches when the arguments contain personal data of those kinds.

Approvals

A require_approval rule names the approvers, the channel, a timeout and what happens when the timeout passes. Approvers decide from chat, by email or in the console, and they see the agent, the action and its arguments before deciding.

Monitor mode

A policy with mode: monitor is evaluated but not enforced. Its decisions are logged as what would have happened, so you can measure a new rule on real traffic before switching it to enforce.

Tests

Each policy carries example requests and the decision each one must get. Tests run whenever the policy changes, and a change that fails a test is not deployed.

Roles and sign-in

Policies govern agents. Roles govern people. Members sign in through your identity provider, and its groups can be mapped to roles and to approval groups.

RoleCan do
OwnerFull access, including billing and deleting the workspace.
AdminManage members, integrations, policies and settings.
BuilderCreate and deploy agents in the environments they are granted.
ApproverApprove or reject actions routed to them or their groups.
ViewerRead-only access to agents, runs and the audit log.

The policies view in the demo console shows policies with their tests and recent decisions.