{
  "format": "delx/intent-card/v1",
  "id": "circuit-breaker-state-api",
  "intent": "Circuit Breaker State for an agent workflow",
  "title": "Circuit Breaker State API for agents",
  "description": "Derive closed, open, or half-open circuit state from failure and cooldown inputs — call when deciding closed/open/half-open from failure counters. Use before side effects when composing multi-step agent jobs—the same loyalty/workflow demand band agents already pay for on Bazaar, but fully local. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, web search, or media generation. Results are advisory; the caller owns authorization and production controls.",
  "keywords": [
    "Circuit Breaker State API",
    "Circuit Breaker State for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-06",
  "canonical_url": "https://commerce.delx.ai/intents/circuit-breaker-state-api",
  "machine_url": "https://commerce.delx.ai/intents/circuit-breaker-state-api.json",
  "recommendation": {
    "tool_name": "util_circuit_breaker_state",
    "service_name": "Delx Circuit Breaker State",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/circuit-breaker-state",
    "price_usdc": "0.003",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "consecutive_failures": {
          "description": "Current consecutive failure count for the dependency.",
          "type": "number"
        },
        "open_after": {
          "description": "Failures required before the breaker opens.",
          "type": "number"
        },
        "cooldown_ms": {
          "description": "Milliseconds the breaker stays open before half-open.",
          "type": "number"
        },
        "open_for_ms": {
          "description": "How long the breaker has already been open.",
          "type": "number"
        }
      },
      "required": [
        "consecutive_failures"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "consecutive_failures": 5,
      "open_after": 5,
      "cooldown_ms": 1000,
      "open_for_ms": 200
    },
    "example_output": {
      "schema": "delx/util-circuit-breaker-state/v1",
      "state": "open",
      "consecutive_failures": 5,
      "open_after": 5,
      "cooldown_ms": 1000,
      "open_for_ms": 200,
      "allow_request": false
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/circuit-breaker-state -m POST -H 'x-delx-source: intent-card-circuit-breaker-state-api' --max-amount 0.003 -b '{\"consecutive_failures\":5,\"open_after\":5,\"cooldown_ms\":1000,\"open_for_ms\":200}'",
      "max_amount_usdc": "0.003"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-circuit-breaker-state-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/circuit-breaker-state"
  }
}
