Architecture & Mental Model

Dmint is built on a simple premise: AI agents propose actions, but code and deterministic policy authorize them. To understand how Dmint secures tool execution, here are the four core primitives:

The Four Primitives

1. Capabilities

A capability identifies an actionable operation in the format tool.action:
  • database.select
  • filesystem.read_file
  • bash.execute_command
Policies assign rules to capabilities matching resources (e.g. table names, file paths, or wildcards *).

2. Exact Request Binding

Unlike human RBAC (which grants broad permissions like “user may update rows”), Dmint approvals authorize one exact request payload:
  • The tool name (postgres)
  • The action (update)
  • The sorted, type-preserved arguments ({"table": "users", "id": 42})
  • The deployment epoch
These values are canonicalized via RFC 8785 JSON Canonicalization Scheme (JCS) and hashed with SHA-256 to produce an immutable 64-character fingerprint.

3. Declarative Policies

Policies are defined in policy.json. Every rule has:
  • effect: allow, deny, or approval_required
  • tool: the target tool namespace
  • action: the target action name
  • resource: a specific resource string, glob pattern, or *
Fail-Closed Invariant: If a request does not match any rule in policy.json, Dmint defaults to DENY. There is no implicit allow.

4. Single-Use Approval State Machine

When an operation triggers APPROVAL_REQUIRED:
  1. PENDING: Request is saved into SQLite with its canonical fingerprint and parameter snapshot.
  2. APPROVED: A human approver inspects the payload and signs an assertion using Ed25519.
  3. CONSUMED: The agent retries the call. Dmint validates the signature against the active policy, checks that the fingerprint matches, and atomically transitions the record to CONSUMED.

Core vs Gateways vs Dashboard

Dmint divides responsibilities strictly to avoid privilege escalation:

Next Steps

Capabilities

Learn how tools, actions, and resources are structured.

Request Binding

Understand RFC 8785 canonicalization and fingerprinting.

Approvals Lifecycle

Explore how human approval tokens are signed and consumed.

Policies

Deep-dive into policy schema and rule evaluation order.