Hybrid Token-Efficient Routing Agent. (Track 1)

Created by team The coders on July 06, 2026
Hybrid Token-Efficient Routing Agent

This project is a two-tier token-efficient routing agent built for AMD Developer Hackathon ACT II Track 1. The agent reads tasks from a standardized input file and autonomously decides whether to process each task locally for free or send it to the Fireworks AI API. The routing logic is built around a keyword-based classifier that detects task categories across all eight evaluation domains: factual knowledge, mathematical reasoning, sentiment classification, text summarisation, named entity recognition, code debugging, logical reasoning, and code generation. Simple tasks such as factual questions, sentiment classification, and named entity recognition are routed to a local Ollama model (qwen3:1.7b) running on the host machine at zero token cost. Complex tasks requiring higher accuracy — including math, code debugging, code generation, summarization, and logical reasoning — are routed to the Fireworks AI API using the most appropriate allowed model, with code tasks preferring kimi-k2p7-code for best results. The agent is fully containerized using Docker and reads environment variables injected by the judging harness at runtime: FIREWORKS_API_KEY, FIREWORKS_BASE_URL, and ALLOWED_MODELS. No API keys are hardcoded or bundled in the image. Results are written to /output/results.json in the required format. The Docker image is publicly available at obaij/hackathon-router:latest on Docker Hub and supports linux/amd64 architecture as required by the judging environment.

Category tags: