# `Jidoka.Agent.State`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/agent/state.ex#L1)

Durable semantic state for an agent session.

# `t`

```elixir
@type t() :: %Jidoka.Agent.State{
  messages: [term()],
  metadata: map(),
  operation_results: [term()]
}
```

# `from_input`

```elixir
@spec from_input(t() | keyword() | map() | nil) :: {:ok, t()} | {:error, term()}
```

Normalizes nil, an existing state struct, a keyword list, or a map into agent state.

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds validated durable agent session state.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds durable agent session state or raises when validation fails.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for durable agent session state.

---

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