diff --git a/README.md b/README.md index 5c0c521..c988233 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,12 @@ The action-authorization rule is the senior signal: a prompt-level guardrail is ### 4 · Cost — per incident, with a runaway breaker -One incident fans out across four LLM calls plus a Tavily search, so the cost unit is the **whole incident**, not a single call. Per-node token cost and Tavily call cost are summed, logged to the Langfuse trace as `total_cost_usd`, and returned in the API response. Two controls sit on top: the per-account run limit (5) bounds each account's lifetime spend, and a **circuit breaker** aborts any single incident that exceeds `MAX_INCIDENT_USD` before the next LLM call — so a reject→loop-back cycle can't quietly burn money. Average cost per incident is **~$0.02**; the Langfuse cost view is screenshotted in [`docs/cost-per-incident.png`](docs/). +One incident fans out across four LLM calls plus a Tavily search, so the cost unit is the **whole incident**, not a single call. Per-node token cost and Tavily call cost are summed, logged to the Langfuse trace as `total_cost_usd`, and returned in the API response. Two controls sit on top: the per-account run limit (5) bounds each account's lifetime spend, and a **circuit breaker** aborts any single incident that exceeds `MAX_INCIDENT_USD` before the next LLM call — so a reject→loop-back cycle can't quietly burn money. Average cost per incident is **~$0.02**; the Langfuse cost view: + +

+ Langfuse trace showing per-node cost breakdown and total_cost_usd for one incident +

+

Langfuse — total_cost_usd and per-node LLM/tool breakdown for one incident run

### 5 · Durability — survive the human pause and the cold start @@ -433,7 +438,7 @@ make verify # confirm all imports resolve | Slack webhooks | $0 | | **Total infrastructure** | **$0/month** | -Anthropic API cost per incident run: **~$0.02** (4 agents × ~500 tokens each at Claude Sonnet pricing), tracked per incident in Langfuse and capped per run by the cost circuit breaker (`MAX_INCIDENT_USD`). See [`docs/cost-per-incident.png`](docs/) for the Langfuse cost view. +Anthropic API cost per incident run: **~$0.02** (4 agents × ~500 tokens each at Claude Sonnet pricing), tracked per incident in Langfuse and capped per run by the cost circuit breaker (`MAX_INCIDENT_USD`). See [Layer 4 · Cost](#4--cost--per-incident-with-a-runaway-breaker) for the Langfuse trace screenshot. --- diff --git a/docs/cost-per-incident.png b/docs/cost-per-incident.png new file mode 100644 index 0000000..7b7f656 Binary files /dev/null and b/docs/cost-per-incident.png differ