Skip to main content

Configure in code

Configure via YAML (callguard.yaml)

Agent Sentinel will search for callguard.yaml in:
  • ./callguard.yaml
  • ./.agent-sentinel/callguard.yaml
  • $AGENT_SENTINEL_HOME/callguard.yaml
Example:
Load it:

What happens on violation?

Policy checks run before your function executes:
  • Denied action / allowlist mismatch / rate limit → PolicyViolationError
  • Budget exceeded → BudgetExceededError
If you want to handle violations: