Guardrails for tool calls

Tool call guardrails check each tool call an AI agent makes (the tool's name and its arguments) against policy before it runs, then allow it, block it or hold it for a person's approval.

How it works

A model does not run tools itself. It writes a request (a tool name and arguments), and the app around it runs the tool:

JSON

{"name": "run_command", "arguments": {"command": "rm -rf /srv/data"}}

The guardrail reads that request before it runs. A blocked call does not run, and the agent gets a refusal in place of a result. A held call waits for a person: see human-in-the-loop approval.

The arguments matter more than the name: run_command is harmless with ls.

Why output checks are not enough

An output check reads the text written for the user. An agent's harm is not in that text. It is in the action, and by the time the answer is written the email is sent or the file is gone. An injected instruction usually aims at a tool, not at the reply: see data exfiltration.

Tool results need a check on the way back in. They are untrusted text and can carry an indirect prompt injection.

With White Circle

Control checks tool calls (terminal commands, code execution, API calls) before they run and blocks injected instructions before they reach a tool. A policy can hold a tool call for confirmation.

Train your own models

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