
TokenEdge is a hybrid, token-efficient AI routing agent built for the AMD Developer Hackathon Token Golf challenge. Its goal is to complete a diverse set of AI tasks while using the fewest possible scored Fireworks AI tokens without falling below the required accuracy threshold. Instead of sending every task to a hosted language model, TokenEdge uses a verification-gated cascade. It first classifies and deduplicates incoming tasks locally. Deterministic solvers then handle suitable tasks such as mathematics, logical reasoning, named-entity recognition, formatting operations, and code execution at zero Fireworks token cost. When deterministic solving is not possible, a bundled local language model attempts the task. Its response is accepted only when confidence and structural verification checks pass. Tasks that remain uncertain are routed to the cheapest suitable model available through Fireworks AI. More powerful models are used only as a final accuracy backstop. The system includes category-specific output limits, minimal prompts, caching, model allow-list detection, automatic fallbacks, sandboxed code execution, and answer verification. Reasoning is disabled by default and enabled only when genuinely required. This architecture reduces unnecessary API usage while avoiding the zero-API-call disqualification condition. TokenEdge demonstrates how local computation, verification, dynamic model routing, and selective cloud inference can make AI agents significantly more efficient, reliable, and cost-effective.
13 Jul 2026