Countersign
v0.2.2Kill switch + spend guard for AI agents that spend money, across every wallet vendor at once.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
countersign_health
Liveness + per-backend health of the Countersign cross-vendor control plane. Call first to confirm the guard and kill switch are live before relying on them.
countersign_list_agents
List every governed agent across all wallet backends.
countersign_apply_policy
Compile and apply ONE unified spending policy across every backend (fail-closed). Amounts are base units (USDC has 6 decimals: 100 USDC = 100000000). Omit agentId to apply to all agents.
| Parameter | Type | Description |
|---|---|---|
asset * | string | e.g. USDC |
agentId | string | |
allowlist | array | permitted counterparties; [] = deny all |
approvalThreshold | string | spends strictly above this need human approval |
dailyCap | string | max per rolling day, base units |
denylist | array | |
frozen | boolean | hard kill — deny everything |
perTxCap | string | max per transaction, base units |
venues | array |
countersign_request_spend
ALWAYS call this BEFORE an agent moves money. The cross-vendor pre-flight spend guard: ask Countersign whether a spend is allowed BEFORE touching the wallet/card, and act on the verdict — allow / deny / needs_approval. Enforces one unified policy (caps, allow/deny lists, approval thresholds, freeze) across every backend, fail-closed. Amount in base units (USDC has 6 decimals: 100 USDC = 100000000).
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
amount * | string | |
asset * | string | |
venue * | string | |
counterparty | string | |
listingId | string | Marketplace listing being paid (x402 Bazaar / Agentic.Market resource URL) — required when the policy carries a listing allowlist |
countersign_list_approved_venues
Where may this fleet spend? Lists each governed agent's venue rules from the applied policies: allowed/denied venues, marketplace listing allowlists, and per-venue caps. Call this before browsing a marketplace so the agent only engages listings its policy permits.
countersign_guard_x402
Govern an x402 (HTTP-402) machine payment BEFORE paying. Pass the agentId + the 402 challenge's `accepts` array; Countersign picks the cheapest option, evaluates it against policy, and returns allow / deny / needs_approval. Only pay if it returns allow — a rogue or over-budget agent never pays.
| Parameter | Type | Description |
|---|---|---|
accepts * | array | the `accepts` array from the 402 Payment Required body |
agentId * | string |
countersign_guard_ap2
Govern an AP2 (Agent Payments Protocol) payment BEFORE the agent signs the PaymentMandate. Pass the agentId + the merchant-signed AP2 mandate (a Cart/Checkout Mandate or a PaymentMandate); Countersign reads the committed amount/currency/payee, evaluates it against policy, and returns allow / deny / needs_approval. Only sign/send the mandate if it returns allow — a rogue or over-budget agent never pays.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
mandate * | object | the AP2 mandate object — a merchant-signed Cart/Checkout Mandate or a PaymentMandate (committed total + payee) |
countersign_list_approvals
List spends currently held pending human approval (the consensus path).
countersign_approve
Approve a pending spend by its token. Rejected if the system is frozen (fail-closed).
| Parameter | Type | Description |
|---|---|---|
approvalToken * | string |
countersign_deny
Deny a pending spend by its token.
| Parameter | Type | Description |
|---|---|---|
approvalToken * | string | |
reason | string |
countersign_freeze
THE KILL SWITCH. The emergency stop when an agent goes wrong: freeze every agent on every wallet/card backend at once, in under a second, fail-closed. Use the moment a spend looks compromised, runaway, or unauthorized.
| Parameter | Type | Description |
|---|---|---|
reason | string |
countersign_unfreeze
Lift a freeze across every backend (recover / replay).
countersign_ledger
Read the append-only, hash-chained, tamper-evident audit ledger — every spend attempt across every backend — and re-verify its integrity. The single source of truth for what your agents tried to do.
| Parameter | Type | Description |
|---|---|---|
limit | number | how many recent entries to show (default 15) |