Add F5 AI Security (CalypsoAI) as a guardrail in TrueFoundry AI Gateway to scan LLM prompts and responses for injection, jailbreak, and PII risks.
This guide explains how to integrate F5 AI Security (CalypsoAI) with TrueFoundry to scan LLM prompts and responses for prompt injection, jailbreak, PII, and policy violations.
F5 AI Security (powered by CalypsoAI) provides real-time scanners that inspect generative AI traffic — prompts and completions — for security and policy risks. Scanners and enforcement are managed in the F5 AI Security platform; the AI Gateway sends each guarded request for scanning and enforces the returned verdict.In the TrueFoundry AI Gateway integration, F5 AI Security can run as either a Validate or Mutate guardrail. Validate inspects and can block; Mutate can also apply redacted content (for example, forwarding a redactedInput) before the request continues.
Prompt and response scanning — Evaluates both inputs to the model and outputs from the model through F5 AI Security scanners.
Prompt injection and jailbreak detection — Flags adversarial inputs designed to override system instructions or bypass model constraints.
PII and policy violations — Detects personally identifiable information and other policy breaches configured in your F5 project.
Project-scoped scanners — Scanner coverage depends on the API token you provide. A project token runs the scanners enabled on that project; a global token uses globally available scanners. Configure scanners in F5 AI Security — see Getting started with AI Guardrails.
F5 AI Security is a first-class guardrail in the AI Gateway — you configure it through the same form as any other built-in guardrail, no adapter service required.
1
Pick CalypsoAI (F5 AI Security) from the guardrail registry
From AI Gateway → Guardrails → Registry, select CalypsoAI (F5 AI Security) under External Providers. See Get started with guardrails for the end-to-end flow of adding any guardrail.
Select CalypsoAI (F5 AI Security) from the guardrail registry
2
Generate an API key in F5 AI Security
Create an API token in the F5 AI Security / CalypsoAI console. Prefer a project-scoped token so only the scanners enabled on that project run for each scan. Keep the key secure — it grants access to your F5 AI Security scan API.
3
Fill in the CalypsoAI (F5 AI Security) form
Provide the following fields:
Field
Required
Description
Name
✅
Identifier for this guardrail (for example, f5-ai-security). Used when you reference the guardrail from rules.
Description
Free-form description shown in the dashboard.
CalypsoAI API Key Auth → API Key
✅
F5 AI Security / CalypsoAI API token. Stored encrypted. The AI Gateway attaches it on every scan call.
Operation
✅
Validate inspects and can block without modifying content (runs in parallel with other validate guardrails). Mutate can validate and also rewrite content — for example, forwarding a redactedInput for PII (runs sequentially by priority).
Priority
Optional execution order for mutate guardrails. Lower values run first.
CalypsoAI (F5 AI Security) guardrail configuration form
Keep the CalypsoAI API key in TrueFoundry only — it should never appear in client code or model request bodies.
Use Validate when you only need to block unsafe prompts or completions. Use Mutate when F5 scanners are configured to redact (for example, PII) and you want the AI Gateway to continue with the redacted content instead of blocking.
4
Bind the guardrail to models with a rule
Once the guardrail is saved, attach it to one or more models through a Guardrail Rule. Use llm_input_guardrails to scan prompts before they reach the model and llm_output_guardrails to scan completions before they’re returned to the caller.For a step-by-step walkthrough, see Getting Started. For the full policy reference, see Guardrails Configuration.
TrueFoundry uses the F5 AI Security (CalypsoAI) scan response to decide whether content is safe:
If CalypsoAI returns a blocked outcome (for example, outcome: blocked), the AI Gateway blocks the request and returns a 400 error to the caller — subject to your Enforcing Strategy.
If scanners clear the content, the request is allowed to proceed. In Mutate mode, any redacted content returned by CalypsoAI can replace the original prompt or completion before the next step.
If the scan API call fails (timeout, 5xx, auth error), behavior follows your Enforcing Strategy:
Enforce — fail closed; the request is blocked.
Enforce But Ignore On Error — fail open; the request proceeds and the failure is logged.
Audit — never block; violations and errors are logged only.
When a prompt triggers F5 scanners (for example, prompt injection and jailbreak), the Playground shows an input guardrail failure with the scanner IDs that fired:
Playground blocked by CalypsoAI (F5 AI Security) on a prompt injection attempt
Example error detail:
Input Guardrail checks failed for integrations: [my-group/f5-ai-security]- Details: CalypsoAI (F5 AI Security) policy violation (outcome: blocked; scanners: <scanner-id-1>, <scanner-id-2>)
You can inspect the full guardrail evaluation in AI Gateway → Monitor → Request Traces, or use View Raw Response in the Playground dialog for scanner categories and scores.
Exact scanner enablement is configured in F5 AI Security (per project or globally, based on your API token). Typical coverage for this integration includes:
Detection
Description
Prompt injection
Malicious inputs designed to override system instructions or model constraints
Jailbreak
Attempts to manipulate the model into generating prohibited content
PII
Personally identifiable information in prompts or responses (can support redaction in Mutate mode)
Policy violations
Other organizational or safety policies enforced by your enabled scanners