How osmanuygar/telveguard works
Telveguard is an on-premises security gateway for enterprise LLM use. Its primary workflow accepts compatible model requests, identifies the caller and destination, scans content and attachments, applies policy, then blocks, masks, or forwards the request; it protects the response before returning it. Audit and administration capabilities provide visibility and compliance reporting. The graph also includes the documented browser, coding-agent, and MCP integrations. Some gateway internals and extension wiring were not excerpted, so their undocumented links are omitted.
Main entry points: main.py LLM proxy · engine.py PII and secret scan · audit.py Audit events · xray.py AI usage X-ray
Components 31
Gateway protection
- LLM proxy
gateway/app/main.py - API formats
gateway/app/formats.py - Identity checks
gateway/app/auth.py - Attachment scanning
gateway/app/attachments.py - Model providers
gateway/app/providers.py
Detection and policy
- PII and secret scan
packages/telveguard-core/telveguard_core/pii/engine.py - Turkish recognizers
packages/telveguard-core/telveguard_core/pii/tr_recognizers.py - Injection detection
packages/telveguard-core/telveguard_core/detectors/injection.py - Organization dictionary
gateway/app/dictionary.py - Policy engine
packages/telveguard-core/telveguard_core/policy.py
Audit and compliance
- Audit events
gateway/app/audit.py - ClickHouse
- AI usage X-ray
gateway/app/xray.py - Compliance reports
gateway/app/compliance.py - POC reports
gateway/app/poc_report.py - Data subject requests
gateway/app/subjects.py
User integrations
- Shadow AI extension
extension/src/content.js - Browser detectors
extension/src/detectors.js - Coding-agent hooks
packages/telveguard-agent/telveguard_agent/hooks.py - Gateway client
packages/telveguard-agent/telveguard_agent/client.py - ContextForge plugin
packages/telveguard-contextforge/telveguard_contextforge/plugin.py
Operations
- Prometheus metrics
gateway/app/metrics.py - Usage quotas
gateway/app/quota.py - Notifications
gateway/app/notify.py
Other components
- LLM client
- Upstream model
- User browser
- Developer
- MCP host
- Administrator
- Slack / Teams / SIEM
Connections 32
- LLM client → LLM proxy: sends request
README.md - LLM proxy → API formats: parses formats
gateway/app/main.py - LLM proxy → Identity checks: checks identity
README.md - LLM proxy → Attachment scanning: scans attachments
gateway/app/main.py - LLM proxy → PII and secret scan: scans content
README.md - PII and secret scan → Turkish recognizers: uses recognizers
packages/telveguard-core/telveguard_core/pii/engine.py - LLM proxy → Injection detection: checks injection
README.md - LLM proxy → Organization dictionary: checks terms
gateway/app/main.py - LLM proxy → Policy engine: evaluates policy
README.md - LLM proxy → Model providers: selects provider
README.md - LLM proxy → Upstream model: forwards request
README.md - Upstream model → LLM proxy: returns response
README.md - LLM proxy → LLM client: returns protected response
README.md - LLM proxy → Audit events: records event
gateway/app/main.py - Audit events → ClickHouse: writes events
README.md - Administrator → LLM proxy: requests administration
gateway/app/main.py - LLM proxy → AI usage X-ray: serves usage data
gateway/app/main.py - AI usage X-ray → ClickHouse: queries events
gateway/app/xray.py - LLM proxy → Compliance reports: serves compliance reports
gateway/app/main.py - LLM proxy → POC reports: serves POC report
gateway/app/main.py - LLM proxy → Data subject requests: serves subject lookup
README.md - LLM proxy → Prometheus metrics: exposes metrics
gateway/app/main.py - LLM proxy → Usage quotas: enforces quotas
gateway/app/main.py - LLM proxy → Notifications: triggers alerts
gateway/app/main.py - Notifications → Slack / Teams / SIEM: sends alerts
README.md - User browser → Shadow AI extension: pastes content
README.md - Shadow AI extension → Browser detectors: checks content
- Developer → Coding-agent hooks: uses coding assistant
README.md - Coding-agent hooks → Gateway client: requests verdict
packages/telveguard-agent/telveguard_agent/hooks.py - Gateway client → LLM proxy: checks event
README.md - MCP host → ContextForge plugin: dispatches tools
README.md - ContextForge plugin → LLM proxy: uses gateway protection