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.
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.
None