BeamAgent.Guardrails.MaxContextMessages (beam_agent v0.1.0)

Copy Markdown View Source

Ensures that the final model-facing context is within its configured message limit.

Summary

Functions

Checks that the rendered message count is within opts[:max_context_messages] (default 8).

Functions

check(state, opts)

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

Checks that the rendered message count is within opts[:max_context_messages] (default 8).