agno-guardrails

Integrate input and output validation guardrails into Agno agents.

4|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/ajshedivy/agno-cookbook --skill agno-guardrails
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agno-guardrails
Source: https://github.com/ajshedivy/agno-cookbook/tree/main/plugins/agno-framework/skills/agno-guardrails
Command: npx skills add https://github.com/ajshedivy/agno-cookbook --skill agno-guardrails

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agno[openai], and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enhances the safety and reliability of AI agents by implementing robust input and output validation, preventing harmful or unintended interactions.

Core Features & Use Cases

  • Input Validation: Use pre_hooks to check user inputs for spam, policy violations, or PII before agent processing.
  • Output Validation: Employ post_hooks to validate agent responses for PII, format correctness, or adherence to content policies.
  • Built-in Checks: Leverage pre-built guardrails for PII and prompt injection detection.
  • Use Case: Protect your customer-facing chatbot by ensuring user inputs don't contain offensive language and that the agent's responses do not accidentally reveal sensitive customer data.

Quick Start

Add a guardrail to your agent to block messages containing more than 10 exclamation marks.

Frequently Asked Questions about agno-guardrails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add input validation to an Agno agent to check for PII?

Input validation for PII in Agno agents is added by attaching custom guardrail classes to pre_hooks, which intercept and filter user inputs before processing to ensure safety.

What are AI guardrails and how do they secure chatbot interactions?

AI guardrails are input and output validation checks that secure chatbots by filtering malicious inputs like prompt injections and ensuring responses do not leak sensitive customer data.

Can I validate agent responses for format correctness after generation?

You can validate agent responses for format correctness by using post_hooks, which execute post-processing validation to check outputs for PII and content policy adherence.

Does the agno framework support built-in prompt injection detection?

The Agno framework supports built-in prompt injection detection through integrated guardrails that automatically identify and block malicious inputs attempting to override system instructions.

Do I need the openai dependency to use agno guardrails?

You need the agno[openai] dependency installed to utilize these guardrails, as the validation classes and agent execution environment rely on this specific framework integration.