Skip to main content
A content tag is a classification you can reference when writing a policy. 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: match on one or more content tags, then choose an action.
Content-tag conditions currently support Block and Alert actions. Require human approval and Security escalation aren’t available for content-tag conditions yet.
For example, to block any tool call whose content matches your “API keys” tag:
1

Name your policy

2

Set conditions

3

Apply action

On self-hosted deployments, content-tag conditions currently support Alert only. Block enforcement for content tags isn’t available self-hosted yet.

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.