ACAgentic Craft

Advanced~55 minHazelJS

Security and Governance

Combine guardrails, auth/tenant guards, CASL policies, and PolicyEngine for agent permission boundaries.

Authors
editorial-team
Published
Last reviewed

Agents inherit your DI security stack: GuardrailsModule, Jwt/Tenant guards, CASL, and agent PolicyEngine—defense in depth.

Learning outcomes

  • Wire GuardrailsModule with AgentModule
  • Map HTTP auth/CASL to agent capabilities and policies

Lessons

  1. 01Guardrails and Tool I/O Hygiene
    Import GuardrailsModule with AgentModule; redact PII and block injection on tool I/O—with config sketch.
  2. 02Auth, CASL, and Agent Policy
    Align Jwt/Tenant guards and CASL with agent capabilities and PolicyEngine—with policy snippets.

Related patterns