New: Decision Runtime — closed-set judgments for Agent OS. Read the guide →
HazelJS LogoHazelJS

AI Agent Security

AI agent security focuses on what tools may run, with which credentials, and under which approvals. HazelJS provides fail-closed Gatekeeper authorization, approval gates, local encrypted secrets on hazeld, and audit timelines. This page does not claim prompt-injection immunity or a hosted compliance product.

01What HazelJS covers

  • Tool authorization (allow / deny / require-approval)
  • Least privilege via explicit policies and Skillgate skill sets
  • Secrets: hazel secret set/delete/has against hazeld EncryptedFileSecretStore
  • Isolation: agents run in your Node process / local node — design isolation accordingly
  • Audit trails: AgentRun timelines and CLI logs
  • Sensitive operations: Gatekeeper + HITL approval queues
  • Cross-agent calls: still go through tool authorization

02Related app security

HTTP-level headers, CSRF, and rate limits for the broader HazelJS app stack are documented in the security guide. Content/PII filters live in @hazeljs/guardrails when you opt in.

03Gatekeeper policy sketch

typescript
import { AgentGatekeeper, fromFunction } from '@hazeljs/agent-gatekeeper';

const gatekeeper = new AgentGatekeeper({
  policies: [
    fromFunction('refunds.create', async (ctx) =>
      ctx.amount > 50 ? 'require-approval' : 'allow',
    ),
  ],
});