Aegis-RAG — Gateway Playground
Try to get a prompt injection past the first line of defence.
Every question sent to Aegis-RAG is scored by its SecurityGateway before anything is retrieved or generated. This page runs that gateway — the same Python module the API runs, copied from the repository when the page is built — inside your browser, on Pyodide. Nothing you type leaves this tab.
It is the first layer only: retrieval, the LLM and the output sanitizer are not part of this page. The gateway is a fast heuristic, not the safety boundary on its own; the project explains why in ADR 0002.
Loading the Python runtime (about 10 MB, cached after the first visit)…
Attacks
Legitimate questions, some worded like attacks
- Score
- Rules
- Time
- Query hash
What the full system does next
A question the gateway lets through goes on to hybrid retrieval over the tenant's own documents, then to the LLM with the excerpts framed as untrusted data, and the answer is checked by the output sanitizer before it is returned. Two answers recorded from the full stack on 2026-11-05, over the policy documents of a fictional retailer. The documents are in Spanish; questions can be asked in English or Spanish, and are answered in the same language:
How many days do I have to return a mattress?
The customer can return a mattress within 15 days.
retrieved: garantias.md, politica-de-devoluciones.md
Do you deliver on Sundays?
No, deliveries are not made on Sundays.
retrieved: envios-y-entregas.md
To run all of it, observability included, see the quick start. How well the gateway does on 326 labelled questions: gateway evaluation.