This post is for security and platform leads who are accountable for what agents are allowed to do. Content guardrails such as input and output filters and prompt-injection classifiers are worth running. They are not the control that limits an agent’s actions. That control belongs at the tool boundary, in deterministic code outside the model, and it should grant the least the agent needs. Below I explain why, what I would build first, and when the advice matters less.
Why filtering text is not enough
OWASP’s LLM06:2025 Excessive Agency entry defines the risk as damaging actions taken in response to unexpected, ambiguous or manipulated model output, “regardless of what is causing the LLM to malfunction.” It lists two kinds of trigger. One is prompt injection. The other is hallucination from poorly engineered but benign prompts, or simply a poorly performing model. It names three root causes: excessive functionality, excessive permissions and excessive autonomy.
A classifier that catches injected text addresses one trigger. It does nothing when a confused model calls a delete function the agent should never have had. The root causes are about what the agent can reach, and a filter does not change that.
Vendors describe their guardrail products in content terms. Google describes Model Armor as runtime screening of prompts, responses and agent interactions for prompt injection, jailbreaking, sensitive data leaks and harmful content. That is useful. It is inspection of content, though, not a decision about whether a given identity may update a given table.
Where a guardrail runs matters too. OpenAI’s Agents SDK guardrails documentation says input guardrails run only for the first agent in a chain. Output guardrails run only for the agent that produces the final output, and tool guardrails run only on the tools they are attached to. Its own advice is to “put validation next to the tool that creates the side effect.”
Microsoft’s Foundry guardrails overview adds three points. Agent guardrails and the tool-call and tool-response intervention points are in preview. An agent’s guardrail fully overrides its model’s guardrail. And the system applies only to agents built in the Foundry Agent Service. The page gives an example in which a model is set to scan for violence, but the agent using it has no violence controls on tool calls, so tool calls go unscanned.
The lesson is simple. A guardrail you assume covers your agent may not be running at the point where the agent acts.
What I would build first
These are the controls I would put in place before tuning any filter thresholds:
- Cut the tool set and each tool’s functions. OWASP’s guidance is to offer only the extensions the agent needs. It also says to avoid open-ended tools like “run a shell command” in favor of narrow ones, and to give a mailbox summarizer read access only. Microsoft’s pattern for securing agentic systems puts it more firmly: start with no permitted actions and enable capabilities by role and risk.
- Scope the identity, not the instructions. OWASP says to enforce limits through the database permissions of the identity the tool connects with. Actions taken on a user’s behalf should run in that user’s context, for example through OAuth with minimum scope.
- Authorize in the execution component. OWASP calls this complete mediation: downstream systems decide, not the model. The OWASP AI Agent Security Cheat Sheet adds detail. A “user_confirmed” flag is insufficient. An approval must be bound to the current actor and the exact tool call, and consumed atomically. Changed parameters need fresh approval. Unknown tools fail closed.
- Make human approval deterministic. Microsoft’s pattern says to enforce review of high-risk or irreversible actions through orchestrator logic rather than model reasoning. OpenAI’s SDK pauses a run when a tool is marked as needing approval. Its documentation also says to fail closed if review times out or becomes unavailable. That is the right default.
After those, add logging and rate limiting. OWASP is explicit that these will not prevent excessive agency but can limit the damage. Add content filters on top as well. I would still run them. I would just not count them as the control that bounds actions.
When this matters less
If an agent has no tools, or only read-only tools over data the user could already see, the main risks are about content: leakage, harmful output and injection that shapes what the agent says. In that case a content filter is your primary control, and the tool-boundary work above has little to protect.
The calculation changes once the agent can write, send, delete or spend. Multi-agent systems need extra care, because OWASP lists a compromised peer agent as one source of injection. That is a reason to enforce checks per tool, not per agent.
For each agent you are accountable for, write down every tool it can call and the identity each tool runs as. Then ask whether code outside the model would refuse an action you do not want. If the answer depends on the model behaving well, you do not have a guardrail yet.
