CascadeAgent: Token-Efficient Task Router

Vercel
application badge
Created by team Pixel & Prompt on July 06, 2026
Hybrid Token-Efficient Routing Agent

CascadeAgent is a general-purpose AI agent built for the AMD Developer Hackathon: ACT II, designed to handle all eight evaluated capability categories — factual knowledge, mathematical reasoning, sentiment classification, text summarisation, named entity recognition, code debugging, logical/deductive reasoning, and code generation — while minimizing total tokens spent through Fireworks AI. The core idea is routing intelligence, not raw model power. Every incoming task is first classified into one of the eight categories using lightweight, zero-cost heuristics. Tasks that can be solved without any LLM call — such as clear-cut sentiment classification (via VADER lexicon scoring), named entity recognition (via a local spaCy model), and simple arithmetic (via safe expression evaluation) — are resolved directly in code, at zero token cost, with no Fireworks call at all. Ambiguous cases are never guessed locally; they fall through to the LLM path automatically, since a wrong free answer risks failing the accuracy gate. For everything that genuinely requires a model — factual questions, summarisation, logical puzzles, code generation and debugging — CascadeAgent selects the smallest Fireworks model in the allowed list capable of the task, using category-specific, token-minimal prompts with output-length caps to keep answers concise without sacrificing correctness. The agent is fully containerized per the challenge's Docker requirements, reads tasks from /input/tasks.json, and writes results to /output/results.json, reading all Fireworks configuration (API key, base URL, allowed models) purely from environment variables injected by the judging harness at runtime.

Category tags: