BeamAgent.Guardrails.MaxToolCalls (beam_agent v0.1.0)

Copy Markdown View Source

Prevents an agent executing more than the allowed tool calls.

Summary

Functions

Checks that the tool-call count is within opts[:max_tool_calls] (default 5).

Functions

check(state, opts)

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

Checks that the tool-call count is within opts[:max_tool_calls] (default 5).