01

AEGIS - LLM security firewall & enforcement proxy

A bidirectional enforcement gateway that inspects prompts on the way in and model output on the way out - because keyword filters do not stop prompt injection.

FastAPIPostgreSQL + AlembicReact + WebSocketsSolo build
The system

A multi-stage scanner pipeline - Unicode analysis, YARA rules, regex, then ML classifiers via LLM Guard - scores every prompt and every response before it moves on. A YAML policy engine decides block, redact or allow.

My role

Everything: the FastAPI proxy, async SQLAlchemy 2.x persistence and migrations, the scanner pipeline, canary-token leak detection, the policy engine, and the operator console.

How it is measured

An offline eval suite scores the pipeline against labelled attack and benign datasets, reporting precision, recall, F1, FPR and FNR - so a policy change is a number, not a hunch.

Bidirectional inspection - inbound prompts and outbound responsesStores only 80-byte excerpts + SHA hashes, never raw payloads
Request path
Client appAEGIS proxyModel providerOutbound scan + canary checkClient app
Scanner stages
Unicode analysisYARA rulesRegex / PIILLM Guard classifiersYAML policy decision
Every decision
async PostgresWebSocket ops console
Repository