LegionWeb.AgentTracker (LegionWeb v0.3.0)

View Source

Tracks Legion agent invocations and their telemetry events.

Maintains two ETS tables:

  • :legion_web_agents — one record per agent run, keyed by run_id
  • :legion_web_events — ordered event log per agent, keyed by {run_id, seq}

Attaches to all Legion telemetry events on startup. Broadcasts changes via LegionWeb.PubSub so LiveView subscribers receive real-time updates.

Summary

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_agent(run_id)

get_events(run_id)

handle_telemetry(list, measurements, meta, config)

list_agents()

start_link(opts \\ [])