# `MingaAgent.TurnUsage`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/turn_usage.ex#L1)

Token usage data for a single agent turn.

Tracks input/output token counts, cache statistics, and estimated cost.
Constructed by the provider after each turn completes, then accumulated
into the session's total via `add/2`.

# `t`

```elixir
@type t() :: %MingaAgent.TurnUsage{
  cache_read: non_neg_integer(),
  cache_write: non_neg_integer(),
  cost: float(),
  input: non_neg_integer(),
  output: non_neg_integer()
}
```

Per-turn token usage.

# `add`

```elixir
@spec add(t(), t()) :: t()
```

Adds two usage records together, combining all counters.

Used to accumulate per-turn usage into a session total.

# `format_short`

```elixir
@spec format_short(t()) :: String.t()
```

Formats the usage as a short summary string for display.

# `new`

```elixir
@spec new() :: t()
```

Creates a new empty usage record.

# `new`

```elixir
@spec new(
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  non_neg_integer(),
  float()
) :: t()
```

Creates a usage record from the given values.

---

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