track1-agent is a batch-mode Docker container built for Track 1 of the AMD Developer Hackathon: General-Purpose AI Agent. It reads tasks from /input/tasks.json spanning eight capability categories — factual knowledge, math reasoning, sentiment classification, summarization, named entity recognition, code debugging, logical reasoning, and code generation — and writes answers to /output/results.json, with every inference call routed through Fireworks AI. Since scoring ranks ascending by total token count among submissions that clear an accuracy gate, the agent's design centers on two levers: smart model-tier routing and disciplined output length. A deterministic classifier detects each task's category and complexity, then resolves to the cheapest of the ALLOWED_MODELS tier likely to answer correctly — including Gemma variants provided via Fireworks — escalating to a larger tier only when complexity signals warrant it. Each category also gets a tailored output-token budget and a short conciseness instruction, since output length is the primary token-count lever under our control. Reliability was built in from the start: transient Fireworks failures retry with backoff, a failing model falls back once to the largest available tier, and every task still gets a valid results.json entry even in a worst-case failure — no missing task_ids, no malformed output. An in-memory, single-run cache dedupes exact-repeat prompts within a batch at zero additional token cost. Built and tested with 98 passing unit/integration tests covering classification accuracy across dozens of real-world phrasings, retry/fallback behavior, caching, and the full harness I/O contract.
Category tags: