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.
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.
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.