DSL Overview
The Actra DSL is a declarative language for defining what can run, under which conditions, and within what governance boundaries.
It is designed to be:
- deterministic
- runtime-safe
- easy to review
- portable across JavaScript and Python runtimes
Every Actra policy system is built from six first-class blocks.
1) Schema
The schema defines the shape of data the runtime and policies are allowed to reference.
This includes:
- actions
- actor
- snapshots
- field types
The schema is the contract between your application and the policy engine.
2) Policy
The policy defines rules that decide whether an action should be allowed or blocked.
Policies contain:
- scoped rules
- conditions
- effects
- rule identifiers
This is where the control logic lives.
3) Governance
The governance block defines the boundaries of what policies are allowed to control.
It establishes:
- valid action surfaces
- inspection boundaries
- allowed effects
- execution guarantees
Governance ensures policies remain safe and predictable.
4) Actor
The actor block models the identity attempting an action.
This can represent:
- users
- services
- workflows
- AI agents
Policies often use actor data for role-aware decisions.
5) Action
The action block represents the operation being admitted by the runtime.
Examples include:
- refund
- deploy
- execute_tool
- approve_workflow
Actions are the primary admission surface in Actra.
6) Snapshots
Snapshots represent external runtime state captured before execution.
Examples:
- fraud status
- deployment freeze
- account health
- quota limits
Snapshots allow policies to reason about the current world safely.
Mental Model
Think of the DSL as:
Schema defines the world
Policy defines the logic
Governance defines the boundaries
Runtime admits the action
Next Steps
- Learn the full Schema DSL
- Write scoped rules in Policy
- Define execution boundaries in Governance