What is MANDATE.md?
MANDATE.md is a plain-language rules file that defines what your agent can and cannot do with money. You write constraints in natural language. The policy engine parses them into theguard_rules field and enforces them on every transaction.
Think of it as a constitution for your agent’s wallet. Place it in your project root or edit it in the dashboard editor. The scanner recognizes MANDATE.md as a project-level protection signal, so any codebase with this file is considered Mandate-protected.
Syntax and structure
MANDATE.md uses a simple Markdown format. Each H2 section maps to a specific policy domain. The engine reads the headings and bullet points, then translates them into enforceable rules.The
# Agent Policy: <name> heading is optional but recommended. It helps identify which agent this policy belongs to when you have multiple MANDATE.md files across projects.Section rules
Each section follows a consistent pattern:- Headings: Use
## Section Namewith one of the recognized section names (Spending Limits, Allowed Addresses, Blocked Actions, Approval Required, Schedule). - Items: Bullet points with a dash (
-). One constraint per line. - Addresses: Full 0x-prefixed Ethereum addresses. Parenthetical labels are ignored by the parser but useful for documentation.
- Amounts: Dollar sign prefix with number (
$500). The engine converts to USD for quota enforcement. - Time ranges:
HH:MM to HH:MM UTCformat. Days as full names (Monday, Tuesday, etc.).
Use case examples
DeFi trading agent
A bot that executes arbitrage and yield farming. Needs higher limits and access to specific DEX contracts, but requires human approval for large swaps.Payroll agent
A bot that sends recurring payments to a fixed set of employee wallets. Strict constraints: no new addresses, no approvals needed for routine payments under the limit.Shopping agent
A personal assistant that makes small purchases on your behalf. Low per-transaction limit, broad address access, and all actions except approve are blocked.How sections map to policy fields
Each MANDATE.md section translates directly to fields in the policy engine. When you create or update a policy through the dashboard builder, these fields are set automatically from your MANDATE.md content.| MANDATE.md Section | Policy Field | Type |
|---|---|---|
| Spending Limits: “per transaction” | spend_limit_per_tx_usd | Number (USD) |
| Spending Limits: “per day” | spend_limit_per_day_usd | Number (USD) |
| Spending Limits: “per month” | spend_limit_per_month_usd | Number (USD) |
| Allowed Addresses | allowed_addresses | Array of 0x strings |
| Blocked Actions | blocked_actions | Array of action names |
| Approval Required: amount threshold | require_approval_above_usd | Number (USD) |
| Approval Required: actions | require_approval_actions | Array of action names |
| Schedule: days | schedule.days | Array of day names |
| Schedule: hours | schedule.hours | Object with start and end (UTC) |
What happens when a rule is violated?
When an agent attempts a transaction that breaks a MANDATE.md rule, the policy engine returns a specific block reason. For example:- Exceeding per-transaction limit returns
spend_limit_exceeded - Sending to an address not in the allowlist returns
address_not_allowed - Calling a blocked action returns
action_blocked - Transacting outside schedule returns
schedule_outside_window
Self-improving rules with Insights
Mandate’s Insights feature watches your agent’s transaction patterns and suggests policy improvements. After a few days of operation, you may see suggestions like:- “This agent only transacts with 3 addresses. Add an allowlist to restrict to these addresses.”
- “Average transaction is 500 to $100.”
- “No transactions on weekends. Add a weekday-only schedule.”
Next Steps
Policy Builder
Configure policies visually in the dashboard with real-time preview.
Insights
AI-powered suggestions to tighten your agent’s policy over time.
Policy Fields Reference
Complete reference for all policy engine fields and their valid values.
Policy Engine
How the engine evaluates transactions through 14 sequential checks.