# How do I account for AI agent spend in the general ledger?

Published 2026-10-05 · Brian Diamond

Track: finops

Segment: controller

**Account for AI agent spend as a usage-based operating expense: accrue it at period end from metered usage, allocate it to the cost center the agent worked for, post it to a dedicated AI services expense account, and reverse and true it up when the provider invoice arrives.** The mechanics are the same as any unbilled utility; what is new is that the usage is generated by software acting for several departments at once, so attribution has to happen before the entry, not after.

## What makes agent spend different from a SaaS subscription

A SaaS seat is a fixed monthly charge with one obvious owner. Agent spend is variable, arrives from several sources, and is often unbilled at close:

- **Provider APIs** (OpenAI, Anthropic, Google) invoice monthly in arrears, usually two to ten days after period end.
- **Cloud AI services** (Bedrock, Vertex, Azure OpenAI) are buried inside the cloud bill under the infrastructure account.
- **Private inference** on your own GPUs never produces an invoice; the cost is depreciation and power already booked elsewhere.
- **Agent-initiated purchases** (a tool subscription, a data pull, a paid API) can land on a corporate card.

If you wait for invoices, the month closes with the spend missing, then lands lumpy a period later with no owner.

## The five steps

1. **Create the accounts.** One operating expense account, "AI services," with sub-accounts if volume justifies it (model inference, agent tools, private inference allocation). One accrued liability account, "Accrued AI services."
2. **Capture usage with attribution.** Each usage record needs the agent identity, the task or workflow, and the cost object (department, project, or customer). This is captured at runtime by the gateway, the agent framework, or a system of record; it cannot be reconstructed from the invoice.
3. **Accrue at cutoff.** Price the metered usage at the contracted rate, group it by cost object, and post the accrual.
4. **Allocate.** Post each cost object's share to its department, or use a single entry with multiple cost-center lines if your ledger supports dimensions.
5. **True up.** When the invoice arrives, reverse the accrual, book the actual, and post any difference to the same cost objects pro rata. Keep the difference visible; a persistent gap means the rate card or the meter is wrong.

## Worked example

A company runs three agents in September. Usage metered at contracted rates: Support agent $4,200 (Customer Success), Research agent $2,800 (Product), Procurement agent $1,000 (Operations). No invoices received by September 30.

**September 30, accrual**

| Account | Debit | Credit | Cost center |
| --- | --- | --- | --- |
| AI services expense | 4,200 | | Customer Success |
| AI services expense | 2,800 | | Product |
| AI services expense | 1,000 | | Operations |
| Accrued AI services | | 8,000 | |

**October 8, provider invoice arrives for $8,240** (rate card excluded a cached-input surcharge).

| Account | Debit | Credit | Cost center |
| --- | --- | --- | --- |
| Accrued AI services | 8,000 | | |
| AI services expense | 126 | | Customer Success |
| AI services expense | 84 | | Product |
| AI services expense | 30 | | Operations |
| Accounts payable | | 8,240 | |

The $240 variance is allocated pro rata and the rate card is corrected for October.

## What the auditor will ask

Expect three questions: how usage was measured, how the rate was applied, and how the allocation to cost centers was determined. Each should trace from the GL line to the usage records that produced it. If the answer to any of them is "the engineering team sent a spreadsheet," the control is weak.

## Related

[What is the journal entry for AI token usage?](https://www.onaro.io/blog/journal-entry-for-ai-token-usage) · [How do I do chargeback for AI usage?](https://www.onaro.io/blog/how-to-do-chargeback-for-ai-usage) · [Which AI costs need accruals?](https://www.onaro.io/blog/which-ai-costs-need-accruals)

*Worked examples are illustrative. Account structure and policy should be confirmed with your controller and auditor.*

Onaro Meridian is [FinOps for agentic AI](https://www.onaro.io/finops-for-agentic-ai): the system of record that attributes, controls and books what AI agents spend.

Canonical: https://www.onaro.io/blog/how-to-account-for-ai-agent-spend-in-the-general-ledger
