Hermes Agent

Feature

Schedule Reliable AI Agent Work with Hermes Cron

Quick answer

Hermes cron runs recurring agent work in fresh sessions and zero-token script-only watchdogs. Reliable operation means checking four layers: job lifecycle, immutable run history, delivery state, and the real artifact. Preflight blocks bad configuration before model spend; unknown attempts are not replayed; expressions use the host's local timezone; and per-job reasoning pins keep routine and complex schedules on different budgets.

Key Points

  • Create one-shot, interval, or five-field cron schedules
  • Run LLM-driven jobs or zero-token script-only watchdogs
  • Pause, resume, edit, trigger, and remove jobs by ID or name
  • Attach skills and restrict per-job toolsets
  • Set an absolute workdir for repository context
  • Block invalid providers, skills, and delivery targets before model spend with preflight
  • Snapshot provider/model choices and fail closed after unexpected global changes
  • Deliver locally, to exact Slack channels or DMs, Telegram topics, and other platform targets
  • Inspect immutable execution history with hermes cron runs
  • Make supported reports continuable with session attachment
  • Chain jobs with context_from while keeping sessions isolated
  • Verify the real artifact or message instead of trusting schedule state
  • Dashboard operations loop: inspect schedule, next run, logs, provider usage, and delivery target in Web UI, then require the real delivered report or artifact as proof.
  • Distinguish scheduled, paused, completed, and blocked_config lifecycle states
  • Separate failed or unknown execution attempts from last_delivery_error
  • Track recurring execution failure streaks without conflating delivery failures
  • Use the scheduler host's local timezone and inspect finite repeat exhaustion
  • Pin per-job reasoning effort independently of interactive chat settings
  • Bound agent inactivity, scripts, media sends, cleanup, and Bot Chat delivery separately

How It Works

  1. 1Create a schedule in chat, with /cron, or through the standalone CLI
  2. 2Hermes stores the schedule, runtime boundary, and delivery rule
  3. 3The gateway starts due work in a fresh isolated session or script-only process
  4. 4Hermes saves output and delivers it to the configured target
  5. 5You verify the report, alert, file, test, commit, or live URL

Real-World Use Cases

Decision-ready daily briefs

Collect current sources, rank what matters, and deliver a concise brief to an exact Slack channel, Telegram topic, Discord channel, or local output.

Quiet service watchdogs

Run a deterministic script every few minutes. Empty stdout stays silent; failures and meaningful alerts are delivered without an LLM call.

Verified publishing jobs

Update a page, run formatting and link checks, build, deploy, verify the live URL at phone and desktop widths, and report the evidence.

Repository maintenance

Use an absolute workdir so project instructions and file/terminal tools operate in the intended repository, then require tests and a clean diff.

Multi-stage pipelines

Connect collect, rank, and publish stages with context_from while keeping each run isolated, inspectable, and independently recoverable.

Under the Hood

The gateway daemon checks scheduled jobs every 60 seconds and runs due agent jobs in fresh sessions. Jobs are stored under the active Hermes home, output is retained locally, and a scheduler lock prevents duplicate ticks. Agent jobs use the cron platform's configured toolsets unless a per-job enabled_toolsets list narrows them. A workdir injects supported project instructions and points file, terminal, and code tools at an absolute existing directory; workdir jobs run sequentially to avoid process-wide directory collisions. Script-only no-agent jobs run files from ~/.hermes/scripts/ without touching a model: non-empty stdout is delivered, empty stdout is silent, and non-zero exits or timeouts alert. Hybrid jobs can use a pre-check script and emit {"wakeAgent": false} to skip an unnecessary model call. Provider/model choices are snapshotted at creation; after an unexpected global default change, the job fails closed until its model lane is explicitly pinned. Delivery can target local output, origin, exact chats/topics, configured home channels, or fan-out sets. Continuable delivery is opt-in, and context_from passes upstream output without pretending isolated sessions share memory.

Frequently asked questions

Which schedule formats does Hermes cron support?

Use relative delays such as 30m, recurring intervals such as every 2h, five-field cron expressions such as 0 9 * * 1-5, or ISO timestamps. You can also ask Hermes conversationally to create an appropriate schedule.

Can Hermes cron run without model tokens?

Yes. A script-only no-agent job runs a script under ~/.hermes/scripts/ and delivers its stdout directly. Empty stdout is a silent successful tick.

Do cron jobs inherit the current chat?

No. Agent jobs run in fresh sessions. Include every required path, source, constraint, output format, and success condition in the prompt or attached skills.

How do I prevent surprise provider spend?

Hermes snapshots the provider/model choice at creation and fails closed after unexpected global default changes. Pin the intended provider/model explicitly and use script-only or hybrid pre-checks for deterministic polling.

How do I verify a Hermes cron job really ran?

Use `hermes cron runs <job> --limit 20` to inspect claimed, running, completed, failed, or unknown attempts, then verify the actual message or artifact. Execution history does not replace destination proof.

What cron states should I check after a missed run?

Check scheduled, paused, completed, or blocked_config on the job; then inspect completed, failed, or unknown attempts in hermes cron runs; finally inspect last_delivery_error and the real destination.

Do delivery failures count toward the cron failure streak?

No. The recurring failure streak tracks execution failures. Delivery errors are kept separately so transport problems are not mistaken for failed agent work.

Related Features