Guardrails for autonomous agents: inputs, outputs and actions
Guardrails for chatbots filter words. Guardrails for agents must also govern actions. Here's a layered approach that works.
When a chatbot misbehaves, you get an embarrassing reply. When an agent misbehaves, you can get a wrong payment, a leaked document or a deleted account. That's why guardrails for agents need to go further than content filters.
We think of agent guardrails in three layers.
1. Input guardrails
These check what goes into the agent before the model sees it:
- Prompt-injection detection: instructions hidden in emails, web pages or documents that try to take over the agent
- Scope checks: is this request something this agent is meant to handle at all?
- Sensitive-content redaction: mask personal identifiers the agent doesn't need
Prompt injection deserves special attention. Anything an agent reads (a web page, a PDF, a ticket) should be treated as untrusted content, never as instructions.
2. Output guardrails
These check what comes out of the model:
- Schema validation: does the output match the expected structure?
- Policy checks: tone, prohibited claims, regulated advice
- Grounding checks: is every claim backed by a source the agent actually retrieved?
3. Action guardrails
This is the layer chatbots never needed. Before an agent calls a tool, check:
- Permission: is this agent allowed to use this tool, on this resource?
- Limits: amount caps, rate limits, allowed recipients and domains
- Reversibility: irreversible actions route to human approval
- Budget: will this call push the agent past its spend limit?
The safest agent isn't the one with the best prompt. It's the one whose tools physically can't do the dangerous thing.
Allow, warn, block
Every guardrail check should end in one of three clear outcomes:
| Outcome | Behaviour |
|---|---|
| Allow | Proceed and log |
| Warn | Proceed, flag and sample for review |
| Block | Stop, record the reason, and escalate if needed |
Clear outcomes make guardrails auditable. You can see exactly how often each one fires and tune the thresholds over time.
Keep them fast
Guardrails sit on the critical path of every request. They should add milliseconds, not seconds. Run cheap deterministic checks first, and save model-based checks for cases that actually need judgement.
See Argos Nexus AI in action
Governed agents, human review and full audit — in one platform.