Skip to main content

Guardrail Reference

FleetForge guardrails keep agent runs within approved safety, cost, and compliance boundaries. Configure step-level guardrails in the run spec (policy.guardrails[]), pair them with a policy pack, and enforce runtime-wide allowlists via environment variables.

Need the big picture? Start with the Policy system concept. For deployment walkthroughs, see Demo hardening and Deploy with Helm.

Step-level flags (policy.guardrails[])

Attach guardrails directly to a step in the run spec. Multiple flags can be combined; conflicting directives fail validation. Example:

{
"policy": {
"guardrails": [
"block_injection",
"egress_http_allowlist:corp.example",
"tool_sandbox:firecracker"
]
}
}
FlagEffectConfigure inRelated docs
redact_piiRedacts PII before the step returns data.Run spec (policy.guardrails[])Policy system, Policy presets
deny_on_piiFails the step when PII is detected.Run specPolicy presets
block_injectionRuns the prompt-injection Wasm pack (deny/redact).Run specUntrusted context policy
block_command_outputRedacts shell/SQL command strings in outputs.Run specPolicy presets
egress_http_allowlist:<domain>Allows HTTP proxy egress only to the given domain or subpath. Repeat the flag for multiple domains.Run specUntrusted context policy
egress_http_content_type:<mime>Restricts HTTP proxy responses to specific MIME types.Run specUntrusted context policy
egress_http_max_bytes:<n>Caps HTTP proxy response size (n bytes).Run specUntrusted context policy
tool_sandbox:firecrackerPrefers the Firecracker sandbox for the step (falls back to Docker).Run specDemo hardening

Policy packs (FLEETFORGE_POLICY_PACK)

Policy packs apply global guardrail defaults. Set FLEETFORGE_POLICY_PACK=<name> before starting the runtime.

PackUse when…HighlightsDocs
allow_allRunning local experiments or the demo.Toolbox image keeps permissive commands; network open.
hipaaHandling PHI or regulated healthcare data.Denies PHI guardrails, enforces tool/image/network allowlists.Regulated packs
gdprOperating on EU personal data.Similar to HIPAA; loopback network allowed for intra-cluster calls.Regulated packs
owasp_demoDemonstrating OWASP LLM Top 10 mitigations.Aligns with the demo presets, pairs with public walkthroughs.Policy presets

Pack definitions live in policy-packs/. Update this list when behaviour changes or new packs ship.

Runtime environment variables

Use environment variables at deployment time (Helm values, Cloud Run env vars, Compose files) to lock down executors and allowlists.

VariablePurposeTypical usage
FLEETFORGE_POLICY_PACKSelects the global policy pack.hipaa, gdpr, allow_all, owasp_demo
FLEETFORGE_ALLOWED_TOOLSComma-separated toolbox command allowlist.Tighten demos or regulated clusters (echo,python,jq).
FLEETFORGE_ALLOWED_IMAGESAdditional container images permitted for tool steps.Approve custom tool images.
FLEETFORGE_ALLOWED_NETWORKSDeclares outbound network profiles beyond defaults (none, loopback).Grant curated egress for regulated packs.
FLEETFORGE_FIRECRACKER_SHIMPath to the Firecracker launcher.Required when tool_sandbox:firecracker is used.
FLEETFORGE_HTTP_ALLOWLISTRuntime-wide HTTP proxy allowlist (domains/paths).Match step-level guardrails with operator defaults.
FLEETFORGE_HTTP_CONTENT_TYPESOverrides allowed response MIME types for the HTTP proxy.Permit additional formats (e.g. application/pdf).
FLEETFORGE_HTTP_MAX_BYTESSets the maximum HTTP proxy response size.Prevent large downloads during egress.

Document approvals whenever you expand allowlists or sandbox exceptions.

Where to go next