Skip to main content

Native Guardrail Integration

Agents framework supports guardrails natively. Halios provides guardrail implementation classes that directly plugs into the agent framework’s native guardrail evaluation capabilities. Add HaliosAI guardrails directly to your Agent definitions:

Complete Integration Example

Integration Benefits

  • Native Support: No client patching or complex setup required
  • Declarative Configuration: Add guardrails directly to agent definitions
  • Full Framework Compatibility: Works with all OpenAI Agents features
  • Detailed Results: Access to guardrail evaluation metadata
  • Clean Error Handling: Proper exception handling for guardrail triggers

Key Components

  • HaliosInputGuardrail: Evaluates user input before processing
  • HaliosOutputGuardrail: Evaluates agent responses after generation
  • Automatic Evaluation: Guardrails run automatically during agent execution
  • Result Inspection: Access detailed guardrail results and metadata

Example

See the OpenAI Agents Integration example for a complete implementation with multiple test scenarios and proper error handling.