BeamAgent.Runner (beam_agent v0.1.0)

Copy Markdown View Source

Executes one isolated agent run.

Each run is its own GenServer, started anonymously (no name registration) by BeamAgent.RunSupervisor, so many runs can be in flight concurrently and one crashing has no effect on the others — the crash is contained to this process and surfaces to the caller of BeamAgent.API.run/2 as a {:runner_crashed, reason} error, not a propagating exit.

start_link/1 accepts:

Call run/2 to kick off execution; the result arrives as {:agent_run_finished, pid, result} sent to the given caller, after which this process stops normally.

Summary

Functions

Starts execution of pid's run; the result is sent to caller as {:agent_run_finished, pid, result}.

Types

tools()

@type tools() :: BeamAgent.Tools.Registry.tools()

Functions

run(pid, caller)

@spec run(pid(), pid()) :: :ok

Starts execution of pid's run; the result is sent to caller as {:agent_run_finished, pid, result}.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()