Agents that read email, query production databases, and call external APIs carry a different risk from read-only chat. A hallucinated parameter or an indirect prompt injection in a document can trigger an unwanted action unless deterministic controls limit what the agent can do.

The Agentic Risk Surface

When a language model can call tools in a CRM, ERP, or messaging platform, reliability depends on separating probabilistic reasoning from deterministic policy. System prompts alone are not a control. The question for every tool is: what is the worst thing it can do if the model is wrong or has been manipulated?

A Three-Layer Guardrail Pattern

  • Layer 1. Input handling: Remove unnecessary personal data, classify the request, and scan untrusted documents for injected instructions before they reach the model.
  • Layer 2. Scoped tool execution: Validate tool arguments against a schema, grant the least privilege needed, and rate-limit each tool.
  • Layer 3. Output checks: Check answers against the retrieved sources, and write an audit record before a response is returned or an external system is changed.

Human Approval Flows

For high-impact actions, such as issuing a refund above a threshold, changing a customer record, or sending external legal correspondence, the agent should stop, store the proposed action, and ask a named person to approve it in the tool the team already uses. This supports the human oversight the EU AI Act requires for high-risk systems (Article 14), and it is good practice for any agent that acts on people's accounts or money.