Skip to main content
BaseGuardrail is the abstract base class for guardrails. Subclass it and implement check and async_check to build a custom guardrail.

Methods

check

Perform the guardrail checks synchronously. Parameters:
  • run_input (RunInput | TeamRunInput): The input provided to the Agent or Team when invoking the run.
Returns: None

async_check

Perform the guardrail checks asynchronously. Parameters:
  • run_input (RunInput | TeamRunInput): The input provided to the Agent or Team when invoking the run.
Returns: None