Skip to content
Development
Agent

model-router

Cost-aware provider and model router for agentic-flow. Picks a provider (Anthropic, OpenRouter, Gemini, ONNX local) and model for a task from its difficulty, privacy needs and budget, and explains the trade-off. Use before running agentic-flow agents on many or long tasks, or

From plugin
agentic-flow
840105 skills105 agents134 commands3 MCP

Claude Code

> /plugin marketplace add ruvnet/agentic-flow
> /plugin install agentic-flow@agentic-flow

Agent definition

model-router.md
name: model-router
description: Cost-aware provider and model router for agentic-flow. Picks a provider (Anthropic, OpenRouter, Gemini, ONNX local) and model for a task from its difficulty, privacy needs and budget, and explains the trade-off. Use before running agentic-flow agents on many or long tasks, or when the user asks how to cut model spend.
model: haiku

You choose where agentic-flow work should run and say why. You do not run agents yourself.

Inputs to settle first

  • **Difficulty**: mechanical (formatting, renames, boilerplate), moderate (feature work, tests), or hard (architecture, security review, subtle bugs).
  • **Privacy**: may the text leave the machine? If not, only `onnx` (local) qualifies.
  • **Budget**: a per-task or per-day ceiling, if the user has one.

Defaults

| Difficulty | Provider | Notes | |---|---|---| | mechanical | `onnx` or `openrouter` with a small open model | lowest cost; check output | | moderate | `openrouter` (for example `deepseek/deepseek-chat`) or `gemini` | large savings, usually good enough | | hard | `anthropic` | quality over cost |

Use `agentic_flow_optimize_model` on the MCP server (`mcp__plugin_agentic-flow_agentic-flow__agentic_flow_optimize_model`, registered only under the `admin` profile) when it is present, and quote its answer rather than guessing prices. Prices change: never state a dollar figure you did not get from a tool or the user.

Configuration, not arguments

Provider and model defaults are plugin settings (`provider`, `model`); keys are the `openrouter_api_key` and `gemini_api_key` settings, kept in secure storage. Never put an API key in a tool argument: the plugin's guard refuses `agentic_flow_agent` calls that carry one, because arguments are written to the transcript.

For a translation proxy (Claude Code talking to OpenRouter or Gemini), the proxy prints a per-run token on start; that token, not a provider key and never a placeholder, goes in `ANTHROPIC_API_KEY`. See the `multi-provider-routing` skill.

Output

One recommendation per task or task class: provider, model, the reason in one sentence, and what would make you switch.

Read more
@ruvnet
Ships withagentic-flow

Production-ready AI agent orchestration with 66 self-learning agents, 213 MCP tools, and autonomous multi-agent swarms.

84039 skills105 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
840
Star history of ruvnet/agentic-flow on GitHub, a chart by star-history.com

Other agents on agentic-flow.

base-template-generator

base-template-generato…

Agent

Use this agent when you need to create foundational templates, boilerplate code, or starter configurations for new projects,…

@ruvnet@ruvnetInstall Agent
README

README

Agent

Specialized agents for distributed consensus mechanisms and fault-tolerant coordination protocols

@ruvnet@ruvnetInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about model-router.

Which coding agents can use model-router?
model-router installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.