Skip to content

Add custom guardrail support#5

Merged
nagasatish007 merged 1 commit into
agentguard-ai:mainfrom
lleonardo-franco:feature/custom-guardrail-rules
May 22, 2026
Merged

Add custom guardrail support#5
nagasatish007 merged 1 commit into
agentguard-ai:mainfrom
lleonardo-franco:feature/custom-guardrail-rules

Conversation

@lleonardo-franco

Copy link
Copy Markdown
Contributor

Summary

  • Add a function-based CustomGuardrail wrapper for domain-specific guardrail checks.
  • Allow TealOpenAIConfig to register custom guardrails alongside the existing guardrail engine.
  • Export the new public guardrail types and cover request blocking behavior.

Validation

  • /private/tmp/tealtiger-python-venv/bin/python -m pytest tests/test_guardrail_engine.py tests/clients/test_teal_openai.py -q

Refs agentguard-ai/tealtiger#7

@nagasatish007 nagasatish007 merged commit 0a5f5f3 into agentguard-ai:main May 22, 2026
2 of 21 checks passed
@nagasatish007

Copy link
Copy Markdown
Contributor

Merged! Nice feature @lleonardo-franco.

Could you open a follow-up PR adding documentation for this? Users won't discover it without docs. Something like:

A "Custom Guardrails" section in the README with a quick example
An example file at
custom_guardrail.py
showing 2-3 real-world use cases (e.g., medical terms blocker, financial compliance check, domain-specific content filter)
The API is clean — just needs visibility. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants