The core of any AI agent is a classic cycle consisting of an external trigger, a repeating chain of actions, and an exit condition. The process begins with an external impulse, such as a Telegram message, a scheduled cron job, or a webhook. The system then forms a request to the model, including context and tool descriptions, and sends it via API in JSON format.
The model analyzes the request and returns a JSON response containing a text message for the user and a function call for a specific tool. A dispatcher program executes the function locally, records the result, and adds it to the dialogue history. This cycle repeats until the task is completed and no further tool calls are required.
The author notes that AI models do not execute commands on the server independently; they only provide text instructions. Security depends on the code of the managing program. For example, OpenClaw's scheduler description includes text instructions like 'Never exec sleep/poll as timer' to reduce errors, though hard security checks must remain in the code.
The Hermes agent focuses on memory management, utilizing three layers: local text files for project and user information, a database for semantic search of past dialogues, and a skill catalog where successful action chains are saved as separate scenarios.
While the basic cycle is simple, the OpenClaw repository contains nearly 3 million lines of code. This is due to the extensive engineering wrapper including messenger integrations, retry mechanisms for API failures, authorization, and context management. OpenClaw uses a central control panel, whereas Hermes emphasizes experience accumulation.





