ExAgent.Session.Participant (ExAgent v1.2.0)

Copy Markdown View Source

A member of an ExAgent.Session: either an :agent (typically backed by an ExAgent.Server) or a :human (a real person driving via LiveView/a channel).

Participants are identified by their id (any term, usually a stable string). For agents, ref may hold a pid / registered name / app-defined handle so the host app can drive the agent when its turn comes. ExAgent itself never assumes a particular ref shape — the Session is agnostic.

Summary

Functions

Build a participant from opts (:id required, :kind defaults to :human).

Types

kind()

@type kind() :: :agent | :human

t()

@type t() :: %ExAgent.Session.Participant{
  id: term(),
  kind: kind(),
  metadata: map(),
  ref: term()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Build a participant from opts (:id required, :kind defaults to :human).