NousResearch/hermes-agent · warning · BlueprintFillError

a time is required

Error message

a time is required

What it means

BlueprintFillError from _resolve_schedule in the cron blueprint catalog. The blueprint's schedule_template contains {minute} and/or {hour} placeholders, the user did not supply a free-text `schedule` override, and no `time` slot value was given — so the HH:MM needed to build the cron fields is absent. The error is user-facing by design so a form (or the agent) knows what to ask for next.

Source

Thrown at cron/blueprint_catalog.py:703

    "thursday": "4", "friday": "5", "saturday": "6",
}


def _resolve_schedule(blueprint: AutomationBlueprint, values: Dict[str, Any]) -> str:
    """Fill the schedule_template placeholders from resolved slot values."""
    sched = blueprint.schedule_template

    # A free-text `schedule` slot passes through verbatim (full flexibility).
    if "schedule" in values and values["schedule"]:
        return str(values["schedule"])

    repl: Dict[str, str] = {}

    # time -> minute/hour
    time_val = values.get("time")
    if "{minute}" in sched or "{hour}" in sched:
        if not time_val:
            raise BlueprintFillError("a time is required")
        m = _TIME_RE.match(str(time_val).strip())
        if not m:
            raise BlueprintFillError(f"invalid time {time_val!r} — use HH:MM (24h)")
        repl["hour"] = str(int(m.group(1)))
        repl["minute"] = str(int(m.group(2)))

    # weekday set -> dow
    if "{dow}" in sched:
        if "recurrence" in values:
            preset = str(values.get("recurrence", "everyday")).lower()
            if preset not in WEEKDAY_PRESETS:
                raise BlueprintFillError(
                    f"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}"
                )
            repl["dow"] = WEEKDAY_PRESETS[preset]
        elif "day" in values:
            day = str(values.get("day", "")).lower()
            if day not in _DAY_TO_DOW:

View on GitHub (pinned to c896c09c42)

Solutions

  1. Supply `time` in HH:MM 24h form, e.g. {'time': '09:30', 'day': 'monday'}
  2. Or bypass templating entirely by passing a full free-text `schedule` value, which is returned verbatim

Example fix

# before
fill_blueprint(bp, {"day": "monday"})
# BlueprintFillError: a time is required

# after
fill_blueprint(bp, {"day": "monday", "time": "09:00"})
Defensive patterns

Strategy: validation

Validate before calling

def has_time_or_schedule(values: dict, template: str) -> bool:
    if values.get("schedule"):
        return True
    if "{minute}" in template or "{hour}" in template:
        return bool(values.get("time"))
    return True

Try / catch

from cron.blueprint_catalog import BlueprintFillError

try:
    spec = fill_blueprint(bp, values)
except BlueprintFillError as e:
    if str(e) == "a time is required":
        values["time"] = ask_user("At what time? (HH:MM, 24h)")
        spec = fill_blueprint(bp, values)
    else:
        raise

Prevention

When it happens

Trigger: Filling a time-of-day blueprint (template like '0 {hour} * * {dow}') via fill_blueprint with values that omit `time`, e.g. {'day': 'monday'} only, or {'time': ''}.

Common situations: A chat-driven job creation where the user said 'every monday' but never stated a time; a form submission with the time field left blank; passing recurrence but forgetting the default time slot.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/97020ca45fc9a54b. Report an issue: GitHub.