HazelJS LogoHazelJS
HazelJS Blog

How to Secure AI Agent Tool Calls

Author
HazelJS Team
10/21/2026
General
How to Secure AI Agent Tool Calls
← 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

  1. Curate capabilities with Skillgate — do not expose every OpenAPI path.
  2. Authorize with Gatekeeper: allow, deny, or require-approval.
  3. Approve sensitive ops via durable HITL (hazel approvals).
  4. Store secrets on hazeld (hazel secret set).
  5. Audit with run timelines.
import { AgentGatekeeper, fromFunction } from '@hazeljs/​agent-gatekeeper';

Use hazel gatekeeper validate|simulate|explain to inspect policies without executing tools.

Read next