---
- Official Project Title: TokenSlash: Multimodal Edge-AI Gateway & Autonomous Token-Optimization Engine
- Short Tagline: Cut AI token costs by up to 60%, eliminate prompt fluff with multimodal phone sensors, and autonomously route to the most cost-effective AI model with real-time execution.
- Category / Track: Developer Tools (Secondary: Open Innovation / Productivity)
- Target Platforms: iQOO Flagship Mobile Devices (Android), Desktop Workstations (Windows/macOS/Linux), Web Browsers, Cursor IDE, Claude Desktop, and MCP-compatible AI Clients.
- Target Audience: Software Developers, AI Engineers, Enterprise Dev Teams, Startups, and Prompt Engineers looking to optimize LLM cost, latency, and context-window efficiency.
---
As generative AI becomes deeply embedded into software engineering, customer support, and autonomous agents, organizations face three severe bottlenecks:
-
Massive Token Inflation & Conversational Fluff:
- Prompts entered via natural conversation, voice dictation, or raw error logs contain 40% to 60% redundant tokens (e.g., pleasantries, filler words, repetitive context, boilerplate logs, and UI noise).
- In multimodal inputs (e.g., screenshots of code, whiteboard diagrams, terminal dumps), passing raw base64 images to vision models consumes 1,500 to 3,000+ tokens per query, resulting in exponential API billing for information that could be represented in 150 structured tokens.
-
Sub-Optimal Model Over-Provisioning:
- Developers frequently send low-complexity tasks (regex generation, JSON parsing, basic syntax conversion, unit test scaffolds) to expensive flagship frontier models (e.g., Claude 3.5 Sonnet, GPT-4o) costing $15β$30 per million tokens.
- Without real-time automated complexity analysis, teams lack dynamic routing to use lightweight models (Gemini 1.5 Flash, GPT-4o mini) or local edge models ($0.00 cost) for simpler tasks.
-
Friction Between Mobile Capture and Desktop Development:
- Real-world development issues frequently originate outside the desktop editorβon physical whiteboards, external test screens, or through verbal team brainstorming.
- Developers must manually type out or re-format errors on their desktop machines, breaking flow state and introducing transcription overhead.
---
TokenSlash is a phone-first, multimodal AI middleware and Model Context Protocol (MCP) gateway that intercepts, analyzes, cleans, compresses, and routes developer queries to the optimal AI model before execution.
TokenSlash transforms raw multimodal inputs (camera snapshots and voice dictation on the iQOO phone) into zero-fluff, high-density structured prompts, evaluates complexity using a 77-feature syntactic classifier, predicts performance trade-offs across AI models using a 4-model Machine Learning ensemble (PromptIQ), and autonomously executes the request across connected AI providers (OpenAI, Anthropic, Google Gemini, DeepSeek, Perplexity, or Local SLMs).
The final response and optimized code artifacts are streamed live to the iQOO mobile interface and instantly synchronized to desktop developer environments (Cursor / VS Code) via the iQOO Office Kit Cross-Device Bridge.
---
- What it does: Uses the iQOO Camera to capture terminal stack traces, monitor bugs, and whiteboard architecture diagrams.
- The USP: Rather than transmitting heavy raw images to expensive cloud vision models (costing thousands of tokens), an on-device OCR and AST filtering parser extracts only the actionable error traces and code structures, compressing the input into a 120-token structured prompt (up to 90% token reduction).
- What it does: Captures spontaneous developer thoughts and voice dictation via the iQOO microphone.
- The USP: Uses the Web Speech API / audio streaming combined with syntactic filtering algorithms to strip conversational stutter, hesitation, and filler words, structuring the spoken request into high-compliance XML tags (
<context>,<instructions>,<output\_format>).
-
What it does: A machine learning intelligence core that evaluates prompt complexity against a unified dataset of model capabilities and live pricing.
-
The Ensemble:
- Model 1 (Satisfaction Predictor): Predicts user satisfaction per candidate model.
- Model 2 (Retry Risk Estimator): Estimates the probability that a model fails or requires a follow-up retry.
- Model 3 (Latency Forecaster): Predicts end-to-end token generation time.
- Model 4 (Pareto Utility Optimizer): Solves the cost-vs-quality trade-off curve to select the optimal model.
- What it does: For tasks with a Complexity Score < 25/100 (e.g., regex, SQL formatting, git commands, JSON fixes), TokenSlash routes execution to a Local/Edge Small Language Model (e.g., Llama-3.2, Gemma-2B, or local Ollama).
- The USP: Delivers 0ms network latency, 100% offline privacy, and βΉ0 / $0 token cost.
- What it does: Not only recommends the best model, but directly dispatches the prompt to the winning provider (OpenAI GPT-4o / 4o-mini, Anthropic Claude 3.5 Sonnet, Google Gemini 1.5 Flash/Pro, DeepSeek V3, Perplexity Sonar) and streams the live answer directly on the phone.
- What it does: Seamlessly connects the mobile experience with the desktop editor.
- The USP: Prompts optimized on the iQOO phone during mobile brainstorming or "Red Light" phases are beamed via Office Kit Shared Clipboard and File Sync directly into the desktop IDE (Cursor, VS Code, Terminal) with a single tap.
- What it does: Live analytics displaying token reduction rates (40β60%), monetary savings (βΉ / $), latency SLA improvements, and estimated carbon emissions (COβ grams) saved per session.
---
| Component | Technologies & Libraries | Purpose |
|---|---|---|
| Backend Framework | Node.js, TypeScript, Express | Core API server & pipeline orchestration |
| Protocol Engine | NitroStack SDK (@nitrostack/mcp-core), Model Context Protocol (MCP) |
JSON-RPC 2.0 & SSE MCP tool interfaces |
| Token Estimation | js-tiktoken (cl100k\_base BPE tokenizer) |
Sub-millisecond exact BPE token calculation |
| Machine Learning Core | Python 3.11+, Scikit-learn, Pandas, NumPy, Parquet | PromptIQ 4-Model Ensemble training & inference |
| Datasets & Benchmarks | Unified TokenSlash Dataset, LMSYS Chatbot Arena, HuggingFace data | Training satisfaction, latency, and retry models |
| Frontend Dashboard | React 18, Vite, Tailwind CSS, Lucide Icons | Responsive web UI, live diff viewer, analytics |
| Testing & Quality | Vitest, TypeScript compiler, custom PowerShell e2e test suites | Automated unit testing & regression suites |
| Component | Technologies & Integration | Purpose |
|---|---|---|
| Mobile Hardware Ingestion | HTML5 MediaDevices / Camera API, Web Speech API (webkitSpeechRecognition) |
On-device camera and microphone capture |
| Cross-Device Bridge | iQOO Office Kit (Shared Clipboard Protocol, File Sync, Screen Mirroring) | Seamless Phone-to-Desktop data transfer |
| Multi-Provider AI Gateway | OpenAI API SDK, Anthropic SDK, Google GenAI SDK, OpenRouter / DeepSeek API | Direct multi-model prompt dispatch & streaming |
| Edge / Local AI | Ollama, Llama-3.2-1B, Gemma-2B / ONNX Runtime Web | Tier-0 local prompt execution ($0 cost / 0ms) |
---
The Model Context Protocol (MCP) is an open industry standard that connects AI assistants to external tools, data sources, and services.
-
Zero-Code Client Integration: Any MCP-compatible tool (Cursor IDE, Claude Desktop, NitroChat, or custom LLM agents) can natively discover and call TokenSlash tools without needing custom API integration.
-
Standardized Tool Exposure: Exposes 7 modular tools:
analyze\_prompt: Complete end-to-end token, complexity, and model analysis.rewrite\_prompt: Algorithmic fluff removal and XML structure refactoring.recommend\_model: ML ensemble inference for optimal model selection.estimate\_tokens: Exact BPE token metrics.classify\_complexity: 77-feature syntactic complexity scoring.synthesize\_report: Executive-level ROI and monthly volume cost projections.analyze\_history: Multi-session developer profiling for domain customization.
-
Multi-Transport Flexibility: Supports both Server-Sent Events (
/sse) for real-time streaming and Streamable HTTP (/mcp) for high-throughput cloud requests.
---
User Input (Voice/Camera/Text)
βββΆ TokenSlash Ingestion \& Fluff Stripper
βββΆ 77-Feature Complexity Evaluation
βββΆ PromptIQ ML Decision (Optimal Model Selected)
βββΆ Dynamic Multi-Provider Dispatch Layer
βββ Option 1: Local SLM (Ollama / ONNX) \[Complexity < 25]
βββ Option 2: Google Gemini API (gemini-1.5-flash)
βββ Option 3: Anthropic API (claude-3-5-sonnet)
βββ Option 4: OpenAI API (gpt-4o / gpt-4o-mini)
βββ Option 5: DeepSeek API (deepseek-chat)
βββ Option 6: Perplexity API (sonar-pro)
βββΆ Live Stream Response to iQOO Phone
βββΆ Auto-Beam via Office Kit to Laptop Cursor / VS Code
- User Authentication & Permission: The user enables "Auto-Execute Best Model" and provides provider API keys (or uses an integrated unified gateway like OpenRouter / NitroCloud proxy).
- Autonomous Model Selection: The PromptIQ ML ensemble evaluates the prompt's structural needs. If the query requires deep multi-step coding, it chooses Claude 3.5 Sonnet or DeepSeek V3; if it is a general knowledge question, it selects Gemini 1.5 Flash; if it is a simple syntax fix, it routes to Local SLM.
- Execution & Streaming: The backend dispatches the optimized XML prompt directly to the selected provider's API over SSE.
- Output Rendering: The token-slashed response is rendered in real time on the iQOO phone and instantly synced to the laptop clipboard via Office Kit.
---
flowchart TD
%% LAYER 1: CLIENT \& INGESTION
subgraph L1\["π± LAYER 1: HARDWARE \& CLIENT INGESTION (iQOO Phone)"]
A1\["πΈ Snap-to-Slash (Camera / OCR)\\nTerminal Errors \& Whiteboards"]
A2\["ποΈ Voice-to-DSL (Microphone)\\nSpoken Speech-to-Text Input"]
A3\["π» Web \& Mobile Dashboard (React / Vite)\\nInteractive Input \& Telemetry HUD"]
A4\["π External MCP Clients\\nCursor IDE / Claude Desktop / NitroChat"]
end
%% LAYER 2: OFFICE KIT BRIDGE
subgraph L2\["β‘ LAYER 2: iQOO OFFICE KIT CROSS-DEVICE BRIDGE"]
B1\["π Shared Clipboard Sync"]
B2\["π File \& AST Transfer"]
B3\["π₯οΈ Screen Mirroring \& Dev-Warp\\n(Phone β Laptop IDE / Terminal)"]
end
%% LAYER 3: OPTIMIZATION PIPELINE
subgraph L3\["βοΈ LAYER 3: PRE-PROCESSING \& OPTIMIZATION PIPELINE"]
C1\["π BPE Token Estimator\\n(js-tiktoken cl100k\_base)"]
C2\["π 77-Feature Syntactic Classifier\\n(AST depth, vocabulary, code markers)"]
C3\["π§Ή Zero-Fluff Stripper\\n(Removes pleasantries, stutter, noise)"]
C4\["π·οΈ XML Prompt Reformulator\\n(<context>, <instructions>, <output\_format>)"]
end
%% LAYER 4: PROMPTIQ ML ENSEMBLE
subgraph L4\["π§ LAYER 4: PROMPTIQ ML ROUTING ENSEMBLE"]
D1\["Model 1: Satisfaction Predictor (pkl)"]
D2\["Model 2: Retry Risk Estimator (pkl)"]
D3\["Model 3: Latency Forecaster (pkl)"]
D4\["Model 4: Cost \& Pareto Utility Optimizer"]
end
%% LAYER 5: EXECUTION GATEWAY
subgraph L5\["π€ LAYER 5: MULTI-PROVIDER EXECUTION GATEWAY"]
E1\["π¦ Tier 0: Local / Edge SLM (Llama-3.2 / Gemma / ONNX)\\n\[Score < 25 | $0.00 Cost | 0ms Network]"]
E2\["β‘ Tier 1: Fast \& Cost-Efficient\\n(Google Gemini 1.5 Flash / GPT-4o mini)"]
E3\["π§ Tier 2: Deep Reasoning \& Coding\\n(Anthropic Claude 3.5 Sonnet / DeepSeek V3)"]
E4\["π Tier 3: Search-Augmented\\n(Perplexity / Sonar)"]
end
%% LAYER 6: TELEMETRY \& MCP PROTOCOL
subgraph L6\["π LAYER 6: TELEMETRY, AUDIT \& MCP PROTOCOL"]
F1\["π MCP Server (JSON-RPC 2.0 / SSE / Streamable HTTP)"]
F2\["π Green-AI \& Carbon/Cost Telemetry HUD"]
F3\["π Audit Trace \& Session Profiler"]
end
%% Flow Connections
A1 \& A2 \& A3 --> L3
A4 --> F1
F1 --> L3
L3 --> L4
L4 --> L5
L5 --> F2 \& F3
F2 \& F3 --> A3
L5 -->|Live Response \& Snippets| L2
L2 -->|Auto-Paste / Insert| A4
---
-
Capture & Ingestion:
- The developer snaps an error screenshot using Snap-to-Slash on the iQOO phone or speaks a feature requirement using Voice-to-DSL.
-
Syntactic De-noising & Fluff Removal:
- TokenSlash strips conversational fluff, pleasantries, terminal timestamps, and UI boilerplate.
-
Token Estimation & Complexity Classification:
js-tiktokencomputes original vs. projected BPE token count.- The 77-feature syntactic analyzer calculates a complexity score (0β100).
-
Prompt Restructuring:
- Input is refactored into structured XML tags (
<context>,<instructions>,<output\_format>).
- Input is refactored into structured XML tags (
-
PromptIQ ML Ensemble Inference:
- The ML ensemble predicts satisfaction score, retry risk, and latency across available models.
- The Pareto optimizer selects the winning model based on required accuracy vs. minimal cost.
-
Execution & Direct Output:
- If complexity < 25: Executed on Local Edge SLM ($0 cost).
- If complexity β₯ 25: Executed via selected Cloud API (Gemini / Claude / GPT / DeepSeek).
-
Telemetry & Cross-Device Sync:
- Live response streams to the phone HUD showing tokens saved, cost reduced, and carbon prevented.
- Office Kit beams the response/code snippet straight to the desktop IDE.
---
- 40% to 60% Token Reduction: Saves thousands of dollars per month for startups and enterprises running automated AI agent workflows.
- Over-Provisioning Elimination: Replaces unnecessary $20/M token frontier model calls with $0.15/M token flash models or $0.00 local models for routine queries.
- Up to 2.5x Faster Turnaround: Lighter models and compressed prompts significantly reduce Time-to-First-Token (TTFT) and total generation time.
- Preserved Context Windows: Keeps prompt payloads lean, allowing more history and context to fit inside multi-turn agent conversations without hitting context limits.
- Decreasing unnecessary compute cycles across massive cloud data centers directly cuts electrical kilowatt-hours and reduces the carbon footprint per prompt.
- Seamlessly bridges real-world visual/audio brainstorming on the iQOO phone with active coding on the desktop workstation using Office Kit.
---
-
π¨βπ» Member 1 (AI & ML Pipeline):
- PromptIQ ML ensemble inference, complexity classifier feature extractor, Local SLM / Ollama routing, and provider API connectors.
-
π¨βπ» Member 2 (Frontend & Mobile Experience):
- React mobile dashboard, HTML5 Camera "Snap-to-Slash" OCR integration, Web Speech API "Voice-to-DSL", and Green-AI telemetry widgets.
-
π¨βπ» Member 3 (Architecture, Office Kit & Demo Pitch):
- Office Kit cross-device clipboard/file synchronization, MCP server integration into Cursor IDE, live demo script, and 3-minute jury presentation.
---
- 0:00 β 0:30 (The Hook & Problem):
*"Every day, developers waste 50% of their AI token budgets on conversational fluff, bloated code screenshots, and sending simple tasks to expensive models. We built TokenSlash to fix this."*
- 0:30 β 1:30 (Live Hardware Demo on iQOO Phone):
*"Watch this live: I snap a photo of a broken stack trace on my iQOO phone with Snap-to-Slash. TokenSlash strips 85% of the visual log noise, calculates BPE tokens, and classifies complexity."*
- 1:30 β 2:15 (ML Routing & Live Output):
*"Our PromptIQ ML Ensemble selects the fastest, cheapest model, executes the request autonomously, and streams the live code fix right here."*
- 2:15 β 2:45 (Office Kit Magic):
*"With 1 tap via Office Kit, the fix is beamed straight into my desktop Cursor editor without touching the keyboard."*
- 2:45 β 3:00 (Impact & Closing):
*"45% fewer tokens, 60% lower cost, βΉ0 local fallback, and cross-device speed. TokenSlash is the intelligent gateway for the next generation of AI development."*