
NanoRouter is a high-performance, token-optimized AI agent designed specifically to dominate the AMD Hackathon Track 1 leaderboard. Built under strict hardware constraints (4GB RAM, 2 vCPUs), it pioneers a "Local-First Escalation" architecture to minimize API token waste while maximizing accuracy. Instead of blindly sending every task to a paid API, NanoRouter dynamically evaluates each prompt. It utilizes a highly quantized local model (Qwen3.5-0.8B-GGUF running on llama.cpp) to execute zero-cost tasks like Named Entity Recognition, Sentiment Analysis, and Summarization. For tasks like Math or Logic puzzles, the agent attempts local resolution first. If the local model struggles, it seamlessly escalates the task to the Fireworks API. Key Innovations: 1. Structural Logic Routing: Instead of relying on brittle keyword matching, the router analyzes grammatical structures (e.g., relational constraint clusters) to intelligently classify logic puzzles and determine if they require API escalation. 2. Anti-Yap Prompting: We engineered strict "sledgehammer" prompt injections that strip away LLM conversational bloat, slashing output tokens by over 80% on API calls for code debugging and logic. 3. AMD-Optimized Execution: Fully containerized for linux/amd64, leveraging llama.cpp to keep the 0.8B model footprint under 600MB of RAM. This avoids out-of-memory crashes while ensuring lightning-fast inference times well under the 30-second limit. NanoRouter proves that massive parameters aren't necessary for top-tier agentic routing—smart architecture is.
13 Jul 2026