# `Wardrik.Spending`

Counts what each agent spends per UTC day, in tokens and, where priced, dollars.

Every agent Wardrik starts has it as middleware around model and tool calls. Agent lists show
it. Subagents' calls count as part of the tool call that ran them.

# `today`

```elixir
@spec today(Wardrik.t(), String.t()) :: %{required(String.t()) =&gt; number()}
```

Returns what the agent `id` spent today.

    Wardrik.Spending.today(wardrik, "acme/triage")
    #=> %{"tokens" => 12_400, "usd" => 0.03}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
