Serializable session container.
Moved to alloy_agent
This struct has moved to AlloyAgent.Session in the
alloy_agent package. This
copy will be removed in Alloy 0.13.0. Migrate by replacing
%Alloy.Session{} with %AlloyAgent.Session{} and
Alloy.Session.new/1 with AlloyAgent.Session.new/1.
Wraps the conversation state in a format that can be serialized to JSON, stored in a database, or passed between processes. No database required — sessions are plain structs.
Summary
Functions
Creates a new session with a generated ID.
Updates a session with results from an agent run.
Types
@type t() :: %Alloy.Session{ created_at: DateTime.t(), id: String.t(), messages: [Alloy.Message.t()], metadata: map(), updated_at: DateTime.t(), usage: Alloy.Usage.t() }