§ DOCUMENTATION
AI FinOps
Attribute AI agent spend to cost_center, project, and team dimensions. Generate chargeback CSV reports for finance, set budget caps with alert states, and forecast month-end spend before it surprises you.
Cost attribution dimensions
On trace ingest, pass costCenter, project, and/or team fields alongside the standard trace payload. Execlave stores these as dedicated columns on execution_traces and uses them as grouping keys for all cost reporting, budget caps, and forecasts. Tagging is optional per trace; untagged traces are included in totals but cannot be broken down by dimension.
| Dimension | Typical use |
|---|---|
| costCenter | Maps to a finance cost center code for chargeback allocation |
| project | Groups spend by product initiative or client engagement |
| team | Groups spend by engineering or business team for internal showback |
Chargeback reports & CSV export
costCenter, project, and team fields:curl -X POST https://api.execlave.com/api/v1/traces/ingest \ -H "Authorization: Bearer $EXECLAVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agentId": "agt_01j...", "input": "Summarise Q2 revenue figures", "output": "...", "costCenter": "finance", "project": "q2-reporting", "team": "data-analytics", "tokensUsed": 1840, "modelId": "claude-sonnet-4-6" }'GET /api/v1/cost/report returns spend grouped by any dimension. Add format=csv to receive a properly escaped CSV for your finance team:# Chargeback report grouped by cost_center (returns JSON by default)curl "https://api.execlave.com/api/v1/cost/report?groupBy=costCenter" \ -H "Authorization: Bearer $EXECLAVE_API_KEY" # Export as CSV for financecurl "https://api.execlave.com/api/v1/cost/report?groupBy=costCenter&format=csv" \ -H "Authorization: Bearer $EXECLAVE_API_KEY" \ -o chargeback.csvBudget caps & status alerts
budget_caps table (RLS-scoped to your org). GET /api/v1/cost/budgets/status returns current spend versus each cap and an alert state so you can surface warnings in dashboards or alerting pipelines:# Create a monthly budget cap for the finance cost centercurl -X POST https://api.execlave.com/api/v1/cost/budgets \ -H "Authorization: Bearer $EXECLAVE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "dimension": "costCenter", "value": "finance", "limitUsd": 500, "periodType": "monthly" }' # Check current spend vs capcurl https://api.execlave.com/api/v1/cost/budgets/status \ -H "Authorization: Bearer $EXECLAVE_API_KEY"Month-end cost forecast
GET /api/v1/cost/forecast projects month-end spend from the recent daily cost series. The backend calls the processing service at POST /forecast/cost, which applies time-series forecasting to the daily spend data and returns a projected month-end spend figure alongside a breach probability — the likelihood the current trajectory will exceed any active budget caps.
Because the forecast reads the live daily series at request time, it reflects mid-month spend changes automatically. Call the endpoint from a scheduled job or surface it in the dashboard to give finance and engineering teams early warning before a budget cap is hit.
Relation to the real-time cost circuit breaker
AI FinOps budget caps are asynchronous — they accumulate spend, compare against a threshold, and surface an alert state. They are the right tool for monthly planning, chargeback, and trend visibility.
The real-time cost circuit breaker is a synchronous policy that fires in the hot path of every agent action. When per-org or per-agent spend hits the configured cap, the circuit breaker blocks the action immediately rather than surfacing an alert after the fact. See the governance overview for details on configuring the circuit breaker in a policy rule definition.