The four numbers
The AI P&L is per-org, per-time-range, and optionally per-agent. Pass a date range and an optional agent ID and you get:total_revenue_attributed
SUM of
amount across linked financial events whose consequence-link link_type is revenue, within the requested range.total_cost_attributed
SUM of
amount across linked financial events whose consequence-link link_type is cost, within the requested range.total_liability_exposure
SUM of
estimated_exposure across active liability estimates for in-range decisions. This is a separate aggregation over the liability estimates — not derived from the event ledger.net_ai_impact
total_revenue_attributed − total_cost_attributed. Prospective liability is reported separately and is not subtracted from net impact.decision_count, link_count, and a top_agents array listing the five biggest net-impact contributors.
Shape
Fetching from code
Currency handling
The endpoint aggregates only when every in-range linked event shares a single currency. If your org’s events span multiple currencies, the endpoint returns HTTP 409 with acurrencies detail array so you can retry scoped to one currency at a time using the start/end window.
If you need a single rolled-up number across currencies today, convert at ingestion time before posting financial events. The dashboard’s P&L view collapses mixed-currency orgs into per-currency panels automatically.
What is NOT in the P&L
Pending events with no link
Pending events with no link
The P&L only counts events with an active consequence link. An event that the attribution engine scored below the suggest threshold (below 0.4) is discarded and does not appear anywhere in the P&L. See Consequence Links for how links are created and scored.
Soft-deleted links
Soft-deleted links
When a human rejects an ML-suggested link, the link is soft-deleted and excluded from all P&L queries. Forensic exports still include it so an external reviewer can see that a prior attribution was retracted.
Liability losses
Liability losses
Liability is an estimate, not a realised loss. If a liability actually materialises — a lawsuit settles, a refund is paid — it enters the ledger as a
cost financial event, which flows into total_cost_attributed, not into total_liability_exposure.NEUTRAL and LIABILITY link types
NEUTRAL and LIABILITY link types
NEUTRAL links are audit metadata with an explicit zero P&L effect. LIABILITY link types flow into the exposure column only — they are excluded from the revenue and cost sums.