Skip to main content
This page is optimized for AI agent consumption. For human-friendly guides, see the Documentation.

Quick Reference

Mandatory Security Rules

These rules are non-negotiable. Violating any of them is a security breach, not a simplification.
  1. Call /validate before EVERY transaction. No exceptions.
  2. If allowed: false, do NOT execute. Display the blockReason to the user.
  3. If the API is unreachable, do NOT execute. Do NOT fall back to the wallet directly.
  4. Display validation results to the user BEFORE any wallet call.
  5. Even with custodial wallets, validate with Mandate BEFORE calling the wallet API.
  6. Skipping validation bypasses spend limits, allowlists, and approval workflows the owner configured.

Fail-Safe Behavior

When the Mandate API is unreachable:
  1. Do NOT execute the transaction.
  2. Do NOT fall back to calling the wallet API directly.
  3. Display: Mandate: policy server unreachable, transaction halted for safety
  4. Retry up to 3 times at 30-second intervals.
  5. If all retries fail: Cannot execute until policy server recovers. No funds were spent.

Primary Endpoint: POST /validate

Policy check before every transaction. Works with any wallet type (custodial or self-custodial).

Parameters

Response

All policy checks apply: circuit breaker, schedule, allowlist, spend limits, daily/monthly quotas, reason scanner. Every call is logged to the audit trail. For full endpoint documentation, see POST /validate.

Registration: POST /agents/register

No auth required. Creates an agent identity and returns credentials.

Response

Display the claimUrl to the human owner so they can link the agent to their dashboard. Store runtimeKey in ~/.mandate/credentials.json with chmod 600. Agents use POST /agents/register, not dashboard login. Dashboard login is for humans only. For details, see Register an Agent.

Activation: POST /activate

Set the EVM address for a registered agent. Call once after registration. Requires auth.

Status Polling: GET /intents/{id}/status

Poll the state of a validated intent.
For approval flows, poll until approved, then proceed. See Handle Approvals.

Validation Flow

Error Handling

HTTP Status Codes

All errors return JSON: { "error": "message" } or { "allowed": false, "blockReason": "..." } For error handling guidance, see Handle Errors and Common Errors.

SDK Error Types

Block Reason Values

For the full reference, see Block Reasons.

Intent States

For the full lifecycle, see Intent Lifecycle and Intent States.

Chain Reference

Test keys (mndt_test_*): Sepolia (11155111), Base Sepolia (84532). Live keys (mndt_live_*): Ethereum (1), Base (8453). For the full reference, see Chain Reference.

Default Policy

After registration, every agent gets: Adjust policies via the dashboard or Policy Builder.

Tool-to-Endpoint Map

For CLI installation and usage, see CLI Overview.

The reason Field

Every validation call requires a reason string (max 1000 chars). This is what session keys cannot capture: the intent behind a transaction. Mandate uses the reason to:
  • Scan for prompt injection (18 hardcoded patterns + optional LLM judge)
  • Return a declineMessage on block to counter manipulation
  • Show it to the owner on approval requests (Slack, Telegram, dashboard)
  • Log it in the audit trail permanently
For details, see The reason Field and Prompt Injection Defense.

Integration Plugins

For platforms with hook support, use the plugin instead of raw API calls. Plugins enforce validation automatically. For all integrations, see Integrations Overview.

Raw Source

The canonical machine-readable version of this reference is available at:
Compatible with any agent framework that consumes SKILL.md files.