Observe and govern
Concept Available

Costs and Spend Attribution

The Costs domain queries LiteLLM at read time and joins reports to Agents by per-Agent key identity. It does not persist cost records or calculate spend from conversations and Tool Calls.

For
Organization administrators and Agent viewers
On this page
  1. How attribution works
  2. Access rules
  3. History and status
01

How attribution works

Agent Barn decrypts each per-Agent LiteLLM key, derives its identity, and joins that identity to the LiteLLM spend report. Responses aggregate total, model, daily, and per-Agent spend. Agents without a LiteLLM key are omitted from summaries.

02

Access rules

Organization summaries require the Organization cost.read Permission, normally held by Owner/Admin. Per-Agent detail requires cost.read through effective Agent authority; Viewer, Editor, and Owner can read costs for accessible active Agents. Agent Access never authorizes an Organization-wide summary.

03

History and status

Organization summaries retain attribution for soft-deleted Agents. Owner/Admin may read deleted-Agent history. Cost-facing status is active, stopped, error, or deleted and is separate from the persisted Agent lifecycle enum. An Agent without a key returns zero-valued detail with stopped status.

Documentation