Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Deterministic Security for AI Agent Tool Calls

Dmint places a deterministic, code-governed authorization boundary between AI agents and privileged execution environments—covering native coding-agent hooks (Claude Code, OpenAI Codex CLI, OpenCode, Cursor, Windsurf, Cline), MCP servers, and Python functions.

The Problem

Autonomous agents frequently possess high-privilege access to execute shell commands, query databases, edit files, and call external APIs.
Prompt-based guardrails ("Please do not run 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
Dmint evaluates every tool request against deterministic, declarative policies before the protected capability runs. There is zero LLM evaluation in the runtime authorization decision path.

30-Second Setup for Coding Agents (Claude Code, Codex, OpenCode, Cursor)

Protect built-in shell and file tools in your coding agent with one command:
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
Test how your generated 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)

10-Line Python SDK Example

Protect a Python function with deterministic policy evaluation and single-use human approval using 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})")
Output:
Intercepted: DMT_APPROVAL_REQUIRED (Approval ID: apr_9k2L...m4P1)
The tool was never called. To approve and execute once:
  1. Run dmint approve apr_9k2L...m4P1 in your terminal (or approve in dmint dashboard).
  2. Call 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.

How It Works

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`)

Who It Is For (and When to Use Alternatives)

Your Use CaseBest ToolWhy
Need self-hosted, Ed25519-signed, single-use human sign-off on sensitive actions in Python, MCP, or coding-agent hooksDmintApprovals are cryptographically bound to the exact RFC 8785 call arguments, usable once, and automatically voided if policy changes.
Running entirely on AWS Bedrock AgentCoreAWS AgentCore PolicyManaged Cedar policy enforcement at the AWS gateway.
Polyglot enterprise governance across Go, .NET, Java, and RustMicrosoft Agent Governance Toolkit / CerbosBroad multi-language SDKs and centralized PDP infrastructure.
Content moderation, PII redaction, or prompt-injection classificationLLM Guardrails (Llama Guard, NeMo)Dmint is a deterministic capability/argument gate, not a text classifier.

Next Steps