Hermes Agent: Mastering New Commands

The Hermes Agent continues to evolve, with frequent updates introducing new commands that enhance its capabilities. Keeping pace with these changes is crucial for developers and users aiming to maximize the agent's efficiency. This guide consolidates essential commands, categorized for practical application, drawing from the latest cheat sheets and source code analysis. The focus is on commands that facilitate repeated tasks and provide granular control over running jobs, areas that have seen significant recent development.

Sessions & Context Management

Effective management of an agent's working memory, or context, is fundamental. Hermes provides commands to initiate new tasks, resume previous ones, and organize workflows into distinct branches.

  • /new [name]: Initiates a new session, effectively clearing the current context and starting a fresh workspace. This is useful for distinct, unrelated tasks to prevent context bleed. The optional `[name]` allows for easy identification and later resumption of this specific session.
  • /resume [name]: Restores a previously saved session. This command is vital for picking up where you left off, preserving the agent's state, and continuing complex or long-running tasks without losing progress.
  • /branch [name]: Creates a new branch from the current context. This allows for parallel development or exploration of different approaches to a problem without affecting the main workflow. Each branch maintains its own context, enabling isolated experimentation.
  • /list: Displays a list of all active and saved sessions, providing an overview of ongoing work and available states to resume.
  • /delete [name]: Removes a specific session, freeing up resources and decluttering the session list. Use with caution as this action is irreversible.
  • /context: Shows the current context of the agent, detailing the history of commands and information it is currently processing. This is invaluable for debugging and understanding the agent's current state.
  • /clear: Clears the current session's context entirely, similar to starting a new session but without necessarily naming it.

Task Execution & Control

The ability to control and monitor tasks is paramount for productivity. Recent updates have refined commands for managing ongoing operations.

  • /run [command]: Executes a specific command within the current context. This is the primary command for issuing instructions to the agent.
  • /rerun: Re-executes the last command. This is a shortcut for repeating an action, useful for iterative development or when a command fails due to transient issues.
  • /repeat [count] [command]: Executes a specified command `[count]` times. This is a powerful addition for automating repetitive actions, such as applying a transformation to multiple files or generating variations of a piece of code.
  • /exec [command]: Executes a command directly in the shell environment. This bypasses the agent's internal parsing and is typically used for system-level operations or when interacting with external tools that require raw shell execution.
  • /wait [duration]: Pauses execution for a specified `[duration]` (e.g., `10s`, `1m`). This is useful for synchronizing with external processes or allowing resources to become available.
  • /stop: Halts the execution of the currently running command or process. This is the emergency brake for stopping runaway or incorrect operations.
  • /kill [pid]: Terminates a specific process using its Process ID (PID). This offers more granular control than `/stop`, allowing targeted termination of background tasks.
  • /ps: Lists all currently running processes managed by the agent, including their PIDs, status, and command. Essential for monitoring and managing concurrent operations.

Information Retrieval & Debugging

Understanding what the agent is doing and why is key to effective use. These commands aid in diagnosis and information gathering.

  • /help [command]: Provides detailed information about a specific command or general usage instructions.
  • /log: Displays the agent's execution log, showing a history of commands, outputs, and errors.
  • /debug [level]: Sets the debugging verbosity level. Higher levels provide more detailed output, useful for diagnosing complex issues.
  • /inspect [variable_name]: Retrieves the value of a specific variable within the agent's current context.
  • /tree: Displays the current directory structure or a relevant hierarchical view of the agent's workspace.

Workflow Automation

Hermes Agent's strength lies in its ability to automate complex workflows. The following commands are central to this capability.

  • /plan [task_description]: Generates a plan to accomplish a given task. This command outlines the steps the agent intends to take, allowing for review and modification before execution.
  • /goto [step_number]: Navigates to a specific step in a generated plan. This allows users to skip ahead or revisit parts of a planned workflow.
  • /undo: Reverts the last operation or set of operations. This is a critical command for correcting mistakes without needing to restart entire sessions.

Prompting & Interaction

These commands influence how the agent interacts and interprets instructions.

  • /sys [instruction]: Sets a system-level instruction that influences the agent's behavior for the current session. This is akin to setting a global directive.
  • /tool [tool_name]: Explicitly invokes a specific tool available to the agent. This is useful when the agent might not automatically select the desired tool.

The surprising detail here is not the sheer number of commands, but the refinement in control for repetitive tasks.

The introduction and refinement of commands like /repeat and the granular process management via /ps and /kill signify a shift towards more robust, production-ready AI agent workflows. Developers can now orchestrate complex, multi-step operations with greater confidence and precision. This evolution moves Hermes Agent from a simple task executor to a sophisticated workflow engine, capable of handling intricate, long-running processes that were previously cumbersome or impossible to manage reliably.

What remains to be seen is how these new control mechanisms will integrate with external CI/CD pipelines and automated testing frameworks. The potential for fully automated, agent-driven development cycles is immense, but the connective tissue between Hermes' internal state management and external DevOps tooling is still an area ripe for innovation and standardization.