Principle:42 evey Hermes plugins Task Routing
| Knowledge Sources | |
|---|---|
| Domains | Routing, Cost_Awareness, Autonomous_Agents |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A static routing mechanism that maps task types to recommended tools, models, and cost tiers, enabling cost-aware execution by directing free tasks to local tools and expensive tasks to paid models.
Description
Task Routing bridges the gap between "what to do" (the decision) and "how to do it" (execution). It uses a lookup table mapping task type strings (e.g. code_change, health_check) to a triple of (tools, models, cost_tier). The cost tier distinguishes tasks that can be done for free (using local tools, no LLM calls) from those requiring configured (paid) models.
This principle solves the cost-awareness problem: not all tasks need the same computational resources. A bridge check or cron health scan can be done with free terminal tools, while code generation or deep research requires a powerful model. By encoding this mapping statically, the agent avoids wasteful LLM calls for simple tasks and ensures expensive capabilities are reserved for tasks that actually need them.
Usage
Use this principle when designing agent systems where cost control matters — i.e., where some tasks can be performed with free/local tools and others require paid model API calls. The routing table should be declarative and easily adjustable without code changes.
Theoretical Basis
The routing function is a simple static lookup:
Failed to parse (syntax error): {\displaystyle \text{route}(\text{task\_type}) = (\text{tools}, \text{models}, \text{cost\_tier}) }
The cost tier partitions task types into two sets:
- free/local:
cost = "free/local"— no models recommended, no API cost - configured:
cost = "configured"— heavy or cheap model from configuration
# Abstract pattern (NOT real implementation)
ROUTING = {
"code_change": {"tools": ["delegate_task", "terminal"], "models": [heavy_model], "cost": "configured"},
"health_check": {"tools": ["terminal"], "models": [], "cost": "free/local"},
}
route = ROUTING.get(task_type, DEFAULT_ROUTE)
The cost tier feeds into the Cost-Aware Operation workflow: when budget is exceeded, the agent is instructed to switch to free/local tasks only.