BeamAgent.Guardrails.MaxExecutionTime (beam_agent v0.1.0)

Copy Markdown View Source

Prevents an agent from executing for longer than the allowed time.

Summary

Functions

Checks that wall-clock elapsed time is within opts[:max_execution_time_ms] (default 30_000).

Functions

check(state, opts)

@spec check(
  BeamAgent.State.t(),
  keyword()
) :: :ok | {:error, {:max_execution_time_reached, map()}}

Checks that wall-clock elapsed time is within opts[:max_execution_time_ms] (default 30_000).