Install guardrails-ai and authenticate with the Hub by running guardrails hub install to download validators using a free Hub API key from hub.guardrailsai.com/keys
Browse the Guardrails Hub to identify pre-built validators matching your risk categories (e.g., toxic language, PII detection, valid JSON)
Install the specific validator packages via guardrails hub install hub://guardrails/VALIDATOR_NAME
Define a Guard object in Python, adding installed validators to either the input or output guard using guard.use() with fail_action set to your desired behavior (EXCEPTION, FIX, or NOOP)
Call guard(llm_output) or wrap your LLM call with guard(llm_callable, ...) to run all configured validators against the output
Inspect the ValidationOutcome object returned by the guard for pass/fail status, error spans, and any fixed output if fix mode was used
Known gotchas
Each validator may have its own dependencies and may make additional model or API calls internally; check the Hub documentation for each validator to understand latency and cost implications
fail_action=FIX attempts to automatically correct invalid output, but correction quality varies by validator — always log original and fixed outputs to audit drift from intended behavior
Validator packages installed via the Hub are versioned separately from the guardrails-ai core; mismatched core and validator versions can cause import errors that are not obvious from the error message
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp