Raxol.Agent.Session (Raxol v2.3.0)

View Source

Manages a single agent's TEA application lifecycle.

Follows the same pattern as Raxol.SSH.Session: wraps a Lifecycle instance with environment: :agent. Agents register in Raxol.Agent.Registry for discovery by other agents.

Summary

Functions

Returns a specification to start this module under a supervisor.

Read the agent's current model.

Read the agent's view as a semantic tree (layout keys stripped).

Read the agent's latest view tree.

Send a message into the agent's TEA loop.

Types

t()

@type t() :: %Raxol.Agent.Session{
  app_module: module(),
  id: term(),
  lifecycle_pid: pid() | nil,
  team_id: term() | nil
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_model(agent_id)

Read the agent's current model.

get_semantic_view(agent_id)

Read the agent's view as a semantic tree (layout keys stripped).

get_view_tree(agent_id)

Read the agent's latest view tree.

send_message(agent_id, message)

Send a message into the agent's TEA loop.

start_link(opts)