Skip to content
SoroushRFPublic

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

🔭 Vantage v2.0.0

High-Performance AI Governance, Observability & Proxy Gateway

Go Version React License Uptime

Vantage is an intelligent, high-performance reverse proxy designed to sit between your internal applications and AI providers (like Cohere). It delivers "Net-Zero" latency observability, real-time safety governance, and a premium administrative dashboard to manage your AI infrastructure at scale.


📌 Table of Contents

  1. Overview
  2. Key Features
  3. Architecture Deep Dive
  4. The Governance Layer
  5. The Customer Admin Panel
  6. Getting Started
  7. Technical Benchmarks
  8. Roadmap

🌟 Overview

In the modern enterprise, AI adoption often outpaces governance. Vantage solves this by acting as a Security & Observability buffer. It ensures that every single LLM interaction is:

  • Audited: Logged with token counts and cost attribution.
  • Sanitized: Scrubbed of PII (Personally Identifiable Information).
  • Governed: Checked against internal security policies and blocked if malicious.
  • Visualized: Presented in a "single pane of glass" for administrators.

🚀 Key Features

🛡️ Active Firewall (Governance)

  • PII Redaction: Real-time identification and masking of Emails, Phone Numbers, and UUIDs using high-speed optimized regex.
  • Keyword Rule Engine: Instant 403 Forbidden response for prompts containing proprietary secrets, internal DB keys, or forbidden terms.
  • Tenant Attribution: Every request is tagged via X-User-ID, allowing for granular cost tracking and usage limits.

📊 Transparent Observability

  • Token Analytics: Automatic extraction and logging of input/output tokens for accurate billing.
  • Safety Classifier: Every prompt is asynchronously classified for toxicity and intent using few-shot classification.
  • Prometheus Integration: Native /metrics endpoint for Grafana/Prometheus monitoring.

⚡ Performance First

  • Non-Blocking Pipe: Observability tasks are offloaded to background goroutines via buffered channels, keeping request latency overhead under 15ms.
  • Connection Optimization: Maintains warm TCP/TLS pools to AI providers to accelerate subsequent calls.

🏗️ Architecture Deep Dive

Vantage is built on a modular "Interceptor" pattern.

User Request → [Vantage Gateway]
                  ↓
          [Audit Middleware]  → (Asynchronous Pipe) → [Audit Worker] → [SQLite / Prometheus]
                  ↓                                       ↓
        [Governance Engine]   ← (Regex Sanitizer + Keyword Blocker)
                  ↓
          [Reverse Proxy]     → (Connection Pooling) → [AI Provider (Cohere)]

The Worker Pattern

Unlike traditional proxies that block requests to perform logging, Vantage uses a Producer-Consumer model. The middleware produces an Interaction event and drops it into a channel. The Audit Worker consumes this on a separate thread, performing heavy tasks like database I/O and safety classification without impacting the user's response time.


🛡️ The Governance Layer

Configure your security policies in config.yaml:

forbidden_keywords:
  - "internal_db"
  - "proprietary_algorithm"
  - "secret_key"
  - "admin_password"

When a violation occurs, the user receives a standardized security response:

{
  "error": "Security Policy Violation",
  "code": "FORBIDDEN_CONTENT"
}

🎨 The Customer Admin Panel

Vantage includes a premium, glassmorphic dashboard built with React, Tailwind, and Recharts.

  • KPI Matrix: Real-time stats on Tokens, Blocks, and Safety Index.
  • Usage Bar Charts: Visualize which User IDs are consuming the most resources.
  • Live Audit Vault: Deep-dive into every transaction, with dedicated flags for Redacted vs. Blocked traffic.
  • AI Playground: Integrated terminal to test prompts against your governance rules.

🛠️ Getting Started

Prerequisites

  • Go 1.22+
  • Node.js & npm (for the Dashboard)
  • A Cohere API Key

Installation

  1. Clone the repository

    git clone https://github.com/SoroushRF/Vantage.git
    cd Vantage
  2. Configure Environment Create a .env file:

    COHERE_API_KEY=your_key_here
    PORT=8080
    DATABASE_URL=./audit.db
  3. Run the Gateway (Go)

    go run cmd/server/main.go
  4. Run the Dashboard (React)

    cd ui
    npm install
    npm run dev

📈 Technical Benchmarks

Metric Direct Call (Cohere) Vantage Proxied Overhead
P99 Latency 650ms 662ms +12ms
Throughput 100 req/s 98 req/s < 2%
Mem Usage - ~22MB Minimal

Benchmarks conducted on local loopback to isolate network jitter.


🗺️ Roadmap

  • v1.0.0: Core Reverse Proxy & Async Logging
  • v2.0.0: Governance Firewall & React Admin Panel
  • v2.1.0: Multi-Model Support (OpenAI, Anthropic)
  • v2.2.0: Granular Rate Limiting per User ID
  • v3.0.0: Distributed Cluster Support (Redis Backed)

"Vantage: Because what you don't see, hurts your bottom line."

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages