Transactions
Why the unit of account is a business task, not a tool call.
Cost per call is a number every tool reports and nobody can act on. “You made 190,000 model calls” tells a finance team nothing. “Resolving one support ticket costs $0.41” tells them everything — whether it is worth doing, whether it got worse this month, and what to compare it against.
So the unit of account in Navige is the transaction: one business task, made of however many model calls, tool calls and retries it took.
Opening one
Correlation is opt-in and additive. Send nothing and everything behaves exactly as it would have; send one of these and the calls group themselves.
x-navige-workflow— the stable name for this kind of task, such assupport.ticket.triage. Baselines and per-task costs key on this.x-navige-transaction— your own id for this specific run, used to make retries idempotent rather than counting them twice.traceparent— a standard W3C trace header. If your stack already emits one, you get correlation with no Navige-specific configuration at all.
curl https://api.navige.ai/proxy/openai/v1/chat/completions \
-H "x-navige-key: $NAVIGE_KEY" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "x-navige-workflow: support.ticket.triage" \
-H "x-navige-transaction: ticket-88412" \
-d @request.jsonBoth are cut to 200 characters. Keep them shorter than that: two longer names that share their first 200 characters are recorded as one task.
Status and outcome are different questions
This trips people up, so it is worth being explicit.
- Status is lifecycle: is this task open, closed, abandoned. Navige knows this on its own.
- Outcome is judgement: did the task actually achieve what it was for. Navige cannot know this, and does not guess.
An unjudged transaction has no outcome — null, which is not the same as failed. Tell us how it went and the cost-per-successful-task figures become real:
curl -X POST https://api.navige.ai/v1/transactions/$TX_ID/outcome \
-H "x-navige-key: $NAVIGE_KEY" \
-H "Content-Type: application/json" \
-d '{"succeeded": true}'If you group calls with x-navige-workflow and x-navige-transaction, you do not need Navige's id: report the outcome under the same two names you sent.
curl -X POST https://api.navige.ai/v1/transactions/by-ref/outcome \
-H "x-navige-key: $NAVIGE_KEY" \
-H "Content-Type: application/json" \
-d '{"workflowKey": "support-triage", "externalRef": "ticket-4812", "succeeded": false, "errorClass": "wrong_category"}'Or judge them by hand: Performance → Judge tasks lists finished tasks nobody has judged yet, a few per workflow, with Correct and Wrong beside each, and shows how much of each workflow's work carries a label.
What a task will cost, before it runs
With your agent's key, this returns the range a task of that workflow usually costs — the 50th, 90th and 99th percentile in micro-USD — learned from your own finished tasks of it over the last 30 days. It is a range on purpose, and wide while there are few tasks: five tasks give a wide one, five hundred a narrow one. Only API spend counts; tasks with an unpriced step or no metered cost are counted under leftOut rather than read as cheap. With fewer than two priced tasks there is no range yet, and expected is null, not zero.
curl https://api.navige.ai/v1/workflows/support.ticket.triage/estimate \
-H "x-navige-key: $NAVIGE_KEY"What you get from it
- Cost per task, and the spread across runs of the same task.
- The most expensive workflow you run, which is rarely the one people guess.
- Cost per successful task, once outcomes are reported.
- A baseline, so a change that doubles the cost of a task shows up as a change rather than noise.