NousResearch/hermes-agent · warning · BlueprintFillError

invalid interval {iv!r} — minutes as a positive integer

Error message

invalid interval {iv!r} — minutes as a positive integer

What it means

BlueprintFillError: the schedule template contains {interval_min} (an */N every-N-minutes schedule) but the supplied interval_min value is not a string of digits, or is <= 0. Values like '15m', '0', '-5', '1.5', or '' are rejected — the unit is implicitly minutes and only a positive integer is accepted.

Source

Thrown at cron/blueprint_catalog.py:731

            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:
                raise BlueprintFillError(f"unknown day {day!r}")
            repl["dow"] = _DAY_TO_DOW[day]
        else:
            repl["dow"] = "*"

    # interval (minutes) for */N schedules
    if "{interval_min}" in sched:
        iv = str(values.get("interval_min", "")).strip()
        if not iv.isdigit() or int(iv) <= 0:
            raise BlueprintFillError(f"invalid interval {iv!r} — minutes as a positive integer")
        repl["interval_min"] = iv

    # Any remaining {slot} placeholders are filled verbatim from validated
    # enum/text slot values (e.g. an hour-range window). Enum options have
    # already been checked in fill_blueprint, so these are safe to interpolate.
    for name in re.findall(r"\{(\w+)\}", sched):
        if name not in repl and name in values:
            repl[name] = str(values[name])

    try:
        return sched.format(**repl)
    except KeyError as e:  # pragma: no cover - template/slot mismatch is a dev error
        raise BlueprintFillError(f"schedule template missing value for {e}") from e


def fill_blueprint(
    blueprint: AutomationBlueprint,
    values: Dict[str, Any],

View on GitHub (pinned to c896c09c42)

Solutions

  1. Pass a bare positive integer as the minute count: '15' for every 15 minutes
  2. Strip any unit suffix before submitting; validate with value.isdigit() and int(value) > 0

Example fix

# before
fill_blueprint(bp, {"interval_min": "30m"})
# BlueprintFillError: invalid interval '30m' — minutes as a positive integer

# after
fill_blueprint(bp, {"interval_min": "30"})
Defensive patterns

Strategy: validation

Validate before calling

def valid_interval(v) -> bool:
    s = str(v).strip()
    return s.isdigit() and int(s) > 0

Try / catch

try:
    spec = fill_blueprint(bp, values)
except BlueprintFillError as e:
    if str(e).startswith("invalid interval"):
        values["interval_min"] = strip_unit(values["interval_min"])  # '30m' -> '30'
        spec = fill_blueprint(bp, values)
    else:
        raise

Prevention

When it happens

Trigger: fill_blueprint on an interval template with interval_min='30m', interval_min='0', or interval_min omitted-but-defaulted-to-empty (note: an empty value fails the isdigit check rather than raising the 'required' error).

Common situations: Users appending units ('every 15m'); agent passing an int 30 without str() is fine, but 1.5 floats or empty strings from unfilled form fields fail.

Related errors


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