Skip to content
HALOWERK

Denkwerk

spend guard

Namespaced budgets per agent and UTC day. "set_limit" defines the daily cap and optional per-transaction cap; "authorize" atomically checks amount against both caps and the day total and records it if allowed (with an optional reference); "status" shows spent, remaining and recent entries. Use it in front of x402 payments so several agents share one budget. Amounts are kept in micro-units to avoid rounding errors.

POST https://denk.halowerk.com/v1/spend-guard

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
namespacestringYesYour namespace; claimed by the first call with its secret.
secretstringYesSecret for the namespace (stored only as HMAC).
actionstringYes
agentstringYes
daily_limitnumberNo
per_transaction_limitnumberNo
amountnumberNo
currencystringNo
referencestringNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "namespace",
    "secret",
    "action",
    "agent"
  ],
  "properties": {
    "namespace": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{3,64}$",
      "description": "Your namespace; claimed by the first call with its secret."
    },
    "secret": {
      "type": "string",
      "minLength": 16,
      "maxLength": 200,
      "description": "Secret for the namespace (stored only as HMAC)."
    },
    "action": {
      "type": "string",
      "enum": [
        "set_limit",
        "authorize",
        "status"
      ]
    },
    "agent": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "daily_limit": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000
    },
    "per_transaction_limit": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3,5}$",
      "default": "USDC"
    },
    "reference": {
      "type": "string",
      "maxLength": 200
    }
  }
}

Open original schema

Published input example

{
  "namespace": "my-agents",
  "secret": "halowerk-public-catalogue-coordination-v1",
  "action": "authorize",
  "agent": "researcher",
  "amount": 0.003,
  "reference": "x402:stack.halowerk.com/stack"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’