> ## Documentation Index
> Fetch the complete documentation index at: https://www.osohq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Policies

> Define rules that control what AI agents are allowed to do across your organization.

<Note>
  Policies are coming soon. Talk to us if you'd like early access.
</Note>

Policies let you move beyond observing what agents do, to actively controlling them. You can target individual or groupings of tool calls, limit specific operation types like writes or deletes, restrict entire integrations, block a specific agent outright, or trigger on agent discovery before any tool call is made. Additionally, actions go beyond blocking - you can alert, require human approval, or trigger a security escalation that blocks the call and immediately notifies your security team.

## Writing a policy

MCP servers are a common way agents invoke tools, but they're not the only surface. Agents are resourceful, and if one route is blocked, they may find another: a CLI command, an SDK call, or a direct API request.

Oso canonicalizes tool calls across all surfaces. It maintains a built-in catalog of known tools for each supported integration, with each tool classified by operation type: **Read**, **Write**, or **Delete**. You write one policy, and Oso enforces it regardless of how the agent invoked the tool.

Start by setting your conditions. You can match on integration, operation type, a specific tool name, agent name, or review status, in any combination. Then choose an action: **Block** the call outright, **Alert** and notify via Slack, **Require human approval** before the call goes through, or trigger a **Security escalation** that blocks the call and immediately notifies your security team.

For example: to block all writes to GitHub, set the integration to GitHub, the operation to Write, and the action to Block. It applies whether the agent used the GitHub MCP server, ran a git command from the CLI, or called the GitHub SDK directly.

## Supported integrations

Policies cover MCP server calls, CLI commands, and SDK calls. A policy on Git covers `git commit`, `git push`, `git clean`, and every other git command, regardless of whether the agent invoked it through an MCP server, directly from the CLI, or via an SDK.

<div style={{display: "flex", flexWrap: "wrap", gap: "24px", alignItems: "center", margin: "16px 0"}}>
  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/github.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=77274203c0a609d364de7b62671ab03b" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="GitHub" title="GitHub" width="16" height="16" data-path="images/integrations/logos/github.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/atlassian.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=f9f864faf4a385f16244d260bbd06c2e" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Atlassian" title="Atlassian" width="48" height="48" data-path="images/integrations/logos/atlassian.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/notion.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=fd9dbb50de02dcae11b91f6bd7e1ced9" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Notion" title="Notion" width="800" height="800" data-path="images/integrations/logos/notion.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/google_drive.png?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=ddfc6d631ad0563da8a9e25ad3a227ac" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Google Drive" title="Google Drive" width="330" height="295" data-path="images/integrations/logos/google_drive.png" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/gmail.png?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=6d7b6e257714c98f355d5d1971d35d55" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Gmail" title="Gmail" width="330" height="248" data-path="images/integrations/logos/gmail.png" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/linear.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=0171ea09be200893f5ba2be6c19c30ea" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Linear" title="Linear" width="24" height="24" data-path="images/integrations/logos/linear.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/dropbox.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=7e0be549dc65098502cb3e06c992d304" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Dropbox" title="Dropbox" width="64" height="64" data-path="images/integrations/logos/dropbox.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/datadog.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=3e25c55e7c6e09f502df0eefd1ad797d" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Datadog" title="Datadog" width="800" height="800" data-path="images/integrations/logos/datadog.svg" />

  <img src="https://mintcdn.com/osoinc/cYMS27IAOLqEra6m/images/integrations/logos/git.svg?fit=max&auto=format&n=cYMS27IAOLqEra6m&q=85&s=0d24bd80415b17b490ad13d55898b3dd" style={{height: "40px", width: "40px", backgroundColor: "white", borderRadius: "6px", padding: "4px"}} alt="Git" title="Git" width="800" height="800" data-path="images/integrations/logos/git.svg" />
</div>

More integrations are being added. If you need support for a specific one, reach out.

## Example policies

### Security escalation on GitHub writes and deletions

A single policy covers the full GitHub surface. No need to enumerate individual tools or API calls.

<Steps>
  <Step title="Name your policy">
    ```yaml theme={null}
    Name: Security escalation on GitHub writes and deletes
    ```
  </Step>

  <Step title="Set conditions">
    ```yaml theme={null}
    When: An agent makes a tool call
      If: Tool belongs to GitHub
      If: Tool call type is Write or Delete
    ```
  </Step>

  <Step title="Apply action">
    ```yaml theme={null}
    Action: Security escalation ("block and notify security team immediately")
    ```
  </Step>
</Steps>

***

### Require human approval before deleting a Linear issue

Target a specific tool call for tighter control over high-impact actions.

<Steps>
  <Step title="Name your policy">
    ```yaml theme={null}
    Name: Human approval for Linear deletions
    ```
  </Step>

  <Step title="Set conditions">
    ```yaml theme={null}
    When: An agent makes a tool call
      If: Tool belongs to Linear
      If: Tool name is Delete issue
    ```
  </Step>

  <Step title="Apply action">
    ```yaml theme={null}
    Action: Require human approval
    ```
  </Step>
</Steps>

***

### Alert when Cursor makes any delete call

Scope a policy to a specific agent without applying the same rule org-wide.

<Steps>
  <Step title="Name your policy">
    ```yaml theme={null}
    Name: Alert on Cursor deletes
    ```
  </Step>

  <Step title="Set conditions">
    ```yaml theme={null}
    When: An agent makes a tool call
      If: Agent name is Cursor
      If: Tool call type is Delete
    ```
  </Step>

  <Step title="Apply action">
    ```yaml theme={null}
    Action: Alert
    ```
  </Step>
</Steps>

***

### Alert when an unsanctioned agent is discovered

Fire the moment a disallowed agent appears in your inventory, before it has made any tool calls.

<Steps>
  <Step title="Name your policy">
    ```yaml theme={null}
    Name: Alert on disallowed agent discovery
    ```
  </Step>

  <Step title="Set conditions">
    ```yaml theme={null}
    When: An agent is discovered
      If: Agent review status is Disallowed
    ```
  </Step>

  <Step title="Apply action">
    ```yaml theme={null}
    Action: Alert
    ```
  </Step>
</Steps>

## Get early access

Policies are in active development. Reach out to get involved in the early access program.
