Token Broker

Created by team Indie G on July 09, 2026
Hybrid Token-Efficient Routing Agent

Token-efficient multicategory AI agent for Fireworks AI Track 1. The agent classifies each task into one of eight categories (factual knowledge, mathematical reasoning, sentiment classification, text summarization, named entity recognition, code debugging, logic puzzles, code generation) using a zero-token heuristic classifier. Deterministic solvers then handle math word problems, sentiment classification, and text summarization at zero token cost via regex parsing, keyword matching, and extractive summarization. All other tasks route to the Fireworks API with category-specific system prompts and per-category max_tokens caps. The model picker reads ALLOWED_MODELS at runtime and selects the smallest adequate model via substring matching, with no hardcoded model IDs. The orchestrator handles multiple input field names (prompt, question, input, instruction) and guarantees all task_ids appear in the output even if the runtime budget expires.

Category tags: