by f5 · v0.0.2
F5 Guardrail (CalypsoAI) prompts API as a Dify model provider. Routes prompts through F5 Guardrail's scanners and returns either the underlying LLM response or a blocked notice.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
This plugin exposes F5 Guardrail (CalypsoAI) as a model provider inside Dify.
Every request that Dify sends to this provider is forwarded through the Guardrail
prompts API. Guardrail's scanners run on the prompt and the LLM response, then
the plugin maps the result back to Dify's LLMResult shape so the Dify UI works
unchanged.
F5 Guardrail (routed) whose underlying LLM is
decided by the Provider and/or Project configured at the Dify
provider-credentials level.message (default): return an assistant message containing the configurable
blocked-text template.error: raise an invocation error so the Dify chat shows an error banner.full-conversation (default): send the full Dify conversation context
(multi-turn) to Guardrail.latest-user-message: only send the latest user message in the current
conversation to Guardrail.prompts.send API is synchronous. The plugin
always calls Guardrail in blocking mode and emits a single chunk if Dify asks
for a stream.InvokeBadRequestError to avoid silently dropping data.| Field | Required | Description |
|---|---|---|
calypsoai_url | yes | Base URL of your F5 AI Security tenant, e.g. https://www.us1.calypsoai.app. |
calypsoai_token | yes | Token issued by F5 AI Security. Stored as a secret. |
calypsoai_provider | optional | Provider name or ID configured in F5 Guardrail. Forwarded as provider= to the SDK if set. |
calypsoai_project | optional | Project ID or friendly ID. Forwarded as project= to the SDK if set. |
message_check_scope | yes (default full-conversation) | full-conversation or latest-user-message. Controls whether Guardrail checks full history or only the latest user message. |
blocked_response_mode | yes (default message) | message or error. Determines how blocked prompts are returned to Dify. |
blocked_message_template | optional | Format string with {reason} placeholder used in message mode. |
request_timeout_seconds | optional | Reserved for future use. |
Routing rule — when both
calypsoai_providerandcalypsoai_projectare filled, both values are passed to the Guardrail SDK in the same call. The Guardrail backend decides the final route.
Scope rule — when
message_check_scope=latest-user-message, only the newestusermessage is sent to Guardrail. If no user message exists in the prompt list, the plugin returns a clear bad-request error.
This repository is set up to be developed inside a conda environment.
conda create -n dify-f5-guardrail python=3.12 -y
conda activate dify-f5-guardrail
pip install -r requirements.txt
python -m pytest tests
The tests stub out the Guardrail SDK so they run offline.
cp .env.example .env
# fill REMOTE_INSTALL_HOST / REMOTE_INSTALL_KEY from Dify > Plugins > Debug
# set PLUGIN_LOG_ENABLED=true only when you want runtime logs
python -m main
dify plugin package .
The resulting *.difypkg can be installed directly into a Dify instance.