This project is a token-efficient routing agent built for Track 1, modeled on how enterprises control AI spend: cheap local compute handles routine work, and premium API calls are reserved for tasks that genuinely need them. Incoming tasks are classified by a zero-cost router into eight capability categories. Each task then flows through a three-tier pipeline. Tier 0 uses deterministic solvers, including a safe arithmetic evaluator for math and constraint-based solving for logic puzzles, producing exact answers at zero token cost. Tier 1 runs a quantized Gemma model locally inside the container, handling factual questions, sentiment classification, summarization, and entity recognition without any external calls. Tier 2 escalates only the hardest tasks, primarily code debugging, code generation, and complex reasoning, to Fireworks AI models with temperature zero and tightly capped outputs. The result is an agent where most tasks never touch the metered API, keeping accuracy high while driving scored token usage toward zero. Built with Python and llama.cpp, packaged as a single lightweight Docker image.
Category tags: