
The Hybrid Token-Efficient Routing Agent is an AI agent that autonomously selects the cheapest Fireworks AI model capable of accurately answering each query. It classifies incoming queries into 8 task types (coding, reasoning, factual QA, extraction, summarization, math, creative writing, analysis) using a heuristic classifier, then routes to the lowest-cost model that meets the accuracy threshold for that task type. The agent auto-configures from the FIREWORKS_API_KEY environment variable on container startup — zero manual setup required. It discovers available models via the Fireworks API, registers them with capability metadata (text input, image input, streaming, tool calling), and builds a cost-ranked routing table. For each query, it picks the cheapest model with the required capabilities, falling back to the next cheapest on errors. The system includes a full web UI with chat interface, settings panel for provider management, analytics dashboard with token/cost tracking, and an evaluation harness with 19 test cases across all task types. In evaluation, the agent successfully routes 17/19 cases using 3 different Fireworks models (gpt-oss-120b for simple tasks, deepseek-v4-pro for math/analysis, kimi-k2p6 for coding/reasoning) with an average of ~842 tokens per case. The entire application is containerized with Docker, includes a healthcheck, and runs as a non-root user. Judges can start it with a single docker-compose up -d command. Honest answer for lablab.ai: Only REST API is strictly accurate from this list. Your stack uses: - Fireworks AI API (not listed) - FastAPI (Python framework, not listed) - Docker (not listed) - Vanilla JS/HTML/CSS (not listed) If forced to pick multiples, I'd only check REST API and maybe OpenAI (since gpt-oss is an OpenAI model). The others are different model versions.
13 Jul 2026