5-Minute Quickstart

This walkthrough takes you from zero to a fully protected tool with deterministic authorization and human approvals.
Time required: ~5 minutes.
Prerequisites: Python 3.10+ installed on Linux, macOS, or WSL.

Step 1: Install Dmint

Install the complete Dmint suite from PyPI:
Verify your installation:

Step 2: Define Security Rules (access.md)

Create a plain text file named access.md in your project folder specifying your access requirements:
access.md
Now compile this into a verified, schema-compliant policy.json:
Validate the generated policy offline (LLM-free):
Output:

Step 3: Protect Your Tool

Choose how you want to connect Dmint to your project:
Protect any Python function with the @dmint.protected decorator. Dmint intercepts the call, evaluates policy, and manages SQLite persistence automatically.Create app.py:
app.py
Run the script:

Step 4: Review in Human Approval Dashboard

Start the local web dashboard:
Open your browser at http://127.0.0.1:8080:
1

Inspect Pending Requests

You will see the pending database.update request containing the exact arguments (table: "users", row_id: 42, value: "admin").
2

Click 'Approve'

Dmintโ€™s LocalApprovalAuthority cryptographically signs an Ed25519 approval assertion bound to that exact request fingerprint.

Step 5: Test Execution & Replay Defense

Now that the request has been approved, re-run or retry the action with the approval credential:
retry.py
Output:

What Just Happened?

  1. Deterministic Evaluation: SELECT ran instantly because ALLOW was declared in code.
  2. Deterministic Interception: UPDATE stopped before execution because APPROVAL_REQUIRED was triggered.
  3. Exact Request Binding: Approval was valid only for row_id=42. If the agent tried row_id=99, it would fail immediately.
  4. Single-Use Replay Defense: Once executed, the assertion was atomically marked CONSUMED. Replaying the token failed closed.

Next Steps

MCP Gateway Setup

Connect Dmint to Cursor, Claude Code, or Antigravity via MCP.

Agent Skills

Install the AI policy-authoring skill into your workspace.

Security Invariants

Deep-dive into Dmintโ€™s 5 formal security invariants.

CLI Reference

Explore all flags and options for dmint-cli.