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

A user's chat with the assistant (`phoenix_kit_agent_conversations`).

`user_uuid` is the owner — the only person who reads and writes the chat — and
is set on the struct by the caller, never cast from attributes. `busy_since`
and `busy_turn_ref` are the lock of a turn in flight; `cost_micro_usd` sums
the turns for display (limits are counted from the AI request journal).

# `t`

```elixir
@type t() :: %PhoenixKitAgent.Schemas.Conversation{
  __meta__: term(),
  busy_since: term(),
  busy_turn_ref: term(),
  cost_micro_usd: term(),
  input_tokens: term(),
  inserted_at: term(),
  last_message_at: term(),
  message_count: term(),
  messages: term(),
  metadata: term(),
  output_tokens: term(),
  status: term(),
  title: term(),
  updated_at: term(),
  user: term(),
  user_uuid: term(),
  uuid: term()
}
```

# `changeset`

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

Changes the title, status or metadata of a chat.

# `statuses`

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

The statuses a chat can have: `active`, `archived`, `deleted` (soft delete).

---

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