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 autonomous plan

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

Overview

Concrete tool for generating multi-step execution plans from a goal string, using task-type classification and pre-built templates with configurable constraint modes.

Description

The autonomous_plan handler takes a goal, classifies it into a task type using keyword matching (_classify_goal), maps the task type to a plan template via _TYPE_TO_TEMPLATE, and returns a numbered list of steps with tool names, model recommendations, and cost tiers. Three constraint modes control plan depth: free-only (default, full template), fast (first 2 steps only), and thorough (adds a quality reflection step).

The seven plan templates defined by _templates() cover: research, code, project, health, memory, goal_review, and email. Each template step specifies a tool (Hermes tool name), model (heavy/cheap/empty for free), and cost tier.

Usage

Call this tool when an agent needs to break a high-level goal into actionable steps with specific tool and model recommendations. Registered as autonomous_plan on the evey_autonomy toolset.

Code Reference

Source Location

  • Repository: hermes-plugins
  • File: evey-autonomy/__init__.py
  • Lines: L456-550 (schema L456-468, templates L471-511, type mapping L514-520, handler L523-550)

Signature

def plan_handler(args: dict, **kwargs) -> str:
    """
    Args:
        args: {
            goal: str (required) - the goal to plan for,
            constraints: str - 'free-only' (default), 'fast', 'thorough',
            max_steps: number - max steps (default 8, capped 12)
        }
    Returns:
        JSON with status, goal, task_type, template, steps, total_steps, constraints, time_context
    """

def _templates() -> dict[str, list[dict]]:
    """Returns 7 plan templates keyed by task type name."""

def _classify_goal(text: str) -> str:
    """Classify a goal string into a task type via keyword matching."""

Import

from evey_autonomy import plan_handler
# Or accessed via Hermes tool call: autonomous_plan

I/O Contract

Inputs

Name Type Required Description
goal str Yes The goal to plan for
constraints str No 'free-only' (default), 'fast', or 'thorough'
max_steps number No Maximum steps (default 8, capped at 12)

Outputs

Name Type Description
status str "planned" or "error"
goal str The original goal
task_type str Classified type (e.g. "code_change", "research_deep")
template str Template key used (e.g. "code", "research")
steps list[dict] Each: {step, action, tool, model, cost}
total_steps int Number of steps in the plan
constraints str Constraint mode used
time_context dict Current time-of-day context

Usage Examples

Standard Plan

result = tool_call("autonomous_plan", {
    "goal": "Research the latest embedding models for RAG"
})
# Returns a 3-step research plan:
# 1. Search current sources (web_search, free)
# 2. Extract and verify sources (web_extract, free)
# 3. Synthesize findings (delegate_task, configured)

Fast Plan (2 Steps Only)

result = tool_call("autonomous_plan", {
    "goal": "Fix the login bug in auth.py",
    "constraints": "fast"
})
# Returns first 2 steps of the code template:
# 1. Inspect repo and requirements (read_file, free)
# 2. Implement in branch/worktree (delegate_task, configured)

Thorough Plan (With Reflection)

result = tool_call("autonomous_plan", {
    "goal": "Refactor the caching layer",
    "constraints": "thorough",
    "max_steps": 6
})
# Returns code template steps + a quality reflection step
# 1. Inspect repo... 2. Implement... 3. Run tests... 4. Open PR... 5. Quality reflection

Related Pages

Implements Principle

Requires Environment

Page Connections

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