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 time profiles

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

Overview

Concrete mechanism for time-of-day profiling that maps the current hour to a named period with recommended and avoided task types, driving time-aware autonomy decisions.

Description

The time profiles system in evey-autonomy consists of three components:

  • TIME_PROFILES — a static dict mapping 6 named time periods to a tuple of (start_hour, end_hour, recommended_tasks, avoided_tasks). The periods are: morning (7-10), late_morning (10-12), afternoon (12-17), evening (17-21), night (21-23), late_night (23-7, wraps midnight).
  • _time_context() — returns the matching profile for the current hour: {period, hour, recommended, avoid, timezone}. Falls back to "afternoon" if no match.
  • _get_hour() — gets the current hour in the configured timezone (via zoneinfo), falling back to time.localtime.

The time context is used by decide_handler (adds time_context to the decision output), _collect_time (triggers morning briefing at 7-10am if not yet sent, self-improvement at 2-4am), and plan_handler (adds time context to plan output).

Usage

This is an internal mechanism used by the autonomy engine, not a registered tool. The Morning Briefing workflow uses it to detect the morning time window and trigger the daily briefing.

Code Reference

Source Location

  • Repository: hermes-plugins
  • File: evey-autonomy/__init__.py
  • Lines: L88-114 (_get_hour L88-95, TIME_PROFILES L98-105, _time_context L108-114), L328-354 (_collect_time)

Signature

TIME_PROFILES = {
    "morning":      (7, 10,  ["bridge_check", "health_check", "goal_review", "project_check"], ["heavy_research"]),
    "late_morning": (10, 12, ["research_deep", "code_change", "goal_work", "project_work"], []),
    "afternoon":    (12, 17, ["research_quick", "bridge_check", "goal_work", "project_work"], []),
    "evening":      (17, 21, ["goal_review", "cost_review", "light_research"], ["heavy_delegation"]),
    "night":        (21, 23, ["memory_maintenance", "health_check"], ["user_alerts", "heavy_delegation"]),
    "late_night":   (23, 7,  ["self_improve", "memory_maintenance"], ["user_alerts", "heavy_delegation", "expensive_models"]),
}

def _get_hour() -> int:
    """Get current hour in configured timezone."""

def _time_context() -> dict:
    """Return matching time profile: {period, hour, recommended, avoid, timezone}."""

def _collect_time() -> list[dict]:
    """Generate time-triggered actions (morning_briefing, self_improve_cycle)."""

Import

from evey_autonomy import TIME_PROFILES, _time_context, _collect_time

I/O Contract

Inputs

Name Type Required Description
(config) dict — timezone from config or HERMES_TIMEZONE env
(clock) int — Current system hour in the configured timezone

Outputs (_time_context)

Name Type Description
period str Profile name (morning, late_morning, afternoon, evening, night, late_night)
hour int Current hour
recommended list[str] Task types recommended for this period
avoid list[str] Task types to avoid in this period
timezone str Timezone name from config

Outputs (_collect_time)

Name Type Description
actions list[dict] Time-triggered action dicts (morning_briefing, self_improve_cycle)

Usage Examples

Getting Current Time Context

from evey_autonomy import _time_context

ctx = _time_context()
# At 9am: {"period":"morning","hour":9,
#   "recommended":["bridge_check","health_check","goal_review","project_check"],
#   "avoid":["heavy_research"],"timezone":"UTC"}

Time-Triggered Actions

from evey_autonomy import _collect_time

# At 9am, if morning briefing not yet sent today:
actions = _collect_time()
# [{"source":"time","action":"morning_briefing",
#   "description":"Morning briefing not sent yet",
#   "urgency":8,"importance":7,"recency":9,"task_type":"alert_user"}]

# At 3am, if self-improve cycle not yet run:
# [{"source":"time","action":"self_improve_cycle",
#   "description":"Nightly self-improvement window",...}]

Related Pages

Implements Principle

Requires Environment

Page Connections

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