Guardrails are automatic checks placed around an AI system that block, flag, or correct output that breaks defined rules before it takes effect.
What guardrails do
A guardrail is a rule enforced in code, outside the model. The model can ignore instructions in its prompt; it cannot ignore a check that runs after it. Guardrails can inspect inputs, outputs, or actions.
Common kinds:
- Content rules: banned topics, words, or claims.
- Format rules: length limits, required fields, missing alt text.
- Rate rules: how often an action may run.
- Link rules: allowed or blocked domains.
An example
An agent drafts a Bluesky post of 340 graphemes. The per-network length guardrail flags it, since Bluesky allows 300, and the draft cannot publish until it is shortened.
Why it matters for social publishing
Review catches judgment calls. Guardrails catch the mechanical errors a tired reviewer misses, and they matter most for agents allowed to publish without review.
SocialHandoff ships guardrails for banned topics, per-network length, missing alt text, per-account daily limits, and blocked link shorteners. They run on every draft. If an agent that was promoted on the trust ladder trips one, it is demoted to draft-only right away. Configure them in the guardrails guide, and check post length ahead of time with the cross-post length checker.