.png&w=828&q=75)
What it does:- Our agent reads a batch of natural-language tasks (/input/tasks.json) spanning eight categories — factual, math, sentiment, summarization, NER, code-debug, logic puzzles, and code-gen — and writes answers to /output/results.json. For every task, a router makes a per-task decision: answer locally (free), or escalate to the cheapest Fireworks model that still gets it right. How it works Local-first cascade. Every task is attempted locally first. The keep-vs-escalate decision is estimated entirely for free using self-consistency (agreement across local samples), deterministic format/structure checks, and a local self-verification pass where the model judges its own answer YES/NO — no hardcoded answer keys or refusal phrases. Escalate rarely, cheaply. Only tasks the local tier can't confidently nail (typically math, logic, code, and long summarization) are sent to Fireworks, and the router picks the least expensive sufficient model from the runtime-provided ALLOWED_MODELS list. A TokenAccountant that mirrors the real scoring rule — counting only remote, non-cached tokens. This means our offline eval predicts the leaderboard score, so routing thresholds can be tuned to sit just above the accuracy gate at minimum token cost, before ever submitting. Contract-safe by construction. Ships as a public linux/amd64 Docker image: exits 0, stays within the 10-minute / 30-second-per-request budgets, is ready in under 60s, reads env-injected credentials (never hardcoded), and emits schema-valid JSON so it never scores zero on a technicality.
13 Jul 2026