Policies & Rules
In Dmint, a policy is a static, declarative JSON document specifying the exact authorization boundaries for AI tool calls. Policies are authored at development time, validated offline against strict schemas, and loaded into Core at runtime.The Policy Schema (policy.json)
Here is an example production policy:
policy.json
Rule Effects
Every rule must declare one of three effects:Evaluation Invariants
When evaluating an incoming request:1. Fail-Closed Default
If an agent requests an action that does not match any rule inpolicy.json, Dmint fails closed:
2. First-Match Determinism
Rules are evaluated sequentially in the order they appear inpolicy.json. The first rule whose (tool, action, resource) matches the requested capability determines the decision.
Offline Validation (LLM-Free)
Before deploying a policy to production, always verify its syntactic and semantic integrity usingdmint-cli:
- JSON syntax and schema compliance
- Presence of required fields (
policy_version,rules,effect,tool,action) - Absence of unknown keys or invalid effect values
- Maximum safe size limits to prevent resource exhaustion
0:
Next Steps
Authoring Policies Guide
Use the interactive CLI wizard to convert natural language into policy.json.
Policy Schema Reference
Inspect the formal JSON schema and validation constraints.