class Riffer::Guardrail

Base class for guardrails that process input and output in the agent pipeline.

Subclass this to create custom guardrails:

class MyGuardrail < Riffer::Guardrail def process_input(messages, context:) # Return pass(messages), transform(modified_messages), or block(reason) pass(messages) end

def process_output(response, messages:, context:)
  # Return pass(response), transform(modified_response), or block(reason)
  pass(response)
end

end