Skip to main content
This guide explains how to integrate Cisco AI Defense with TrueFoundry to inspect LLM prompts and responses for security, safety, privacy, and relevance violations.

What is Cisco AI Defense?

Cisco AI Defense provides an Inspection API that evaluates generative AI chat conversations — prompts and completions — for security, safety, and privacy concerns. Policies and rules are managed in the Cisco AI Defense product; the AI Gateway sends each guarded request to the regional Inspection endpoint and enforces the verdict. In the TrueFoundry AI Gateway integration, Cisco AI Defense runs as a Validate-only guardrail: content is inspected and can be blocked, but it is not rewritten or redacted in place.

Key capabilities

  1. Chat inspection — Evaluates conversation messages (role + content) through the Cisco Inspect conversations API (POST /api/v1/inspect/chat).
  2. Security, safety, privacy, and relevance — Detects violations across classifications such as SECURITY_VIOLATION, PRIVACY_VIOLATION, SAFETY_VIOLATION, and RELEVANCE_VIOLATION.
  3. Built-in rule coverage — Cisco AI Defense rules include Prompt Injection, PII, PHI, PCI, Code Detection, Harassment, Hate Speech, Profanity, Sexual Content & Exploitation, Social Division & Polarization, and Violence & Public Safety Threats.
  4. Regional endpoints — Route inspection traffic to the US, AP, or EU Cisco Inspection API region that matches your AI Defense tenant.

Adding Cisco AI Defense to TrueFoundry

Cisco AI Defense 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 Cisco AI Defense from the guardrail registry

From AI Gateway → Guardrails → Registry, select Cisco AI Defense under External Providers. See Get started with guardrails for the end-to-end flow of adding any guardrail.
TrueFoundry guardrail registry highlighting the Cisco AI Defense card under External Providers

Select Cisco AI Defense from the guardrail registry

2

Generate an API key in Cisco AI Defense

Create an API key in the Cisco AI Defense UI. The AI Gateway sends this key on every inspection call as the X-Cisco-AI-Defense-API-Key header. Keep the key secure — it grants access to your AI Defense Inspection API.
3

Fill in the Cisco AI Defense form

Provide the following fields:
TrueFoundry interface for configuring Cisco AI Defense with fields for description, API key, operation, enforcing strategy, region, and metadata

Cisco AI Defense guardrail configuration form

Keep the Cisco AI Defense API key in TrueFoundry only — it should never appear in client code or model request bodies.

Regional endpoints

The Region field selects which Cisco Inspection API base URL the AI Gateway calls:Chat inspection is sent to POST /api/v1/inspect/chat on the selected regional host. See the Cisco Inspect conversations API reference for request and response fields.
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.

Validation logic

TrueFoundry uses the Cisco AI Defense Inspection response to decide whether content is safe:
  • If Cisco returns is_safe: false (or reports one or more violated rules / classifications), the AI Gateway blocks the request and returns a 400 error to the caller — subject to your Enforcing Strategy.
  • If Cisco returns is_safe: true with no violated rules, the request is allowed to proceed.
  • If the Inspection 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.

Example Inspection response

When a prompt or completion violates policy, Cisco AI Defense can return fields such as:
You can inspect the full guardrail evaluation in AI Gateway → Monitor → Request Traces.

Supported rules

Cisco AI Defense can evaluate conversations against rules including: Exact rule enablement and integration profiles are configured in Cisco AI Defense. The AI Gateway forwards messages for inspection and enforces the returned verdict.

Reference