AI Margin Stack
retrospective log diagnostic
Request diagnostic

Retrospective AI margin diagnostic

Find margin leaks from the AI logs you already have.

Upload existing usage exports, choose a workflow, and see which customers, retries, failed runs, or pricing gaps changed the economics. The output is a concrete recommendation, not another token dashboard.

Free diagnosticExisting exports firstNo gateway required · no prompt bodies · sample data included
Work from logs or exports you already haveExpose retry and failed-run spendReveal missing fields before monitoring

Analyze existing exports

Upload AI usage logs or CSV

Import workflow, customer, cost, retry, status, and price data from what you already have. The file is parsed locally in the browser and does not need provider keys.

Sample diagnostic data loaded.
Cost per usable outcome$0.263
Retry spend14%
Failed runs1
Workflow margin$1.160

Recommended decision

Fix workflow reliability before changing pricing.

Document Q&A is leaking spend through retries or failed outcomes. A price increase may hide the symptom while the workflow keeps wasting provider cost.

Next actionInstrument retry reasons and add a fallback/guardrail before enforcing hard caps.
Request diagnostic
Cost per usable answer$0.263

Includes successful, failed, and retried runs in the workflow baseline.

Retry and failed-run spend14% of provider cost

This is the spend that aggregate token dashboards usually hide.

Customer concentrationcustomer_power_user · 58%

Power users can be retention-positive and margin-negative at the same time.

Missing fieldsoutcome reason · retry reason

The diagnostic also shows which fields are missing before this can be monitored reliably.

Optional next step

Preview a tracked AI event

document_qa

This is not required for the first diagnostic. It previews what a lightweight tracking layer could record after existing logs prove the problem is worth monitoring.

93 / 2,400 characters$0.65 per usable answer
Usage ledger

Events from CSV or integration

Imported log rows and future integration events use the same event shape, so the diagnostic can compare successful outcomes, retries, failed runs, and plan snapshots.

OutcomeCustomerCostRetry / snapshot
completedcustomer_power_user$0.4560000 retry · price_pro_v1
completedcustomer_acme$0.1640001 retry · price_pro_v1
failedcustomer_acme$0.0760001 retry · price_pro_v1
completedcustomer_beta$0.0940000 retry · price_pro_v1

What this demo includes

Existing export input. Mock event preview.

The import path works with exported usage data. The tracked-event preview uses a deterministic mock provider to show the optional monitoring path without API keys.