Mandare

v0.1.0
com.mandarelabs/mandare Checked 14 hours ago Published 2 months ago

Verify an agent fleet's tamper-evident ledger, check budgets, kill a runaway agent.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mandare_verify Verify the Mandare ledger

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.

ParameterTypeDescription
check_witnessbooleanAlso verify against the configured witness (detects truncation/rewrites)

mandare_budget_status Budget status

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.

mandare_issue_passport Issue an agent passport

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.

ParameterTypeDescription
agent_name *stringLabel for the new agent (also the artifact file prefix)
valid_daysinteger

mandare_issue_mandate Issue a mandate

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

ParameterTypeDescription
agent_did *stringThe agent's did:key (from mandare_issue_passport)
approval_abovenumberSpends above this wait for an async human approval
currencystring
per_daynumber
per_tasknumber
per_txnumberMax per single call/transaction, whole currency units
purposestring
totalnumber
valid_hoursnumber

mandare_issue_token Issue a scoped access token

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.

ParameterTypeDescription
actor_did *stringThe agent DID the token is scoped to
mandate_id *string
ttl_secondsinteger

mandare_kill Kill switch

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

ParameterTypeDescription
agent_didstring
allbooleanRevoke the whole door (every subject it governs)
mandate_idstring
reasonstring

mandare_certify Export an integrity certificate

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.

ParameterTypeDescription
disclose_seqsarray

mandare_gateway_health Gateway health

Read the running gateway door /healthz (halted state, card rail, witness gating). Requires MANDARE_GATEWAY_URL in the MCP server environment. Read-only.