TokenCalcAI
Prompt RouterCalculatorCompare AIGuidesFree CoursesAI NewsCommunity

Main product · Free · 100% local · Apache-2.0

Prompt Router

Prompt Router is the flagship product of TokenCalc AI: a local preflight layer that reads a prompt before it reaches an AI agent, estimates the work, and recommends where the task should run. Nothing is uploaded, the CLI makes no network calls, and routing writes no state.

Download the free CLICompare routing savings →
Quick overview

What does Prompt Router decide before an AI model call?

Prompt Router reads a prompt locally and reports five things before a provider call: a token and cost estimate, the task type, the best agent, a model route with an alternate and an open-weight option, and the estimated savings versus the model you were about to use.

Expand the details
  • No uploads: The CLI performs zero network calls; raw prompts, context, responses, and credentials never leave your machine.
  • No state for route: The routing command writes nothing to disk, so you can preflight a prompt without creating a local log.
  • Any AI agent: Plain Node.js with no dependencies. Any agent that can run a local command can use the CLI; OpenCode catalog support is optional.
  • Local pricing: Cost estimates use local catalog data, so the recommendation works offline.
Token Cost CalculatorSmart Router SavingsLocal LLM Hub

What Prompt Router decides

Before a provider call, the route command prints a short summary or a complete JSON object with --json. Each decision is a starting point, not a hard clamp: you can keep the current model, ask your agent to switch, or add caps with policy.

  • Token and cost estimate. Approximate input tokens, output tokens, total tokens, and the likely cost on the model you are about to call.
  • Task type. Classifies the request as code, research, reasoning, creative, simple, long-context, tool-heavy, or mixed.
  • Best agent. Suggests a code-agent, research-agent, reasoning-agent, writing-agent, local-agent, or general-agent for the job.
  • Model route. Returns a best choice, an alternate, and an open-weight option, each with a plain-language reason.
  • Estimated savings. Shows the difference between your current model and the recommended route so you can decide whether to switch.

Routing rules by task type

The route table maps task signals to an agent type and three model families. Simple extraction work favours local weights, code and long-form work can move to Claude, research and large-context tasks lean on Gemini, and general agent work can stay on GPT.

Task signalAgentPreferredAlternateOpen weight
Summarize, list, rewrite, translate, extractlocal-agentQwen 2.5 72BGemini 3.8 FlashQwen 2.5 72B
Implement, refactor, debug, test suitecode-agentClaude Sonnet 5.5GPT-6.1 SolQwen 2.5 72B
Research, audit, citations, source comparisonresearch-agentGemini 4 NeonClaude Opus 5.5DeepSeek Flash
Math, proof, statistics, reasoning puzzlereasoning-agentGemini 4 NeonGPT-6 AstraDeepSeek V4 Pro
Brainstorm, story, marketing copy, scriptwriting-agentClaude Sonnet 5.5GPT-6.1 SolMistral Large 2
Three or more planned tool callscode-agentGPT-6.1 SolClaude Sonnet 5.5Qwen 2.5 72B
More than 20,000 context tokensresearch-agentGemini 4 NeonClaude Opus 5.5DeepSeek Flash
Mixed or unclear requestgeneral-agentGPT-6.1 SolGemini 4 NeonQwen 2.5 72B

Route, gate, call, finish, report

  1. Route. Run route before any non-trivial model call. Read the estimate, task type, and reason; keep your current model if you disagree.
  2. Gate. Run gate to trim duplicate or oversized context, cap output, and produce a forward payload for the agent you already use.
  3. Call. Send the payload to your existing model or API. TokenCalc AI does not proxy the provider and never holds your credentials.
  4. Finish. Record the real outcome, tokens, tools, files, tests, commits, retries, and verification steps locally.
  5. Report. Review local savings, spend, waste, and contribution scores to find the next routing improvement.
node agent-battery-saver/scripts/agent-saver.mjs route \
  --prompt-file ./prompt.txt \
  --context-file ./context.txt \
  --model gpt-6-astra \
  --tool edit_file --tool run_tests

Install Prompt Router locally

Download the bundle from the latest public GitHub release or use a one-line installer. The install directory stays agent-battery-saver/ for compatibility. Set PROMPT_ROUTER_SKILLS_DIR (or OPENCODE_SKILLS_DIR) to install it wherever your agent loads skills; the default remains ~/.config/opencode/skills. Then give the instruction below to any agent that can run a local command. OpenCode catalog support is optional.

  • Any agent: load agent-battery-saver/SKILL.md as a skill, add it to your system prompt or AGENTS.md, or call the CLI by its local path.
  • macOS / Linux: curl -fsSL https://raw.githubusercontent.com/vishvaisadev123/agent-battery-saver-skill/main/install.sh | sh
  • Windows PowerShell: iwr -useb https://raw.githubusercontent.com/vishvaisadev123/agent-battery-saver-skill/main/install.ps1 | iex
  • Optional OpenCode catalog: https://raw.githubusercontent.com/vishvaisadev123/agent-battery-saver-skill/main/catalog/
Use Prompt Router (agent-battery-saver) before any model call: run route, report the token and cost estimate, use gate's forward payload for the real call, then finish with verified evidence. Never upload prompts, context, responses, or credentials.

The one-time catalog or release download is the only network request. After installation the CLI runs offline.

Community feedback

Downloaded Prompt Router? Tell us how it went.

Share what worked, what didn't, and which route you chose. Feedback is published on the public board — please never include prompts, credentials, or private code.

Recent Prompt Router feedback

Loading feedback…

See the full public feedback board →

Privacy boundary

Prompt Router separates what stays in your calling app from the small local fields the skill stores in .agent-saver/. Add that directory to your .gitignore if you do not want reports committed.

Stays in your appStored locally in .agent-saver/
Raw prompt textHashed prompt and cache keys
Retrieved context and documentsRedacted prompt and task summaries
Provider responsesNormalized token counts and costs
Provider credentialsModel routing, tool names, and retries
Full conversation historyFiles, tests, commits, outcome and waste scores

Prompt Router FAQ

7 short answers — tap a question to expand.

Is Prompt Router free?

Yes. Prompt Router is Apache-2.0, downloadable without an account from the public GitHub repository, and runs entirely on your own machine.

Does Prompt Router send prompts to a server?

No. The CLI makes no network requests, and route does not create the local state directory. Raw prompt text, retrieved context, provider responses, and credentials are never written to disk by the skill.

Which model families does Prompt Router recommend?

Open-weight families such as Qwen, Llama, Mistral, and DeepSeek, plus Anthropic Claude, Google Gemini, and OpenAI GPT. The choice depends on task type, context size, output cap, and tool count.

Does Prompt Router replace a token calculator?

No. It uses local pricing data to estimate a route before the call. TokenCalc calculators remain useful for comparing models and understanding token costs after the fact.

Does Prompt Router work with any AI agent?

Yes. The CLI is plain Node.js with no dependencies, so any agent that can run a local command can use it — Claude Code, Cursor, Codex, Gemini CLI, OpenCode, or a custom agent. Load the bundled SKILL.md, add the one-line instruction to your agent prompt, or call the CLI directly. OpenCode catalog support is optional.

How do I leave feedback after downloading Prompt Router?

Use the public feedback section on this page. Clicking Download opens the GitHub release in a new tab and expands the feedback form when you return. Share your name, a short title, and your experience; never include prompts, credentials, or private code.

Can I get a feedback reminder one day after downloading?

Yes. After downloading, you can opt in to browser notifications. One day later you will get an on-page prompt when you return and, if the tab is open and permission was granted, a desktop notification. Only a timestamp is stored in your browser; no prompt content is sent anywhere.

← All AI Tools·Smart Router →·Quota Planner →·Local LLMs →·Usage Log →
TokenCalc AI

Simple AI cost picker, model comparisons, and free prompt tools.

Tools

  • Prompt Router
  • Calculator
  • Overpaying?
  • Tokenizer
  • Prompt Shortener
  • GitHub Badges
  • Chrome Extension
  • API Docs
  • All Tools
  • Usage Log

Learn

  • Guides
  • Articles
  • Free Courses
  • AI News

Research

  • Compare AI
  • Side-by-Side
  • Free APIs
  • Leaderboard
  • Local AI
  • AI Status
  • Speed Race
  • MCP vs CLI

Company

  • About
  • Contact
  • Feedback
  • How It Works
  • Privacy
  • Terms

© 2026 TokenCalc AI. Independent AI pricing & token economics.

RunPod GPUs↗Vast.ai GPUs↗DigitalOcean Referral Badge
HomeCalculatorModelsTools