> ## 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.

# Content Tags

> Classify sensitive content in agent sessions, then reference it directly in policies.

A content tag is a classification you can reference when [writing a policy](/docs/oso-for-agents/policies). Once a policy references a tag, Oso runs that tag's detectors against prompts, completions, and tool calls to check for a match. Policies reference the tag, not the individual detectors, so you can tune what a tag matches without rewriting the policies that depend on it.

## Built-in tags

Oso ships with built-in tags for API keys and credentials, and flags sensitive data and documents moving through agent sessions. Built-in tags are managed by Oso and can't be edited or deleted, but you can still reference them in a policy the same way you'd reference a custom tag.

## Custom tags

Create a custom tag to detect sensitive information specific to your application or organization - things Oso's built-in tags don't cover, like a social security number format, an internal project identifier, or another application-specific data pattern.

A tag is one or more detectors. Each detector has:

* A **regex pattern** matched against session content (for example, `\b\d{3}-\d{2}-\d{4}\b` to match a social security number)
* An optional **description**
* A **Reduce false positives** toggle. When on, an LLM reviews each match before it counts, at the cost of added latency since every match waits on the model.

Give the tag a name (for example, "Customer SSNs"), then add one or more detectors. A tag with a single detector uses a simplified form; add a second detector to a tag and Oso reveals per-detector name fields so you can tell them apart.

## Using tags in policies

Once a tag exists, you can add it as a condition when [writing a policy](/docs/oso-for-agents/policies): match on one or more content tags, then choose an action.

<Note>
  Content-tag conditions currently support **Block** and **Alert** actions. Require human approval and Security escalation aren't available for content-tag conditions yet.
</Note>

For example, to block any tool call whose content matches your "API keys" tag:

<Steps>
  <Step title="Name your policy">
    ```yaml theme={null}
    Name: Block API key leaks
    ```
  </Step>

  <Step title="Set conditions">
    ```yaml theme={null}
    When: An agent makes a tool call
      If: Content matches tag "API keys"
    ```
  </Step>

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

<Note>
  On self-hosted deployments, content-tag conditions currently support **Alert** only. Block enforcement for content tags isn't available self-hosted yet.
</Note>

## Managing tags

You can't delete a tag that's still referenced by a policy; remove it from those policies first.

## Where to find it

Content tags live under **Classify → Content tags** in the Oso dashboard.
