Jido.Agent.Identity.Profile (Jido v2.3.0)

Copy Markdown View Source

Helpers for reading and writing identity profile fields.

Summary

Functions

Returns the age from the identity profile, or nil when no identity exists.

Get a key from the identity profile with a default.

Set a key in the identity profile.

Functions

age(agent)

@spec age(Jido.Agent.t()) :: non_neg_integer() | nil

Returns the age from the identity profile, or nil when no identity exists.

get(agent, key, default \\ nil)

@spec get(Jido.Agent.t(), atom(), term()) :: term()

Get a key from the identity profile with a default.

put(agent, key, value)

@spec put(Jido.Agent.t(), atom(), term()) :: Jido.Agent.t()

Set a key in the identity profile.