DELETE or git push without asking") fail when an agent encounters prompt injection, jailbreaks, or context drift:Without Dmint (Probabilistic): AI Model ────[ System Prompt / Model Guardrail ]────► Executes DROP TABLE / RM -RF With Dmint (Deterministic & Fail-Closed): AI Model ────► Tool Call ────► [ Dmint Policy Engine ] ────► ALLOW: Executes tool │ ├─► DENY: Fails closed immediately └─► APPROVAL_REQUIRED: Halts until signed, single-use human approval
pip install dmint dmint demo # Optional: run the 7-scenario live red-team simulator in 600ms dmint init --harness all # Provision .dmint/ keys, per-harness policies, and PreToolUse hooks dmint doctor # Verify keys, policies, hooks, and 4 security vectors
policy.json evaluates commands right from the terminal:dmint check -t shell.execute -r "git status" # -> ALLOW (exit 0) dmint check -t shell.execute -r "git push origin main" # -> APPROVAL_REQUIRED (exit 1) dmint check -t shell.execute -r "rm -rf /" # -> DENY (exit 2)
Dmint.local() (which automatically initializes .dmint/ keys and local SQLite storage):from dmint import ApprovalRequiredError, Dmint, Policy, Rule # 1. Define deterministic rules (default-deny) policy = Policy([ Rule.allow("database", "query"), Rule.approval_required("database", "delete"), ]) # 2. Initialize zero-config local engine (.dmint/ keys + SQLite store) dmint = Dmint.local(policy) # 3. Guard the callable @dmint.protect("database.delete") def delete_records(table: str, condition: str) -> int: return 42 # 4. Execution halts and persists a tamper-evident pending approval record try: delete_records("users", "inactive = true") except ApprovalRequiredError as exc: print(f"Intercepted: {exc.code} (Approval ID: {exc.approval_id})")
Intercepted: DMT_APPROVAL_REQUIRED (Approval ID: apr_9k2L...m4P1)
dmint approve apr_9k2L...m4P1 in your terminal (or approve in dmint dashboard).dmint.retry(delete_records, "users", "inactive = true"). Dmint verifies the Ed25519 signature against the exact RFC 8785 argument hash, atomically consumes the approval (APPROVED -> CONSUMED), and runs the function once.AI Agent Call (Python Function / PreToolUse Hook / MCP Tool) │ ▼ 1. Parameter Canonicalization (RFC 8785 JSON Canonicalization Scheme) │ ▼ 2. SHA-256 Request Fingerprinting (b"dmint/request-fingerprint/v2\x00") │ ▼ 3. Deterministic Policy Evaluation (Deny-overrides, default-deny) │ ┌───────┴────────────────────────┐ │ │ ▼ ▼ ALLOW APPROVAL_REQUIRED │ │ Executes Callable Halts execution; persists record in SQLite/Postgres; emits webhook notification (Slack/Discord/Teams) │ ▼ Human Review (CLI `dmint approve` or Web Dashboard) │ ▼ Ed25519 Assertion Signed & Bound to Exact Arguments │ ▼ Atomic Single-Use Consumption (`APPROVED -> CONSUMED`)
| Your Use Case | Best Tool | Why |
| Need self-hosted, Ed25519-signed, single-use human sign-off on sensitive actions in Python, MCP, or coding-agent hooks | Dmint | Approvals are cryptographically bound to the exact RFC 8785 call arguments, usable once, and automatically voided if policy changes. |
| Running entirely on AWS Bedrock AgentCore | AWS AgentCore Policy | Managed Cedar policy enforcement at the AWS gateway. |
| Polyglot enterprise governance across Go, .NET, Java, and Rust | Microsoft Agent Governance Toolkit / Cerbos | Broad multi-language SDKs and centralized PDP infrastructure. |
| Content moderation, PII redaction, or prompt-injection classification | LLM Guardrails (Llama Guard, NeMo) | Dmint is a deterministic capability/argument gate, not a text classifier. |
dmint check, and run a complete approval + retry flow.