Penny — the Hybrid Token-Efficient Routing Agent

Streamlit
application badge
Created by team HackX Association on July 12, 2026
Hybrid Token-Efficient Routing Agent

Most routers pick a model per task-type and hope. Penny treats every task as its own cost problem: it first tries a sandboxed local engine (math/units/regex/dates) for a free answer, then a zero-token heuristic estimates how capable a model the task actually needs, then it computes real blended cost (live Fireworks pricing × this task's estimated prompt/output size) across the whole catalog and picks the cheapest one that clears that bar. Answers are checked for free — labels validated, JSON parsed, generated code actually executed against the task's own test cases — and only escalate to a pricier model on a genuine failure signal, capped so it can't runaway. Prompts are short and category-specific with tight output budgets, because efficiency is as much about not paying for a paragraph as it is about which model answers.

Category tags: