agent-guardrail
Installation
SKILL.md
Add guardrails to an agent: $ARGUMENTS
Before Starting
- Search OpenAI docs for guardrail patterns:
- Use
mcp__openai-docs__search_openai_docswith query "Agents SDK guardrails" for SDK-native guardrail support - Use
mcp__openai-docs__search_openai_docswith query "Agents SDK input validation" for request validation patterns
- Use
- Read the existing guardrail implementation:
src/agents/shared/guardrails.ts— nonEmpty, maxLength, contentFilter, noErrors implementationssrc/agents/shared/enhanced-agent-bridge.ts—applyInputGuardrails()andapplyOutputGuardrails()in the bridge pipeline
- Read the database schema for guardrail persistence:
src/lib/database/schema.ts— search foragent_guardrailsandagent_guardrail_assignmentstables
Guardrail Types
Input Guardrails
Validate user messages BEFORE they reach the agent. Return { passed: boolean, reason?: string }.