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.
Prerequisites: Python 3.10+ installed on Linux, macOS, or WSL.
Step 1: Install Dmint
Install the complete Dmint suite from PyPI: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
policy.json:
Step 3: Protect Your Tool
Choose how you want to connect Dmint to your project:- Option A: In Python Code (Direct Decorator)
- Option B: Model Context Protocol (MCP Gateway)
Protect any Python function with the Run the script:
@dmint.protected decorator. Dmint intercepts the call, evaluates policy, and manages SQLite persistence automatically.Create app.py:app.py
Step 4: Review in Human Approval Dashboard
Start the local web dashboard: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
What Just Happened?
- Deterministic Evaluation:
SELECTran instantly becauseALLOWwas declared in code. - Deterministic Interception:
UPDATEstopped before execution becauseAPPROVAL_REQUIREDwas triggered. - Exact Request Binding: Approval was valid only for
row_id=42. If the agent triedrow_id=99, it would fail immediately. - 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.