This submission is a production-ready general-purpose AI agent built for AMD Developer Hackathon Track 1. It reads /input/tasks.json, processes diverse natural-language challenges, and writes valid /output/results.json within competition limits (10-minute runtime, linux/amd64 Docker, no hardcoded answers, no response caching). Core idea: maximize benchmark accuracy while minimizing Fireworks token usage through intelligent routing — not bigger prompts or more API calls. Architecture Rule-based router — classifies tasks into 10 categories (math, sentiment, NER, summarization, code generation, debugging, logic, factual, structured extraction, structured writing) using keyword/heuristic patterns. Zero LLM tokens are spent on classification. Specialized handlers — each category has a minimal system prompt, tuned max_tokens, model-tag preferences, and post-processing (JSON cleanup, code extraction, section validation). Hybrid inference — a bundled Qwen 2.5 3B Instruct (Q4_K_M) model runs locally via llama-cpp-python for lightweight tasks (sentiment, summarization, NER, factual). If local confidence is low, the agent falls back to Fireworks models from ALLOWED_MODELS only. Deterministic solvers — optional CPU-only fallbacks for math, logic, sentiment, and NER when patterns match, avoiding API calls entirely. Resilient Fireworks client — retries, exponential backoff, model fallback, structured JSON logging, and per-task error handling so one failure never crashes the batch.
Category tags: