MANAS — Token-Efficient Hybrid Routing Agent

Streamlit
application badge
Created by team Manas on July 06, 2026
Hybrid Token-Efficient Routing Agent

MANAS — "the mind that knows when to think deep, and when to think fast" — is a token-efficient hybrid routing agent built for Track 1. The scoring rule is simple: only remote (Fireworks) tokens cost points, while local compute is free. MANAS is designed around that single insight. For every incoming task it first asks, "Can I answer this for free?" Plain arithmetic questions like "What is 17 * 23?" are detected with a strict pattern and computed locally in Python — zero tokens spent. Only tasks that genuinely need a language model are escalated to the remote API. When a task is escalated, MANAS keeps the token bill as low as possible. It routes to a Gemma model on Fireworks AI, uses a short "answer directly and concisely" system prompt, sets temperature to 0 for deterministic output, and avoids few-shot padding — so both the input and output token counts stay minimal without dropping below the accuracy gate. The routing is deterministic and fully auditable: there is no black-box LLM classifier deciding where each task goes, so every decision can be explained and reproduced. The agent runs as a self-contained linux/amd64 Docker container. It reads tasks from /input/tasks.json, writes answers to /output/results.json in the required [{task_id, answer}] format, and reads the API key, base URL, and allowed models from environment variables injected by the harness — nothing is hardcoded. The image is public and ready to pull.

Category tags: