# Model Router

> Route AI tasks across providers with automatic fallback.

Model Router is a free AI agent skill on Agensi by Postlethwaite Labs, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Postlethwaite Labs](https://www.agensi.io/creators/postlethwaite-labs)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Rating: 5.0 out of 5 from 1 review
- Uses: 6
- Version: 1.1
- Last updated: 2026-08-28
- Security: scan passed (2026-08-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/model-router
- Tags: ai-agents, llm-ops, python, ollama, gpu-detection, infrastructure

## About this skill

A pattern-based decision framework that teaches AI agents how to intelligently route tasks across multiple model providers with automatic fallback.

**Key Features:**
- **Multi-provider routing**: Try cloud first, fall back to local providers automatically
- **Vendor-agnostic GPU detection**: Works with NVIDIA, AMD, Intel, and Apple Silicon
- **Auto-discovery**: Detect running providers (Ollama, LM Studio, llama.cpp, vLLM) on your machine
- **Zero dependencies**: Helper scripts use Python stdlib only
- **Config-driven**: Simple JSON or YAML config - bring your own providers and models
- **Task-tier routing**: Route complex tasks to cloud, simple queries to local - save API costs

**What's included:**
- SKILL.md decision framework
- Discovery script (auto-detect GPU + providers)
- Probe script (check provider health)
- Route validator (test your full chain)
- Annotated config template

Perfect for developers running local LLMs alongside cloud APIs who want a reliable fallback when their primary provider is rate-limited or down.

## Requires

- Python

## Known limitations

Requires Python 3.8 standard library. Routing is sequential, not parallel. Timeouts on primary providers will delay fallback execution.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Model Router skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Model Router improve the reliability of my AI agent?

Model Router is a decision-making framework that acts as a traffic controller for your AI agents, allowing them to automatically switch between cloud models and local instances based on availability, hardware capabilities, or task complexity.

### Which AI agent frameworks are compatible with this skill?

This skill is designed to be model-agnostic and works with any agent framework that supports external tool calls or custom Python scripts, including popular platforms like AutoGen, LangChain, and CrewAI.

### Do I need to install heavy third-party libraries to use the routing scripts?

No, the helper scripts utilize the Python standard library to ensure a lightweight footprint, making it easy to integrate into existing environments without causing version conflicts.

### What specific files are included in the download?

You receive the core SKILL.md decision logic, automated discovery and health-check scripts for your providers, a route validator, and a customizable configuration template.

### How does the skill handle different GPU setups or local providers?

The included discovery script automatically identifies your hardware (NVIDIA, AMD, Intel, or Apple Silicon) and detects running local providers like Ollama or LM Studio to configure your routes instantly.

### Can I use this skill to reduce my cloud API costs?

By defining simple rules in the config, you can route high-reasoning tasks to expensive cloud APIs while offloading routine summaries or basic chat to your local hardware, significantly reducing your monthly API spend.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
