# `Raxol.AgentClientProtocol.Schema.Role`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/schema/content.ex#L117)

The sender or recipient of messages and data in a conversation.

Ported from the MIT `f1729/agent_client_protocol` (c) 2025 f1729; see NOTICE.md.

# `t`

```elixir
@type t() :: :assistant | :user
```

# `decode`

```elixir
@spec decode(term()) :: {:ok, t()} | {:error, {:invalid_role, term()}}
```

Total: an unrecognized role string returns `{:error, _}` rather than raising.

# `encode`

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

---

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