Mandare
OfficialMandare
Give your agents a budget they cannot talk their way out of.
Mandare is the accountability stack for AI agent fleets: signed agent identity (Passport), signed machine-readable authority (Mandate), a tamper-evident ledger of what agents actually did (Ledger), an offline kill switch — and external witnessing + public anchoring so ledger history cannot be truncated or rewritten without detection (with the witness on separate infrastructure, not even by the operator — the solo compose stack runs everything on one host and says so). Local-first: raw activity never leaves your machine.

Replay of the captured Demo 1 run
(pnpm demo, the no-docker path; the docker quickstart stops at call #24) — the
same script CI executes and asserts on every push. Regenerate:
node scripts/render-demo-gif.mjs.
Quickstart — 3 commands, no API keys needed
Needs Docker with Compose v2 (up --wait needs v2.1.1+). The images build
locally on first run, which takes a few minutes.
git clone https://github.com/mandarelabs/mandare && cd mandaredocker compose up -d --waitdocker compose run --rm demoThe demo releases a runaway agent loop against your gateway, priced
against a bundled mock provider: the enforcement is real, the money isn't.
The €20/day mandate kills it mid-run: 23 calls settle €19.17, call #24's reservation would
cross €20 and is refused 403 PER_DAY_EXCEEDED, the refusal is itself a ledger entry, and
mandare verify proves chain VALID, counters == replay(ledger), and the
witnessed head history covers the chain. Dashboard at
http://127.0.0.1:8788. Real providers: put keys in .env
(docs).
When you're done, docker compose down -v removes the containers and the
demo volumes (mandare-data, mandare-witness-state).
No docker (Node ≥ 22.13 and pnpm 10; if pnpm is missing, install.sh runs
corepack enable, a global change):
./install.shpnpm demo(pnpm demo runs a cheaper model and raises the gateway's default 60
calls/minute velocity limit so the budget is the only limit in play: 71 calls,
call #72 refused at the same €20 cap. The docker demo above runs the stack's
real defaults.)
pnpm demo runs without a witness, so mandare verify there can't see
entries dropped from the end of the ledger — refusals included — unless you
pass a saved --prev-head. The docker stack runs a witness, and
pnpm demo:witness shows it catching exactly that.
Or from npm (CLI + MCP server, no checkout; the MCP server reads the ledger
at MANDARE_LEDGER_DB, default ./mandare-ledger.db):
npm i -g @mandarelabs/cli && mandare helpnpx -y @mandarelabs/mcp-serverWhere state lands: the CLI's vault (./mandare-vault.db, used by passport issue and vault …) keeps its master key in the OS keychain by default;
passport issue writes the agent's credential and key under
~/.mandare/agents/ by default; and unless MANDARE_VAULT=1, the door's private key sits
next to the ledger (<ledger>.doorkey.pem, mode 0600).
Related MCP server: evermint-mcp
Proofs, not data
Raw prompts and responses never leave your machine. What crosses a trust boundary is only ever a proof: salted tree heads to the witness, an integrity certificate to an auditor, a revocation bitstring to a verifier.
agent (any SDK, base URL → the door)
│ RFC 9421-signed request (passport) or scoped PoP token
▼
┌──────────────── gateway door ────────────────┐
│ kill-check → policy (mandate: caps/window/ │ ┌─ witness (external) ─┐
│ scope/approval) → INTENT entry (reserves │────▶│ salted head history, │
│ cost in the ledger tx) → provider → RESULT │ acks│ consistency-enforced,│
│ entry (settles true cost) │◀────│ public anchor (OTS) │
└───────────────┬──────────────────────────────┘ └──────────────────────┘
▼
append-only ledger (SQLite/Postgres)
hash-chained · door-signed · RFC 6962 tree
budget counters + revocation = PROJECTIONS (replay-checkable)
▼
mandare verify · certify (third-party checkable) · dashboard · killEvery door obeys three rules: fail-closed on spend, log-before-act, and agent input is hostile. Refusals are ledger entries — the system keeps its no's, and a witness keeps them from being quietly dropped.
The five demos are the acceptance tests (CI runs all of them)
# | Claim | Run |
1 | A runaway loop dies at €20, with proof |
|
2 | A stolen token is dead paper; kill bites mid-task |
|
3 | One signed mandate replaces 40 prompts; humans approve async |
|
4 | The card declines AT THE NETWORK; one cap governs both rails |
|
5 | Truncation and rewrites can't hide from an independent witness (verified with the door key held out-of-band) |
|
Each demo also exists as a self-contained, narrated scenario in
examples/ — the story, the real captured output, and the code
to read next.
Integrations
Surface | Where | What |
TypeScript SDK |
| A signed fetch for your existing Anthropic/OpenAI SDK (token PoP + passport RFC 9421) |
Python client |
| Zero-dependency token-mode client (stdlib only) |
MCP server |
| The door as MCP tools: verify, budgets, issuance, kill — stdio, env-configured |
OpenClaw skill |
| Native AgentSkills skill (also works in Claude Code): budget awareness, honest refusals, proofs, kill |
Self-host |
| gateway + witness + dashboard, no secrets needed for dry-run |
Dashboard |
| Local-first fleet view over the ledger; zero telemetry |
Docs |
| Quickstart, concepts, threat model, reference |
Security & provenance
Adversarially reviewed before launch — by AI, not yet by an external auditor: four parallel AI-assisted review passes (crypto/integrity · spend/enforcement · packaging/supply-chain · docs-vs-claims) were prompted to break the system. 15 findings — 3 HIGH — all fixed with regression tests or documented as accepted residuals, none silent. Full report:
docs/SECURITY-REVIEW-S8.md, including what was probed and held, the honest residuals, and the target list for the external audit. A second AI-assisted audit pass (2026-09) found further spend, witnessing and packaging defects; their fixes and red-team cases are logged inTASKS.md(S10-fix 2A–2D). The external audit is still pending.Fail-closed by construction: no mandate → no spend; ledger down → no action; witness dead → high-value actions refuse (the kill switch never depends on anything remote).
Red-team suites run in CI (rule R5): edit/delete/truncate/rollback/ replay/forge on SQLite AND Postgres, token theft + replay, signature coverage attacks, webhook forgery, budget races, witness split-view — and they may never be weakened to make a change pass.
Supply chain: pnpm 10 with install scripts off, 3-day dependency cooldown, frozen lockfiles, hand-rolled security primitives pinned to official test vectors where they exist (RFC 6962 CT vectors, did:key/base58) and otherwise tested against the published wire scheme with adversarial round-trip suites (Stripe signatures, OpenTimestamps). From launch: npm Trusted Publishing (OIDC provenance), cosign-signed images, signed skill envelopes. Honest reproducibility bar in
REPRODUCING.md.Verify without trusting us: the verifier, passport, and witness protocol are Apache-2.0 and embeddable;
mandare certifyproduces integrity certificates a third party checks with no ledger access.Vulnerabilities: see
SECURITY.md(private reporting, safe harbor, 90-day disclosure).
License
AGPL-3.0-only, except the embeddable packages listed in
LICENSING.md (spec, policy-engine, verifier, passport,
witness-protocol, sdk, sdk-py — Apache-2.0). The split is permanent; we do
not relicense.
Available Tools
8 toolsmandare_budget_statusBudget statusARead-only
Per-mandate spend from the ledger: settled and reserved amounts (integer micro-units of the ledger currency), intent counts, refusal count, and whether the live budget counters equal a fresh replay of the ledger. Use before starting expensive work. Read-only.
Inputs: no named parameters.
mandare_certifyExport an integrity certificateARead-only
Build the selective-disclosure integrity certificate (chain valid · witnessed · anchored) a third party can verify WITHOUT ledger access. Optionally disclose specific entries by seq; undisclosed entries stay salted hashes. Requires a configured witness.
Inputs: disclose_seqs.
mandare_gateway_healthGateway healthARead-only
Read the running gateway door /healthz (halted state, card rail, witness gating). Requires MANDARE_GATEWAY_URL in the MCP server environment. Read-only.
Inputs: no named parameters.
mandare_issue_mandateIssue a mandateA
Issue an owner-signed mandate (SD-JWT VC) for an agent: spend caps in WHOLE currency units (per transaction / day / task / total), optional human-approval threshold, validity window. The mandate file path is returned; point the gateway at it (MANDARE_MANDATE_PATH).
Inputs: agent_did (required), total, per_tx, per_day, +5 more.
mandare_issue_passportIssue an agent passportA
Issue an Agent Delegation Credential (SD-JWT VC) for a NEW agent: owner + local attestation authority keys from the vault, fresh agent did:key, revocation slot registered on the ledger. The credential and the agent private key are written to the operator-configured home directory; the result references them by path and never contains key material.
Inputs: agent_name (required), valid_days.
mandare_issue_tokenIssue a scoped access tokenA
Mint a short-lived proof-of-possession token an agent presents to the gateway (TTL ≤ 30 minutes). The grant INCLUDING ITS ONE-TIME SECRET is written 0600 to the operator-configured home directory; the result references it by path only — hand the FILE to the agent process (e.g. @mandarelabs/sdk tokenCredentialsFromIssueJson), never paste its contents into chat.
Inputs: actor_did (required), mandate_id (required), ttl_seconds.
mandare_killKill switchA
The LOCAL, offline, fail-closed kill: revoke ONE agent, ONE mandate (the agent survives, the permission slip dies), or --all (halts the whole door). Writes the revocation to the ledger; the gateway refuses the subject on its very next request. Bound virtual cards are revoked too. Kills only CLOSE doors — reversing one requires the operator (mandare reinstate).
Inputs: all, reason, agent_did, mandate_id.
mandare_verifyVerify the Mandare ledgerARead-only
Verify the local ledger: hash chain, door signatures, RFC 6962 tree head, spend trail and budget-counter replay, approval trail, and revocation state. With check_witness=true also checks the chain against the externally witnessed head history (catches truncation and rewrites). Returns the machine-readable verification report. Read-only.
Inputs: check_witness.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
The three issue_* tools target clearly distinct artifacts (agent identity passport, spend mandate, session token), and the read-only tools split cleanly by target (ledger integrity, budget, gateway health). Minor potential overlap between mandare_verify and mandare_certify, since both concern ledger integrity, but their descriptions distinguish local verification from third-party disclosure certificates.
All tools share the mandare_ prefix and are largely verb-led (verify, issue_*, kill, certify), which reads predictably. Two names (budget_status, gateway_health) are noun phrases rather than verbs, a small deviation from the otherwise consistent verb pattern.
Eight tools is well-scoped for a delegated-authority gateway: identity issuance, mandate issuance, token minting, verification, budget inspection, revocation, certification, and health. Each tool earns its place with no obvious redundancy.
The issue/verify/budget/kill/certify lifecycle is mostly covered, but the kill description explicitly notes that reversal requires an operator-side 'reinstate' that has no MCP counterpart, and there is no tool to list or enumerate existing agents, mandates, or tokens. These are notable gaps an agent cannot work around from the tool surface alone.
Maintenance
Related MCP Connectors
AI-agent trust infrastructure for discovery, authority, execution, verification, and receipts.
Governed autonomous-agent platform: HITL approvals, budget gates, audit chain, effect ledger.
Signed, publicly logged records of what your AI agent did, with proofs anyone can check offline.
Bitcoin-anchored, tamper-evident audit log for AI agents — record, disclose and verify actions.
Related MCP Servers
- AlicenseAqualityBmaintenanceCryptographic accountability for AI agents. Ed25519-signed receipts for every MCP tool call. Constraints, chains, AI judgment, invoicing, and local dashboard included.241MIT

evermint-mcpofficial
AlicenseNot gradedqualityDmaintenanceTamper-evident receipts for AI agent actions. The notary layer for agent-to-agent transactions.1MIT- AlicenseBqualityCmaintenanceEnables AI agents to execute actions under an accountability layer with identity passports, mandates, a permission gate, and a tamper-evident journal, while requiring human confirmation for irreversible operations.75AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceContinuous mandate enforcement for AI agents: block an action a signed mandate does not permit — amount, payee, audience, expiry — and name the rule that fired. Verdicts are Ed25519-signed and verify offline.Apache 2.0