Documentation Index
Fetch the complete documentation index at: https://docs.runcascade.com/llms.txt
Use this file to discover all available pages before exploring further.
CascadeShield scans content for prompt injection in the background. Fire-and-forget — adds zero latency. Works standalone; no init_tracing required.
Initialize
CASCADE_API_KEY and CASCADE_ENDPOINT by default. Or pass explicitly:
detect()
| Parameter | Type | Description |
|---|---|---|
content | str, dict, list, or any | Content to scan. Non-strings are auto-serialized. |
response_text | str, dict, list, or any | Optional context (not scanned). |
source | str | Identifier (e.g. "slack", "retrieval"). |
metadata | dict | Extra context (e.g. {"user_id": "123"}). |
Copy-paste example
Run this script to test CascadeShield with structured data. Detected injections will appear in your Security Logs.CASCADE_API_KEY in your environment (or .env) before running. Check the Security Logs page in your Cascade dashboard to see which items were flagged.
Viewing detected attacks
Detected injections appear on the Security Logs page in your Cascade dashboard. Each event includes score, matched patterns, heuristic flags, model reasoning, source, metadata, and latency. Benign content is not persisted.
Tuning detection
Configure detection from the Security Config page in your dashboard. Adjust detection weights (regex, heuristic, model), threshold, strength per vector, custom regex patterns, disabled built-ins, and heuristic overrides. You can run backtests against your historical Security Logs to see how different settings would have performed on past events. Compare before and after: tune your weights or threshold, re-run the backtest, and measure how detection accuracy changes. This lets you validate improvements before rolling them out to production and track how your system gets better over time.