Skip to content

LLM Governance Engine v1.0.0

Choose a tag to compare

@sochaty sochaty released this 19 Jun 01:33
· 1 commit to main since this release
5cdee87

Quick start

tar -xzf llm-governance-engine-v1.0.0.tar.gz
cp .env.example .env          # fill in your API keys
bash start.sh
Service URL
Dashboard http://localhost:4200
API docs http://localhost:8000/docs

Docker images are published to GHCR:

  • ghcr.io/sochaty/llm-governance-engine/backend:v1.0.0
  • ghcr.io/sochaty/llm-governance-engine/frontend:v1.0.0

LLM Governance Engine v1.0.0

The first open-source PII firewall and policy engine for LLMs — self-hosted, one command.

Most LLM tools tell you what happened after the fact. This one stops the request before it reaches the model.


What's in this release

🔒 PII Firewall

Prompts are scanned by Microsoft Presidio before they leave your infrastructure. Names, emails, credit card numbers, SSNs, phone numbers — detected and blocked (or audited) at configurable confidence thresholds. Your data never reaches OpenAI unless you explicitly allow it.

📋 YAML Policy Engine

Write governance rules as code, not dashboards. Drop a YAML file, hit /api/v1/policies/reload, rules are live — no restart required.

rules:
  - id: pii-cloud-block
    condition: pii_detected
    threshold: 0.7
    models: [cloud, gpt-4o]
    action: block
    severity: critical

  - id: budget-circuit-breaker
    condition: cost_exceeds
    threshold: 0.05
    action: warn
    severity: medium

Four conditions: pii_detected, safety_score_below, cost_exceeds, model_is.
Three actions: block (returns 403), warn (audited, passes through), alert (fires webhook).
Starter templates included: policies/default.yaml, policies/gdpr.yaml, policies/hipaa.yaml.

⚡ Cloud vs Local Benchmark

Side-by-side streaming comparison — GPT-4o vs your local Llama model (via Ollama). Latency, cost per request, and a 10-dimension governance radar chart on every run. When GPT-4o charges $0.03 for a task Llama handles at $0.00, that number is in your audit log.

🗄️ Audit Vault

Every inference — prompt preview, provider, PII flag, safety score, latency, estimated cost — stored in PostgreSQL. Filterable, paginated, exportable to PDF. Answering a compliance audit is a query, not a fire drill.

🔀 Multi-Provider Routing

Route to OpenAI, Groq, Google Gemini, Anthropic, or any Ollama model from a single UI. API keys managed through the Settings UI — encrypted at rest with Fernet, no restarts needed when you rotate keys.

🔔 Webhook Alerts

Policy violations fire CloudEvents-compatible HTTP POST payloads to Slack, Microsoft Teams, or PagerDuty. Configurable per rule. 3-attempt exponential backoff.


Quick start

# Download and extract the release bundle
tar -xzf llm-governance-engine-v1.0.0.tar.gz

# Configure your environment
cp .env.example .env
# Add OPENAI_API_KEY (or any cloud provider key)
# OLLAMA_BASE_URL defaults to http://localhost:11434/v1

# Start everything
bash start.sh
Service URL
Dashboard http://localhost:4200
API docs (Swagger) http://localhost:8000/docs

No build step required — Docker images are pulled directly from GHCR.

Pull a local model (optional):

curl -X POST http://localhost:11434/api/pull -d '{"name":"llama3.2:latest"}'

Stack

Layer Technology
Backend FastAPI · SQLAlchemy async · PostgreSQL · Presidio
Frontend Angular 21 · Chart.js · Server-Sent Events
Inference OpenAI · Groq · Google Gemini · Anthropic · Ollama
Infrastructure Docker Compose · GHCR · GitHub Actions CI
Tests pytest · 91% backend coverage · Playwright e2e

What's next

  • v1.1 — RAGAS hallucination scoring on every request (local Ollama as free judge) Shipped — see RELEASE_NOTES_v1.1.0.md. Opt-in via a context field rather than every request, and judged by OpenAI rather than local Ollama — see that file's "Known limitation" section for why.
  • v1.2 — FinOps dashboard: daily cost trends, Z-score anomaly detection, budget circuit breakers
  • v2.0 — Multi-tenant workspaces with JWT + RBAC

Reproduce this release

git clone https://github.com/sochaty/llm-governance-engine
git checkout governance-post-1
docker compose up

Feedback and PRs welcome — open an issue or start a Discussion.