Source: ai-research/agentwikis-hermes-gapa-2026-06-12.md — compiled by Agent Wikis from Hermes community transcripts and v0.8.0 release notes; sourced 2026-06-12

GAPA is Hermes Agent’s self-improvement mechanism: a closed cycle in which the agent observes its own behavior, identifies failures, packages successes as reusable skills, and edits its own prompts and memory — all without human intervention. “Works like back propagation but for prompts instead of model weights.” It is the architectural difference that makes Hermes a learning agent rather than a stateless one: ChatGPT, Claude, and OpenClaw “reset every time” — Hermes compounds.

Key Takeaways

  • 5-stage loop running continuously — trajectory capture → GAPA review every ~15 tool calls → autonomous skill creation → persistent memory update → compounding reuse
  • Cadence is configurableskills.creation_nudge_interval: 15 in config.yaml
  • Writes to disk autonomously — creates SKILL.md files under ~/.hermes/skills/custom/, updates MEMORY.md, USER.md, and state.db
  • Compounds per user — over time, your Hermes becomes different from anyone else’s: shaped by your workflows, preferences, and patterns
  • Self-diagnosed its own tool-calling bugs — v0.8.0 case study: Hermes ran GAPA on its own GPT/Codex provider interactions, identified 5 failure modes, and patched its own guidance without human input
  • Only fires on complex tasks — trivial requests bypass the loop; value compounds on repeatable, non-trivial work

How the Loop Works

Stage 1 — Trajectory Capture Every API call, tool decision, and output is recorded in order and saved to sessions.json + FTS5-indexed state.db. Most agent frameworks discard this at session end; Hermes keeps it as queryable history.

Stage 2 — GAPA Review (~every 15 tool calls) The agent pauses, reads back the recent trajectory, and evaluates what worked and what failed. Output: edits to its own working prompts and memory. The 15-call cadence is configurable via skills.creation_nudge_interval.

Stage 3 — Autonomous Skill Creation When trajectory analysis finds reusable work, Hermes packages it as a SKILL.md document and writes it to ~/.hermes/skills/. Community examples:

  • Hacker News morning briefing: single complex prompt → autonomous skill + wired cron job
  • Manim animation skill: created after first successful complex technical explanation as animated video
  • X-posting workflow: writes feedback into the skill MD on each run and improves on the next

Stage 4 — Persistent Memory Update Beyond skills, three memory layers update in parallel:

  • Cross-session FTS5 search — every prior conversation indexed and queryable (“six months from now you can ask ‘haven’t we solved something like this?’“)
  • Honcho user model — builds a model of who you are, your work style, your preferences, your domain knowledge
  • Memory nudges — proactively suggests skill improvements you can approve or reject

Stage 5 — Compounding Reuse Next similar request runs the existing skill, refines it on new feedback, and ratchets capability upward. The agent’s trajectory for complex tasks also feeds offline RL training via the ML Research Pipeline — trajectories become training data for future model improvements.

The v0.8.0 Self-Diagnosis Case Study

The most concrete public proof that GAPA works on the harness itself: Hermes ran trajectories against GPT and Codex backends, the GAPA review identified 5 distinct failure modes in how those models invoked tools, and the agent generated patches to its own provider-specific guidance — without a human in the loop. Flagged in v0.8.0 release notes as “Self-Optimized GPT/Codex Tool-Use Guidance — The agent diagnosed and patched 5 failure modes in GPT and Codex tool calling through automated behavioral benchmarking.”

Key Config Parameters

skills:
  creation_nudge_interval: 15      # GAPA review cadence (tool calls)
  external_dirs: []
memory:
  memory_enabled: true
  user_profile_enabled: true       # Honcho-style user modeling
  memory_char_limit: 2200
  user_char_limit: 1375
  nudge_interval: 10               # memory-suggestion cadence
  flush_min_turns: 6
  provider: honcho
agent:
  max_turns: 60

Relevant slash commands: /skills (browse, install, inspect, create), /memory (view what Hermes knows about you), /yolo (accept dangerous commands uninterrupted)

Risks and Pitfalls

  • Only fires on complex tasks — trivial requests bypass the loop; don’t judge adoption on simple use
  • LLM-generated skills can fail — inspect with hermes skills inspect <name> before using in cron
  • First 7 days are rough — the loop needs runs to learn from; judge after a week of normal use
  • Context bloat — memory accumulates in long sessions; tune session_reset.mode: both and idle_minutes for local models
  • Stuck-loop bug — recurring across versions; v0.8.0’s inactivity-based timeout helps; still recurs
  • Security surface — GAPA edits prompts and writes skills to disk autonomously; use Docker backend for production, not local + /yolo
  • Skill naming conflicts — overlapping tasks can produce morning-briefing and morning-briefing-1 both half-working; run hermes skills audit periodically

Try It

  • Run Hermes on a repeating workflow for 7+ days and watch /skills grow
  • After a cron run, inspect a newly created skill: hermes skills inspect <name> before putting it in production
  • Ask /memory to see what your Hermes has learned about your preferences
  • Review the ML Research Pipeline (hermes-agent.nousresearch.com/docs) to understand how your trajectories feed offline training