# `PhoenixAI.Store.Adapter.ProfileStore`
[🔗](https://github.com/franciscpd/phoenix-ai-store/blob/v0.1.0/lib/phoenix_ai/store/adapter.ex#L57)

Sub-behaviour for adapters that support long-term memory profile storage.

Adapters implementing this behaviour can store, retrieve, and delete
per-user profile summaries. `save_profile/2` uses upsert semantics —
writing for the same `user_id` overwrites the previous profile.

# `delete_profile`

```elixir
@callback delete_profile(
  user_id :: String.t(),
  keyword()
) :: :ok | {:error, term()}
```

# `load_profile`

```elixir
@callback load_profile(
  user_id :: String.t(),
  keyword()
) ::
  {:ok, PhoenixAI.Store.LongTermMemory.Profile.t()}
  | {:error, :not_found | term()}
```

# `save_profile`

```elixir
@callback save_profile(
  PhoenixAI.Store.LongTermMemory.Profile.t(),
  keyword()
) :: {:ok, PhoenixAI.Store.LongTermMemory.Profile.t()} | {:error, term()}
```

---

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