Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:42 evey Hermes plugins routing table

From Leeroopedia
Knowledge Sources
Domains Autonomous_Agents, Routing, Cost_Awareness
Last Updated 2026-10-29 00:00 GMT

Overview

Concrete routing table that maps 14 task types to recommended tools, models, and cost tiers, enabling cost-aware task execution in the autonomy engine.

Description

The _routing() function returns a static dictionary mapping task type strings (e.g. "code_change", "research_deep", "health_check") to a dict with tools (list of Hermes tool names), models (list of model IDs from config — empty for free/local tasks), and cost (tier label).

Task types fall into two cost tiers:

  • free/local: bridge_check, health_check, cost_review, goal_review, alert_user, simple_answer — no models recommended, no API cost.
  • configured: code_change, project_work, research_deep, research_quick, memory_maintenance, self_improve, email_maintenance, creative_writing — use the heavy or cheap model from config.

This function is called by decide_handler to populate recommended_tools, recommended_models, and cost_tier in the decision output. It is shared across the Autonomy Decision Loop and Cost-Aware Operation workflows.

Usage

This is an internal function called by decide_handler. It is not a registered tool. The Cost-Aware Operation workflow references it as the routing adjustment mechanism — the cost tier determines whether paid models are recommended for a given task type.

Code Reference

Source Location

  • Repository: hermes-plugins
  • File: evey-autonomy/__init__.py
  • Lines: L357-375

Signature

def _routing() -> dict[str, dict]:
    """
    Returns a mapping of 14 task types to:
        {tools: list[str], models: list[str], cost: str}

    Cost tiers: 'free/local', 'configured', 'free'
    Models come from config: _model('heavy') and _model('cheap').
    Empty model strings mean the user's active model (or no model for free tasks).
    """

Import

from evey_autonomy import _routing

I/O Contract

Inputs

Name Type Required Description
(config) dict — Reads heavy_model and cheap_model from config via _model()

Outputs

Name Type Description
routing_map dict[str, dict] 14 task types → {tools, models, cost}

Routing Table

Task Type Tools Models Cost Tier
bridge_check claude_bridge_check (none) free/local
code_change delegate_task, claude_bridge_task, terminal, patch heavy configured
project_work terminal, read_file, patch, delegate_task, github-pr-workflow heavy configured
research_deep web_search, web_extract, delegate_task heavy configured
research_quick web_search, web_extract cheap configured
health_check terminal, validate_output (none) free/local
memory_maintenance memory_score, memory_decay, consolidate_daily_memory cheap configured
cost_review cost_check, cost_analytics, terminal (none) free/local
goal_review evey_goals (none) free/local
self_improve reflect_on_output, update_identity cheap configured
alert_user send_message (none) free/local
email_maintenance gmail-maintenance-automation, cronjob cheap configured
creative_writing delegate_task heavy configured
simple_answer (none) (none) free

Usage Examples

Programmatic Access

from evey_autonomy import _routing

routing = _routing()
# Get tools for a code change task
code_route = routing["code_change"]
# {"tools": ["delegate_task", "claude_bridge_task", "terminal", "patch"],
#  "models": ["claude-sonnet-4-20250514"], "cost": "configured"}

# Free tasks have no models
health_route = routing["health_check"]
# {"tools": ["terminal", "validate_output"], "models": [], "cost": "free/local"}

Used by decide_handler

# Inside decide_handler, the winning action's task_type is looked up:
routing = _routing()
rt = routing.get(top.get("task_type", ""), routing["simple_answer"])
# decision["recommended_tools"] = rt["tools"]
# decision["recommended_models"] = rt["models"]
# decision["cost_tier"] = rt["cost"]

Related Pages

Implements Principle

Requires Environment

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment