HazelJS Blog
How to Secure AI Agent Tool Calls
HazelJS Team
10/21/2026
General← Back to Blog
Least privilege, Gatekeeper allow/deny/require-approval, hazeld secrets, and audit timelines — without unsupported security claims.
Securing tool calls means deciding who may run which tool with which credentials, and recording what happened. HazelJS focuses on fail-closed authorization — not marketing claims of “prompt injection proof.”
Practical controls
- Curate capabilities with Skillgate — do not expose every OpenAPI path.
- Authorize with Gatekeeper:
allow,deny, orrequire-approval. - Approve sensitive ops via durable HITL (
hazel approvals). - Store secrets on hazeld (
hazel secret set). - Audit with run timelines.
import { AgentGatekeeper, fromFunction } from '@hazeljs/agent-gatekeeper';
Use hazel gatekeeper validate|simulate|explain to inspect policies without executing tools.