agent-lifecycle

Manages bootstrap, recovery, configuration, cron scheduling, and container deployment of Hermes Agent instances.

Updated Nov 1, 2024
One-click install
npx skills add https://github.com/mlorentedev/dotfiles --skill agent-lifecycle-mlorentedev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-lifecycle
Source: https://github.com/mlorentedev/dotfiles/tree/main/harness/skills/agent-lifecycle
Command: npx skills add https://github.com/mlorentedev/dotfiles --skill agent-lifecycle-mlorentedev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Running a Hermes Agent on ephemeral infrastructure (cloud VMs, containers, Kubernetes pods) risks losing memory, skills, cron jobs, and configuration on every restart. This Skill provides the complete operational lifecycle to keep an agent bootstrapped, recoverable, properly configured, and synchronized with a vault as the single source of truth. ## Core Features & Use Cases - Bootstrap & Recovery: A 6-phase protocol that restores memory, skills, cron jobs, and config from durable state files in the vault after infrastructure loss. - Vault Integration: Connects the agent to an Obsidian vault via Hive MCP for persistent cross-agent knowledge sharing, with scope configuration and git discipline rules. - Config Optimization: Tunes reasoning effort, context window, compression thresholds, and delegation settings with vault-backed restore commands. - Cronjob Management: Creates agent-driven and script-only scheduled jobs, including the critical filename-only script format rule. - Container Deployment: Handles systemd-less environments, Debian trixie binary disappearance, Tailscale userspace networking, and startup persistence chains. - Use Case: A Kubernetes pod running Hermes restarts and loses all state. Use this Skill to re-run the bootstrap protocol, restore memory and cron jobs from the vault, reinstall wiped binaries with ensure_bin, and resume operations. ## Quick Start Ask the agent to run the full bootstrap and recovery protocol for a Hermes instance using the durable state files stored in the vault.

Frequently Asked Questions about agent-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap a Hermes Agent after a container restart?

Run the 6-phase bootstrap protocol: set up prerequisites, restore memory from memory.md, re-create skills from skills.md, re-create cron jobs from cronjobs.md, apply config from config.md, then recover context from sessions and the GitHub Project. Validate with bash /hermes-home/scripts/validate.sh.

How do I schedule cron jobs for a Hermes Agent?

Use the cronjob tool with action=create, a prompt or script, and a cron schedule. For script-only jobs set no_agent=true and pass a filename only, with the script placed in /persist/hermes-home/scripts/. Inline script content with a shebang fails because the scheduler treats it as a filename.

Why does systemctl fail in a Hermes container?

Containers and Kubernetes pods run without systemd, so systemctl enable --now fails with 'systemd is not running'. Start daemons directly instead, for example /usr/sbin/sshd, and use a background daemon loop with a PID file instead of crontab when cron binaries are missing.

Why does SSH fail with kex_exchange_identification connection closed?

On Debian trixie containers, OpenSSH 10.x uses a separate sshd-session binary that links against libwrap.so.0 and libwtmpdb.so.0. If these libraries are missing, sshd closes connections without a banner. Diagnose with ldd /usr/lib/openssh/sshd-session and install libwrap0 and libwtmpdb0.

How do I connect a Hermes Agent to an Obsidian vault?

Install Hive MCP with uvx hive-vault, register it in config.yaml under mcp_servers, configure vault_scopes with the agents scope last, and clone the vault with a fine-grained GitHub token. Create the target directory before calling vault_write to avoid 'Project not found' errors.

What are the limitations of storing agent config in the vault?

The vault should store only essential config snippets of 4-10 lines, not a full config.yaml dump, because full copies drift from the live config over time. Use a config document with exact restore commands for each changed parameter instead of a separate backup YAML file.