How to make AI agents safe

To make AI agents safe, give each agent the least access its task needs, check every tool call before it runs, treat tool results as untrusted, and require approval for actions that cannot be undone.

Steps

  1. Give the least access. Each agent gets only the tools, data and permissions its task needs. Anything more is excessive agency. Run generated code in a sandbox.
  2. Check every tool call. Compare the tool's name and arguments with your policies before the call runs, outside the model. See guardrails for tool calls.
  3. Treat tool results as untrusted. A web page, an email or a file can carry instructions for the model. That is indirect prompt injection. Scan results before the model acts on them.
  4. Require approval for irreversible actions. Payments, deletions and outbound messages wait for a person. See human-in-the-loop approval.
  5. Trace everything. Record every message, tool call and verdict, so an incident can be reconstructed. See agent tracing.
  6. Red team it. Attack the whole system, tools included, before launch and on every deploy.
  7. Set limits per user. Track violations per user across sessions, cap request rate and spend, and throttle or suspend repeat offenders.

With White Circle

Control checks tool calls (terminal commands, code execution, API calls) against your policies before they run, blocks injected instructions before they reach a tool, and can hold a call for human approval. Violations are tracked per user, and strikes flag repeat offenders across sessions.

Train your own models

Post-train any Hugging Face model with Halo. Up to 4× faster than TRL