# `PhoenixKitAgent.Schemas.LimitEvent`
[🔗](https://github.com/BeamLabEU/phoenix_kit_agent/blob/v0.1.0/lib/phoenix_kit_agent/schemas/limit_event.ex#L1)

A limit notice that was sent (`phoenix_kit_agent_limit_events`): at most one per
user, kind and period (`period_key` is `"2026-10-19"` for a day, `"2026-10"` for
a month), which is how a limit is announced once. A `warn_80` row names its
limit in the key — `"cost:2026-10-19"`, `"cost:2026-10"`, `"turns:2026-10-19"` —
so each of the three limits warns once (`PhoenixKitAgent.Limits`); the
watchers' event of a limit reached is keyed `"w:<period>"`. `used` and
`limit` are in the limit's own unit (micro-dollars or turns; none for
`ai_budget`). `user_uuid` is set by the caller.

# `t`

```elixir
@type t() :: %PhoenixKitAgent.Schemas.LimitEvent{
  __meta__: term(),
  inserted_at: term(),
  limit: term(),
  limit_kind: term(),
  notified_at: term(),
  period_key: term(),
  used: term(),
  user: term(),
  user_uuid: term(),
  uuid: term()
}
```

# `changeset`

```elixir
@spec changeset(t(), map()) :: Ecto.Changeset.t()
```

Builds a limit notice.

# `kinds`

```elixir
@spec kinds() :: [String.t()]
```

The kinds of limit notice.

---

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