Overview
A self-hosted gateway that sits between your application and an LLM API (OpenAI-compatible, or Anthropic's Messages API) and blocks prompt injection. It checks user messages, tool results, retrieved documents and MCP tool descriptions before they reach the model, then checks the model's answer for exfiltration links and images, personal data and a leaked canary before it reaches users, including when streaming. Detection uses three layers fused into one score: L1 rules (covering Vietnamese diacritics, teencode, leetspeak and homoglyphs), L2 an ONNX classifier of its own, and L3 similarity to known attack examples, with a sanitizer in front. You change the base URL and keep your SDK; the README covers the OpenAI SDKs, LangChain, LlamaIndex, Claude Code and Cursor, and routing to OpenAI, Azure OpenAI, Anthropic, Gemini, vLLM and Ollama. It is written in Go, runs as two services next to Postgres, has an admin UI in English and Vietnamese, and its releases are signed with cosign and ship an SBOM. It has been built and evaluated for English and Vietnamese only. Status v0.6.0, pre-1.0: the API and database schema can still change. Licence Apache-2.0. 15 stars on GitHub (created 2026-11-03).
Quick summary. This page gives a short overview of this tool. For installation steps, full documentation and the latest changes, read the official source; details such as features and versions can change there first.
Example prompts example
Illustrative examples written by FoxaMind's AI Trends Scout — not quoted from the source.
- Needs Docker with Compose v2, curl and jq; the quickstart writes a .env with random secrets and prints the admin password once.
- For a laptop or small VM run DETECTOR_LAYERS=l1,l2 scripts/quickstart.sh (about 500 MB gateway memory instead of 940 MB, per the README).
- Set UPSTREAM_LLM_URL to an OpenAI-compatible upstream; without it the gateway answers with stub responses.