Forecast an agent's spend to the end of the month.
The UTC calendar month so far, day by day, and where it is likely to land in dollars and in credits, with a range. Read from the last four weeks with their day-of-week shape, across every revision. Without an environment the dollars are read against the agent-wide monthly budget, and the response says when a busy stretch could reach it.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
Agent identifier.
The tenant identifier
Query Parameters
Which traffic to project. Defaults to PRODUCTION.
"PRODUCTION""UNSPECIFIED" | "PRODUCTION" | "TEST"One environment's slug, or omit for the whole agent.
Response Body
curl -X GET "https://api.fruxon.com/v1/tenants/string/agents/string/costForecast"{
"monthStartMs": 0,
"resetsAtMs": 0,
"days": [
{
"dayStartMs": 0,
"cost": 0,
"credits": 0
}
],
"cost": {
"spent": 0,
"budget": 0,
"atMonthEnd": {
"low": 0,
"likely": 0,
"high": 0
},
"days": [
{
"dayStartMs": 0,
"atMs": 0,
"low": 0,
"likely": 0,
"high": 0
}
],
"basis": {
"paceDays": 0,
"weeklyPattern": false,
"weekdayFactors": [
0
],
"dailyRate": 0
},
"budgetReachedEarliestAtMs": 0
},
"credits": {
"spent": 0,
"budget": 0,
"atMonthEnd": {
"low": 0,
"likely": 0,
"high": 0
},
"days": [
{
"dayStartMs": 0,
"atMs": 0,
"low": 0,
"likely": 0,
"high": 0
}
],
"basis": {
"paceDays": 0,
"weeklyPattern": false,
"weekdayFactors": [
0
],
"dailyRate": 0
},
"budgetReachedEarliestAtMs": 0
}
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Creates or updates the budget configuration for an agent
Upserts a single cap in place, identified by (origin, environment, period) — the same call creates the cap if none exists or replaces the existing one. The window is taken from `period` in the body (default `MONTHLY`); several caps on different windows can coexist on one bucket and all enforce together. Once a cap is set, the execution engine rejects new runs that would push that window's accumulated cost above it, and alert thresholds fire notifications as usage crosses them. The mandatory agent-wide daily, weekly, and monthly caps (on Production and Test) cannot be removed — set `enforceLimit: false` for a notify-only cap instead; optional caps can be removed via M:Fruxon.Server.Controllers.AgentBudgetController.Delete(System.String,Fruxon.Model.AgentSessions.ExecutionOrigin,System.String,Fruxon.Model.AgentBudgets.BudgetPeriod).
Lists the immutable audit timeline for a single approval request, newest-first.
Each entry records one lifecycle transition (requested / responded / cancelled / expired) with the actor, the channel they acted through (web, connector, topic callback, system), and — for the decision — the verdict and any free text. The requested entry also carries the tool parameters that were put up for approval. Returns an empty page when the approval id does not belong to the agent in the route.