Skip to content

Policy DSL Documentation

A natural-language policy platform — write rules in plain English and evaluate them against JSON data in real time.

Policy DSL lets you express business rules in near-English sentences:

A **Person** gets approved
if the __age__ of the **Person** is greater than 18
and the __status__ of the **Person** is equal to "active".

The platform evaluates this rule against JSON data and returns a pass/fail result with a full evaluation trace.

Human-Readable

Rules read like natural language. Non-technical stakeholders can review and understand policies.

Machine-Executable

POST a rule and data to the Execution API and get an instant pass/fail result with trace.

Rich Operators

Comparison, date/time, list, validation, and pattern matching operators built in.

Composable

Build complex policies from smaller rules using labels and cross-references.

The policy system has three main user-facing parts:

  1. General API — stores policies and flows, and manages drafts, versions, ownership, groups, audit, and tenant-scoped access control
  2. Execution API — evaluates ad hoc rules and stored policies or flows against JSON data
  3. Dashboard — UI for creating, editing, testing, publishing, reviewing, and administering policies and flows

This documentation covers the DSL language, all operators, and the platform APIs.

If you are evaluating the enterprise deployment model, read Enterprise Isolation.

Official SDKs are now available for the main integration targets:

LanguagePackageInstall
Gogo-sdkgo get github.com/policies2/go-sdk
Pythonpolicies2pip install policies2
TypeScript@policies2/sdknpm install @policies2/sdk
Rustpoliciescargo add policies

See the SDKs page for the full list and positioning.