FruxonDocs
AgentsBudget

Creates or updates the budget configuration for an agent

Upserts the budget in place — the same call creates a budget if none exists or replaces the existing one. Once a cap is set, the execution engine rejects new runs that would push the period's accumulated cost above it, and alert thresholds fire notifications as usage crosses them. Changing the period boundary does not retroactively rebucket prior usage; the new period begins on the next billing window. Remove enforcement entirely with `DELETE /v1/tenants/{tenant}/agents/{agent}/budget`.

PUT
/v1/tenants/{tenant}/agents/{agent}/budget
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The agent ID.

tenant*string

The tenant identifier

The budget configuration.

amount?number

Budget amount in USD.

Formatdouble
thresholdRules?|null

Threshold rules defining at which percentages notifications are sent. If null, existing thresholds are preserved on update.

enforceLimit?boolean|null

When true, execution is blocked when spend reaches 100% of the budget. When false (default), only notifications are sent.

[key: string]?never

Response Body

curl -X PUT "https://api.fruxon.com/v1/tenants/string/agents/string/budget" \  -H "Content-Type: application/json" \  -d '{}'
{
  "agentId": "string",
  "amount": 0,
  "thresholdRules": [
    {
      "percent": 0
    }
  ],
  "enforceLimit": false,
  "currentMonthlyCost": 0,
  "usagePercent": 0,
  "periodStart": 0,
  "periodEnd": 0,
  "createdAt": 0,
  "modifiedAt": 0
}
Empty
Empty
Empty
Empty