Implementation:42 evey Hermes plugins autonomous decide
| Knowledge Sources | |
|---|---|
| Domains | Autonomous_Agents, Decision_Making, Task_Management |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete tool for deciding what an autonomous agent should work on next, scanning six signal sources and ranking candidate actions by a multi-factor priority score.
Description
The autonomous_decide handler is the core entry point of the evey-autonomy plugin. It aggregates actions from six signal collectors — bridge tasks, goals, project git state, memory health, cron errors, and time-of-day triggers — deduplicates them, scores each by urgency × importance × recency, and returns the highest-scoring action with recommended tools, models, and cost tier from the routing table. It also logs every decision to a JSONL file for dedup and audit.
The six internal _collect_* functions are the signal collectors:
- _collect_bridge() — reads pending tasks from the SQLite bridge DB, bridge inbox files, and the JSONL channel log
- _collect_goals() — parses
goals.mdfor uncompleted Active goals, skipping recently-worked items - _collect_projects() — runs
git status/git branch/git logon configured local repos to detect dirty state, feature branches, and unpushed commits - _collect_memory() — checks the memory scores file for stale memories below the decay threshold
- _collect_cron() — reads
cron/jobs.jsonfor jobs withlast_status == "error" - _collect_time() — checks the current time-of-day profile against the decision log to trigger morning briefings and nightly self-improvement cycles
The _log_decision() and _recent_decisions() helpers append decision entries to autonomy-log.jsonl and read recent entries for dedup.
Usage
Import and call this tool when an autonomous agent needs to decide its next action without user prompting. It is registered as the autonomous_decide tool on the evey_autonomy toolset.
Code Reference
Source Location
- Repository: hermes-plugins
- File: evey-autonomy/__init__.py
- Lines: L88-453 (collectors L151-354, logging L117-140, decide_handler L391-453, schema L378-388)
Signature
def decide_handler(args: dict, **kwargs) -> str:
"""
Decide what to work on next.
Args:
args: {
context: str - optional current context,
exclude_sources: list[str] - sources to skip e.g. ['projects','time']
}
Returns:
JSON string with the winning action, routing info, and queue.
"""
# Internal signal collectors (each returns list[dict] of action items):
def _collect_bridge() -> list[dict]
def _collect_goals() -> list[dict]
def _collect_projects() -> list[dict]
def _collect_memory() -> list[dict]
def _collect_cron() -> list[dict]
def _collect_time() -> list[dict]
# Decision logging:
def _log_decision(entry: dict) -> None
def _recent_decisions(n: int = 10) -> list[dict]
Import
# Registered as a Hermes tool via plugin registration:
from evey_autonomy import decide_handler
# Or accessed via Hermes tool call: autonomous_decide
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| context | str | No | Current context string (unused in scoring, informational) |
| exclude_sources | list[str] | No | Sources to skip, e.g. ['projects','time']
|
| (config) | evey-autonomy.json | No | Config file merging with DEFAULTS; env vars override |
| (filesystem) | various | — | bridge.db, goals.md, cron/jobs.json, .memory_scores.json, project git repos |
Outputs
| Name | Type | Description |
|---|---|---|
| status | str | "action", "idle", or "error"
|
| action | str | The winning action name (e.g. "process_bridge_task")
|
| description | str | Human-readable description of the action |
| source | str | Which signal source produced the winner |
| priority_score | int | urgency × importance × recency (1-1000)
|
| recommended_tools | list[str] | Tools from routing table for this task type |
| recommended_models | list[str] | Models from routing table (empty for free/local tasks) |
| cost_tier | str | "free/local", "configured", or "free"
|
| queue_depth | int | Total unique candidate actions found |
| next_actions | list[dict] | Top 4 runner-up actions with scores |
| sources_checked | dict | Per-source action counts or error strings |
Usage Examples
Basic Decision
# Called as a Hermes tool — the agent invokes autonomous_decide
result = tool_call("autonomous_decide", {})
# Returns: {"status":"action","action":"process_bridge_task",
# "description":"Bridge task: Fix login bug","source":"bridge",
# "priority_score":1000,"recommended_tools":["claude_bridge_check"],
# "cost_tier":"free/local", ...}
Excluding Noisy Sources
# Skip project scanning and time triggers for a focused decision
result = tool_call("autonomous_decide", {
"exclude_sources": ["projects", "time"]
})
Idle State
# When no signals are found, returns idle status
# {"status":"idle","time_context":{"period":"afternoon",...},
# "sources_checked":{"bridge":0,"goals":0,"projects":0,"memory":0,"cron":0,"time":0}}
Related Pages
Implements Principle
- Principle:42_evey_Hermes_plugins_Signal_Collection
- Principle:42_evey_Hermes_plugins_Priority_Scoring