Duplex is a highly advanced, zero-backend, client-side multiplexed LLM inference engine. It empowers developers, researchers, and prompt engineers to test, route, and benchmark multiple local and cloud-based artificial intelligence models simultaneously in real time.
Built with absolute privacy and maximum performance in mind, Duplex removes the middleman out of AI inference. By connecting your browser directly to the providers of your choice, it enables unprecedented side-by-side comparison capabilities with deep, hardware-level telemetry.
Duplex is designed as a developer-first, client-side LLM workspace that runs multiple models (local + cloud) simultaneously without intermediate server proxies or tracking nodes.
- Direct Channel Handshake: Direct, low-latency socket connections with the foundation model APIs (OpenAI, Anthropic, Gemini, Groq, etc.).
- Zero-Proxy Routing: Payload tokenization and streaming executed purely client-side, bypassing middleman processing layers.
- Dynamic Telemetry Trace: Live rendering HUD displaying tokens per second (TPS), Time To First Token (TTFT), dynamic context length tracker, and DOM frame update rates (16ms throttle).
- Hardware Acceleration (WebGPU/WASM): Direct client-side inference utilizing local hardware resources directly inside the browser sandbox.
- Sovereign Weights Loading: Run multi-billion parameter models (e.g., Llama 3 8B, Qwen, Phi) locally using INT4 quantization entirely on-device with absolute data privacy.
- Ollama & LM Studio Bindings: Plug-and-play handshakes with local LLM daemons to integrate self-hosted GGUF weights into comparative lanes.
- V2 Concurrency Engine: Test frontier cloud models alongside local hardware weights synchronously. Prompt multiple distinct models with a single click and watch their response streams populate side-by-side in real-time.
- Extensive Model Support: Out-of-the-box support for OpenAI, Anthropic, Google Gemini, Groq, Mistral, xAI (Grok), DeepSeek, OpenRouter, Together AI, Fireworks AI, Cohere, and local Ollama/LM Studio endpoints.
- Dynamic Layout Topologies: Switch instantly between highly optimized viewing modes including Side-by-Side, Grid, Tree, and Stacked layouts. Seamlessly manage multiplex lanes with custom horizontal scroll mechanics for fluid 4+ model comparisons.
- Absolute Privacy & Zero-Backend Architecture: Duplex operates entirely inside your browser environment. API keys are strictly used to communicate with the exact model providers or your local nodes. There are no middleware proxy logging mechanisms, trackers, or hidden servers. Your conversation data never leaves your machine unless explicitly sent to a model provider.
- Secure Hardware Configurations: Ultra-high contrast solid settings configuration panels. Credentials are visually masked with an integrated Show/Hide Key visibility toggle, preventing layout shifts or cursor overlap bugs.
- Internal Scroll Lexicon: A high-density 3x2 unit frame grid in the Local Lexicon directory. Showcases up to 6 articles per screen bound within a custom scrollable viewport container, preserving page dimensions while enabling fluid, touch-optimized swipe exploration.
- Decoupled WebRTC Sync: Featuring a "Duplex Decoupled Engine" utilizing PeerJS for true peer-to-peer real-time synchronization. Share your active state securely across devices via a unique Sync ID without any centralized database.
- Offline State Persistence: Enjoy continuous session data preservation decoupled from traditional backend network databases. Your chat history, workspaces, and telemetry logs stay entirely on your device via IndexedDB.
To satisfy both power users and builders, Duplex integrates low-level engineering metrics inside a high-fidelity cybernetic UI via the Deep Telemetry Console.
- Granular Performance Vitals: Empirically benchmark network layers by tracking Time To First Token (TTFT), Tokens Per Second (TPS), and total network latency alongside response generation.
- Hardware & Environment Monitoring (H-Plane): Duplex implements hardware monitoring layers detecting memory heap utilization, V-Sync rendering thread jitters, active node counts, and host location resolving to ensure your browser handles high-frequency streams gracefully.
- Diagnostic Tracing: Emits raw multi-layer telemetry summaries detailing handshake configurations, DOM render chunks, and thread lags meant for debugging cross-origin connectivity.
- Adaptive Viewport Scaling: Overcomes physical limitations on smaller devices through synchronized flex snap-scrolling, making massive multi-model comparisons fluid and stutter-free.
Since Duplex operates almost entirely on the client side, connecting to a locally hosted LLM requires bypassing basic CORS (Cross-Origin Resource Sharing) blockades on your OS daemon.
To allow Duplex to stream from your localhost:11434, you must start Ollama with the allowed origins parameter setup.
macOS:
launchctl setenv OLLAMA_ORIGINS "*" && ollama serveWindows:
setx OLLAMA_ORIGINS "*" && ollama serveLinux:
OLLAMA_ORIGINS="*" ollama serveOnce running, simply add your custom http://127.0.0.1:11434 or network endpoint directly into the Duplex settings panel. Duplex automatically tests the handshake and populates your installed local GGUF models.
- AI Researchers & Prompt Engineers: Optimize your prompts against the top frontier models to objectively find the best outputs, format adherence, and lowest hallucination rates.
- Cost / Speed Optimization: Compare the exact Token-Per-Second output and TTFT latency of your self-hosted instance (e.g., Llama-3 8B) vs. Cloud equivalents (e.g., GPT-4o-mini).
- Offline / Edge Workers: Need to work with highly confidential data or completely offline? Run entirely offline combining Duplex and Ollama/LM Studio without any internet connectivity.
- Collaborative Debugging: Utilize the P2P WebRTC synchronization to securely share a diagnostic session with another developer without exposing API keys.
- Core Framework: React 18+ and TypeScript, utilizing a highly optimized Vite single-page application structure.
- Styling Engine: Cybernetic, dark-mode-first developer aesthetic managed primarily via Tailwind CSS and
lucide-reacticons, utilizing complex animations and backdrop filters. - Performance Integrations: Real-time DOM reconciliation tuning to handle high-frequency byte streams securely. Dedicated Web Workers for streaming tasks to keep the main thread unblocked.
- Networking: Native
fetchwith AbortControllers for stream management, andpeerjsfor P2P connection handling.
This project is open-source and free to use under the terms of the GNU Affero General Public License (AGPLv3). It represents a decentralized alternative to traditional cloud-proxied wrappers, preserving absolute workspace privacy.
⚠️ Important Note: This project is open-source and free to use but redistribution and or claiming it as your intellectual property is imminently discouraged, attribution is appreciated.
- Developer: Gurutva Murdia