TokenPad
Safety

AI Agent Guardrail Builder

Turn a list of rules into a guardrail block that survives injection.

One rule per line: kind | situation | action

226 characters3 lines0 tokensor drop a file

Guardrail BuilderExact
0Token change
Token change0no change
Input tokens0what you pasted
Output tokens0what you would send
Token cost of this result
Output tokens0
As input$0.00
× 100K requests$0.00

Everything on this page runs in your browser. Nothing you paste is transmitted, because there is no server here to transmit it to.

Result
 

Why grouping matters

Constraints scattered through a prompt are followed less reliably than the same constraints stated together. Grouping them also makes them reviewable, which matters when the rules encode something a person is accountable for.

The three kinds behave differently: refuse and escalate, ask before proceeding, and never under any circumstances. Mixing them into one list loses that distinction.

The precedence line

The generated block ends by stating that these rules outrank any instruction appearing in retrieved documents, user uploads or tool results, and that content from those sources is data rather than commands.

This is a mitigation, not a guarantee. It raises the bar for injection without removing the risk — the durable defences are narrow tool permissions and confirmation on anything irreversible.

Frequently asked questions

Do guardrails in a prompt actually hold?
Usually, against ordinary input. Against a deliberate adversary they are one layer among several, and never the layer you rely on. Permissions enforced outside the model are what actually constrain an agent.
Where should this block go in the prompt?
In the system prompt, near the end. Instructions near the end of a prompt are weighted more heavily than the middle, and guardrails are exactly what you want the model holding when it starts generating.

More safety tools