Skip to content

PolicySet

A collection of DSL policy rules with optional interception point and tool scope bindings. This is the top-level configuration object for DSL-authored policy sets.

Schema ID: https://agentpolicyspecification.github.io/schemas/v0.1.0/policy-set.schema.json

Properties

PropertyTypeRequiredDescription
aps_versionstringYesThe APS spec version this policy set targets (e.g. "0.1.0")
policiesPolicyEntry[]YesThe ordered list of policy rules in this set

PolicyEntry

A DSL policy rule with optional scope restrictions.

PropertyTypeRequiredDescription
conditionConditionYesThe condition evaluated against the context
action"allow" | "deny" | "redact" | "transform" | "audit"YesThe action to take when the condition matches
reasonstringNoHuman-readable reason, typically used with deny
redactionsRedaction[]When action is "redact"Redaction instructions
transformationobjectWhen action is "transform"Field transformation map
applies_to("input" | "output" | "tool_call")[]NoInterception points this policy applies to. Omit to apply to all.
toolsstring[]NoTool names this policy applies to. Only evaluated when applies_to includes "tool_call". Omit to apply to all tools.

See DSLPolicy for the full Condition reference.

Example

yaml
aps_version: "0.1.0"
policies:
  - condition:
      always: true
    action: audit
    reason: Log all interactions.

  - condition:
      field: tool_name
      not_in: [web_search, read_file, summarize]
    action: deny
    reason: Tool is not in the approved list.
    applies_to: [tool_call]

  - condition:
      field: response.content
      contains: ["credit card", "card number"]
    action: redact
    redactions:
      - field: response.content
        strategy: replace
        pattern: '\b(?:\d[ -]?){13,16}\b'
        replacement: "[REDACTED]"
    applies_to: [output]

Download

policy-set.schema.json

Released under the Apache 2.0 License.