Converts internal execution state into a structured BeamAgent.Run
representation, capturing the goal, answer, status, trace, and timestamps
of the agent's execution.
Summary
Functions
Builds a Run for a state that failed before ever reaching a reply
(a guardrail tripped, context couldn't be compressed, an unknown tool was
called, ...). verification_status is :not_run since verification never
gets a chance to run.
Builds a Run with verification_status: :passed from a finished
state. Used as the verification candidate before BeamAgent.Verifier
runs against it.
Builds a Run with verification_status: :failed and the given reason
recorded as verification_error.
Functions
@spec execution_failed(BeamAgent.State.t(), term()) :: BeamAgent.Run.t()
Builds a Run for a state that failed before ever reaching a reply
(a guardrail tripped, context couldn't be compressed, an unknown tool was
called, ...). verification_status is :not_run since verification never
gets a chance to run.
@spec success(BeamAgent.State.t()) :: BeamAgent.Run.t()
Builds a Run with verification_status: :passed from a finished
state. Used as the verification candidate before BeamAgent.Verifier
runs against it.
@spec verification_failed(BeamAgent.State.t(), term()) :: BeamAgent.Run.t()
Builds a Run with verification_status: :failed and the given reason
recorded as verification_error.