{
  "tool_id": "agent_cost_envelope_calculator",
  "slug": "agent-cost-envelope-calculator",
  "path": "/agent-cost-envelope-calculator/",
  "mode": "client_side",
  "usage": "Client-side calculator. Open https://aifinhub.io/agent-cost-envelope-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aifinhub.io/engines/agent-cost-envelope-calculator.js \u2014 call compute(input) with the JSON shape below.",
  "methodology": "https://aifinhub.io/methodology/agent-cost-envelope-calculator/",
  "sample_input": {
    "tool": "agent_cost_envelope_calculator",
    "model_id": "claude-sonnet-4-6",
    "input_tokens_per_step": 4000,
    "output_tokens_per_step": 800,
    "steps_per_loop": 6,
    "convergence_check_pct": 50,
    "markets_per_day": 25,
    "target_monthly_usd": 500,
    "calendar_mode": "business"
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "model_id": {
        "type": "string"
      },
      "input_tokens_per_step": {
        "type": "number"
      },
      "output_tokens_per_step": {
        "type": "number"
      },
      "steps_per_loop": {
        "type": "number"
      },
      "convergence_check_pct": {
        "type": "number"
      },
      "markets_per_day": {
        "type": "number"
      },
      "target_monthly_usd": {
        "type": "number"
      },
      "calendar_mode": {
        "type": "string"
      }
    },
    "required": [
      "tool",
      "model_id",
      "input_tokens_per_step",
      "output_tokens_per_step",
      "steps_per_loop",
      "convergence_check_pct",
      "markets_per_day",
      "target_monthly_usd",
      "calendar_mode"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "inputUsdPerMToken": {
            "type": "number"
          },
          "outputUsdPerMToken": {
            "type": "number"
          },
          "contextWindow": {
            "type": "integer"
          }
        }
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "step",
                "convergence"
              ]
            },
            "inputCost": {
              "type": "number"
            },
            "outputCost": {
              "type": "number"
            },
            "totalCost": {
              "type": "number"
            }
          }
        }
      },
      "costPerLoop": {
        "type": "number"
      },
      "toolUseSubtotal": {
        "type": "number"
      },
      "convergenceCost": {
        "type": "number"
      },
      "costPerDay": {
        "type": "number"
      },
      "costPerMonth": {
        "type": "number"
      },
      "daysPerMonth": {
        "type": "integer"
      },
      "tokensPerLoop": {
        "type": "number"
      },
      "blendedUsdPer1KTokens": {
        "type": "number"
      },
      "withinBudget": {
        "type": "boolean"
      },
      "budgetUtilization": {
        "type": "number"
      }
    }
  }
}
