← Back to blog

Hermes Agent Autonomous Lifecycle - /refine, /heartbeat, and Quality Gates Land

hermesagentautomationgoalsmemoryskills
Hermes Agent Autonomous Lifecycle - /refine, /heartbeat, and Quality Gates Land

NOTE: X API v2 and OpenRouter both returned 402 (systemic billing outage). This roundup is sourced from GitHub PRs - no tweet embeds.

Three features from teknium1 landed within minutes of each other on August 6, all adapted from Prime Intellect's Prime-Agent and all pointed at the same tracker (#79686): long-running autonomous agent sessions. Together they form a lifecycle surface - self-improvement, persistent presence, and verified completion.

/refine - on-demand memory and skill review

/refine [focus] runs the background memory and skill self-improvement review on demand. It uses the same fork the automatic post-turn loop runs, but the user triggers it directly and can steer it with optional focus instructions.

The implementation is compact: +175/-3 across 9 files. The core change lands in agent/background_review.py (+16 lines), with the slash command wiring in gateway/slash_commands.py (+44) and the CLI surface in hermes_cli/cli_commands_mixin.py (+41). A new test file (tests/agent/test_refine_focus.py, 56 lines) covers the focus-steering path.

This is the same review fork that already runs silently after each turn - /refine just makes it explicit and steerable.

/heartbeat - recurring idle prompts

/heartbeat every <interval> <prompt> attaches one recurring instruction to a session. When the session is idle and the interval has elapsed, the prompt re-enters the conversation as a normal user turn.

The implementation is the largest of the three: +927/-2 across 11 files. The core logic lives in a new file, hermes_cli/heartbeat.py (332 lines), with a matching test file at tests/hermes_cli/test_heartbeat.py (187 lines). The gateway integration (gateway/run.py, +97 lines) and CLI surface (hermes_cli/cli_commands_mixin.py, +85) are substantial.

The first cut is idle-delivery only - a due tick on a busy session coalesces to the next idle poll. The tracker's planned wall-clock mode (deliver even during active work) is a follow-up.

Quality gates - deterministic goal verification

/goal gate add <command> attaches shell commands that must exit 0 before the goal judge can declare a /goal done. Gates are repeatable and run in order. The subcommand surface (/goal gate add|list|remove|clear) makes them inspectable.

The implementation is +656/-5 across 7 files. The core logic lives in an expanded hermes_cli/goals.py (+327/-1), with a new test file at tests/hermes_cli/test_goal_gates.py (224 lines). The docs update (website/docs/user-guide/features/goals.md) adds 24 lines.

The gate runner is deterministic: same gate list, same outcome every time. This is a reliability surface, not a heuristic - a gate failure is a hard block, not a suggestion.

Also merged today

Actual Computer provider (#79644, teknium1, +852/-6, 20 files). Salvage of #26491 by somewheresy, updated for ~12.4k commits of drift. Supports hosted relay via api.actual.inc and local on-device daemon at 127.0.0.1:8080.

Document extraction expansion (#79781, teknium1, +167/-3, 4 files). Wires in firecrawl/anydoc as an optional converter, widening read_file auto-extraction from .ipynb/.docx/.xlsx to PDF, legacy Office, OpenDocument, RTF, and EPUB.

CI performance - two PRs from kshitijk4poor: test_hermes_state.py cut from 52s to 10s (#79769, +31/-2), and 12 test slices cutting the merge-gate critical path by ~33% (#79735, +1/-1).

Context

These features land three days after the v0.20.0 "Herald Release" (August 3), which brought conversational voice with barge-in, wake words, A2A v1.0, signed outbound webhooks, and a desktop plugin SDK. The autonomous-lifecycle features extend the release's agent-surface in a different direction - not what Hermes says to the world, but how it sustains its own sessions.

The full tracker (#79686) lists 26 sub-issues across four priorities. Today's three PRs cover P2 and P4. P1 (long-running session orchestration) and P3 (session resumption from durable state) are still open.

Termagotchi
_

Ryan Underdown

Autodidact. Rarely listens to advice.

Follow on X @catamarammed or GitHub @underdown